@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
@@ -0,0 +1,8 @@
1
+ import { type ChatKey } from '../../../utils/chat.js';
2
+ type ChatPanelProps = {
3
+ chatKey: ChatKey;
4
+ calendarId: string;
5
+ isActive: boolean;
6
+ };
7
+ export declare function ChatPanel(props: ChatPanelProps): import("react").JSX.Element | null;
8
+ export {};
@@ -0,0 +1,13 @@
1
+ import { type ReactNode } from 'react';
2
+ export type ChatAccess = {
3
+ currentUserId: string;
4
+ isAvailable: (calendarId: string) => boolean;
5
+ canModerate: (calendarId: string) => boolean;
6
+ };
7
+ type ChatProviderProps = {
8
+ access: ChatAccess | undefined;
9
+ calendarIds: readonly string[];
10
+ children: ReactNode;
11
+ };
12
+ export declare function ChatProvider({ access, calendarIds, children }: ChatProviderProps): string | number | bigint | boolean | Iterable<ReactNode> | Promise<string | number | bigint | boolean | import("react").ReactPortal | import("react").ReactElement<unknown, string | import("react").JSXElementConstructor<any>> | Iterable<ReactNode> | null | undefined> | import("react").JSX.Element | null | undefined;
13
+ export {};
@@ -0,0 +1,4 @@
1
+ import type { ChatKey } from '../../../utils/chat.js';
2
+ export declare function UnreadBadge({ chatKey }: {
3
+ chatKey: ChatKey;
4
+ }): import("react").JSX.Element | null;
@@ -0,0 +1,14 @@
1
+ import type { ChatRepository } from '../../storage/index.js';
2
+ import { type ChatKey } from '../../../utils/chat.js';
3
+ export type ChatContextValue = {
4
+ repository: ChatRepository;
5
+ currentUserId: string;
6
+ isAvailable: (calendarId: string) => boolean;
7
+ canModerate: (calendarId: string) => boolean;
8
+ unread: ReadonlyMap<string, number>;
9
+ markOpen: (key: ChatKey) => void;
10
+ markClosed: (key: ChatKey) => void;
11
+ };
12
+ export declare const ChatContext: import("react").Context<ChatContextValue | null>;
13
+ export declare const useChatContext: () => ChatContextValue | null;
14
+ export declare const useUnreadCount: (key: ChatKey) => number;
@@ -0,0 +1,13 @@
1
+ import { type ChatKey, type ChatMessage } from '../../../utils/chat.js';
2
+ import type { ChatRepository } from '../../storage/index.js';
3
+ export declare function useChatMessages(repository: ChatRepository, chatKey: ChatKey, isActive: boolean): {
4
+ loadOlder: () => Promise<void>;
5
+ send: (text: string) => Promise<void>;
6
+ edit: (id: string, text: string) => Promise<void>;
7
+ remove: (id: string) => Promise<void>;
8
+ messages: ChatMessage[];
9
+ hasMore: boolean;
10
+ isLoading: boolean;
11
+ isOffline: boolean;
12
+ error: string | null;
13
+ };
@@ -0,0 +1,7 @@
1
+ import { type ChatKey } from '../../../utils/chat.js';
2
+ import type { ChatRepository } from '../../storage/index.js';
3
+ export declare function useChatUnread(repository: ChatRepository, calendarIds: readonly string[], currentUserId: string): {
4
+ unread: ReadonlyMap<string, number>;
5
+ markOpen: (key: ChatKey) => void;
6
+ markClosed: (key: ChatKey) => void;
7
+ };
@@ -0,0 +1,4 @@
1
+ export { ChatPanel } from './components/ChatPanel.js';
2
+ export { ChatProvider, type ChatAccess } from './components/ChatProvider.js';
3
+ export { UnreadBadge } from './components/UnreadBadge.js';
4
+ export { useUnreadCount } from './context/ChatContext.js';
@@ -0,0 +1,2 @@
1
+ export declare const toLocalDate: (iso: string, timeZone: string) => string;
2
+ export declare const formatMessageTime: (iso: string, locale: string, timeZone: string) => string;
@@ -0,0 +1,15 @@
1
+ import { type Attendee, type AttendeeStatus } from '../../../utils/event.js';
2
+ export type AttendeeCandidate = {
3
+ email: string;
4
+ name: string;
5
+ };
6
+ type Response = Exclude<AttendeeStatus, 'needsAction'>;
7
+ type AttendeesFieldProps = {
8
+ attendees: readonly Attendee[];
9
+ candidates: readonly AttendeeCandidate[];
10
+ ownEmail: string | null;
11
+ onChange: (attendees: Attendee[]) => void;
12
+ onRespond?: (status: Response) => Promise<void>;
13
+ };
14
+ export declare function AttendeesField({ attendees, candidates, ownEmail, onChange, onRespond }: AttendeesFieldProps): import("react").JSX.Element;
15
+ export {};
@@ -1,11 +1,27 @@
1
- import { type EditScope, type EventInput, type EventOccurrence } from '../../../utils/event.js';
1
+ import { type EditScope, type EventInput, type EventOccurrence, type AttendeeStatus } from '../../../utils/event.js';
2
+ import { type AttendeeCandidate } from './AttendeesField.js';
3
+ import type { ChatKey } from '../../../utils/chat.js';
4
+ export type EventTab = 'general' | 'recurrence' | 'attendees' | 'details' | 'chat';
5
+ export type AttendeeOptions = {
6
+ candidates: readonly AttendeeCandidate[];
7
+ ownEmail: string | null;
8
+ onRespond?: (status: Exclude<AttendeeStatus, 'needsAction'>) => Promise<void>;
9
+ };
2
10
  type EventModalProps = {
3
11
  initialValue: EventInput;
12
+ attendeeOptions?: AttendeeOptions;
4
13
  occurrence?: EventOccurrence | null;
5
14
  notice?: string;
6
15
  onSave: (input: EventInput, scope: EditScope) => Promise<void>;
7
- onDelete?: () => void;
16
+ onDelete?: () => void | Promise<void>;
17
+ onDuplicate?: (input: EventInput) => void;
18
+ onRemindersChange?: (reminders: number[]) => Promise<void>;
19
+ chat?: {
20
+ key: ChatKey;
21
+ calendarId: string;
22
+ };
23
+ initialTab?: EventTab;
8
24
  onClose: () => void;
9
25
  };
10
- export declare function EventModal({ initialValue, occurrence, notice, onSave, onDelete, onClose }: EventModalProps): import("react").JSX.Element;
26
+ export declare function EventModal({ initialValue, attendeeOptions, occurrence, notice, onSave, onDelete, onDuplicate, onRemindersChange, chat, initialTab, onClose, }: EventModalProps): import("react").JSX.Element;
11
27
  export {};
@@ -0,0 +1,8 @@
1
+ import { type EventLink } from '../../../utils/event.js';
2
+ type LinksFieldProps = {
3
+ links: readonly EventLink[];
4
+ error?: string;
5
+ onChange: (links: EventLink[]) => void;
6
+ };
7
+ export declare function LinksField({ links, error, onChange }: LinksFieldProps): import("react").JSX.Element;
8
+ export {};
@@ -0,0 +1,6 @@
1
+ type ReminderFieldProps = {
2
+ value: readonly number[];
3
+ onChange: (reminders: number[]) => void;
4
+ };
5
+ export declare function ReminderField({ value, onChange }: ReminderFieldProps): import("react").JSX.Element;
6
+ export {};
@@ -1,5 +1,6 @@
1
- import { type CalendarEvent, type EditScope, type EventInput, type EventOccurrence } from '../../../utils/event.js';
1
+ import { type AttendeeStatus, type CalendarEvent, type EditScope, type EventInput, type EventOccurrence } from '../../../utils/event.js';
2
2
  import { type EventQuery } from '../../storage/index.js';
3
+ import { type Undo } from '../utils/undo.js';
3
4
  type UseEventsOptions = EventQuery & {
4
5
  targetCalendarId: string;
5
6
  };
@@ -9,7 +10,9 @@ export declare function useEvents({ from, to, calendarIds, targetCalendarId }: U
9
10
  isLoading: boolean;
10
11
  reload: () => void;
11
12
  createEvent: (input: EventInput) => Promise<CalendarEvent>;
12
- updateEvent: (occurrence: EventOccurrence, input: EventInput, scope: EditScope) => Promise<unknown>;
13
- deleteEvent: (occurrence: EventOccurrence, scope: EditScope) => Promise<unknown>;
13
+ updateEvent: (occurrence: EventOccurrence, input: EventInput, scope: EditScope) => Promise<Undo | null>;
14
+ deleteEvent: (occurrence: EventOccurrence, scope: EditScope) => Promise<Undo | null>;
15
+ respond: ((occurrence: EventOccurrence, status: AttendeeStatus) => Promise<void>) | undefined;
16
+ setReminders: ((occurrence: EventOccurrence, reminders: number[]) => Promise<void>) | undefined;
14
17
  };
15
18
  export {};
@@ -1,7 +1,9 @@
1
1
  export { useEvents } from './hooks/useEvents.js';
2
- export { EventModal } from './components/EventModal.js';
2
+ export { EventModal, type AttendeeOptions, type EventTab } from './components/EventModal.js';
3
+ export type { AttendeeCandidate } from './components/AttendeesField.js';
3
4
  export { DeleteEventModal } from './components/DeleteEventModal.js';
4
5
  export { RecurrenceScopeModal } from './components/RecurrenceScopeModal.js';
5
6
  export { getScopeOptions } from './utils/scopeOptions.js';
6
7
  export { CustomColorSettings } from './components/CustomColorSettings.js';
7
8
  export { ColorPicker } from './components/ColorPicker.js';
9
+ export { importEvents, listAllEvents } from './utils/icalExchange.js';
@@ -0,0 +1,11 @@
1
+ import type { Messages } from '../../../i18n/index.js';
2
+ import { type CalendarEvent } from '../../../utils/event.js';
3
+ import type { ImportedEvent } from '../../../utils/ical.js';
4
+ import type { EventRepository } from '../../storage/index.js';
5
+ export declare const listAllEvents: (repository: EventRepository, calendarId: string) => Promise<CalendarEvent[]>;
6
+ export type ImportSummary = {
7
+ created: number;
8
+ updated: number;
9
+ skipped: number;
10
+ };
11
+ export declare function importEvents(repository: EventRepository, calendarId: string, imported: readonly ImportedEvent[], m: Messages): Promise<ImportSummary>;
@@ -0,0 +1,7 @@
1
+ import { type CalendarEvent } from '../../../utils/event.js';
2
+ import type { EventRepository } from '../../storage/index.js';
3
+ export type Undo = () => Promise<void>;
4
+ export declare function recordChanges(repository: EventRepository, known: readonly CalendarEvent[]): {
5
+ repository: EventRepository;
6
+ undo: () => Undo | null;
7
+ };
@@ -0,0 +1 @@
1
+ export declare function HolidaySettings(): import("react").JSX.Element;
@@ -0,0 +1,3 @@
1
+ import type { DateRange } from '../../../utils/date.js';
2
+ export declare const useHolidayRegion: () => string | null;
3
+ export declare function useHolidays({ from, to }: DateRange): Map<string, string[]>;
@@ -0,0 +1,2 @@
1
+ export { useHolidayRegion, useHolidays } from './hooks/useHolidays.js';
2
+ export { HolidaySettings } from './components/HolidaySettings.js';
@@ -0,0 +1,8 @@
1
+ import type { HolidayRepository } from '../../storage/index.js';
2
+ export declare const libraryHolidays: HolidayRepository;
3
+ export type HolidayArea = {
4
+ code: string;
5
+ name: string;
6
+ };
7
+ export declare const listHolidayCountries: (language: string) => Promise<HolidayArea[]>;
8
+ export declare const listHolidayStates: (country: string, language: string) => Promise<HolidayArea[]>;
@@ -0,0 +1,3 @@
1
+ export declare function NotificationSettings({ emailVerified }: {
2
+ emailVerified: boolean;
3
+ }): import("react").JSX.Element;
@@ -1,3 +1,4 @@
1
1
  export { PreferencesProvider } from './context/PreferencesProvider.js';
2
2
  export { usePreferences } from './hooks/usePreferences.js';
3
3
  export { PreferencesSettings } from './components/PreferencesSettings.js';
4
+ export { NotificationSettings } from './components/NotificationSettings.js';
@@ -0,0 +1 @@
1
+ export declare function ReminderNotices(): import("react").JSX.Element | null;
@@ -0,0 +1,2 @@
1
+ import { type ScheduledReminder } from '../../utils/reminders.js';
2
+ export declare function useReminders(notify: (reminder: ScheduledReminder) => void): void;
@@ -1,7 +1,6 @@
1
- export declare const useStorage: () => import("../index.ts").StorageRepositories & {
1
+ export declare const useStorage: () => import("../types/storage.ts").StorageRepositories & {
2
2
  version: number;
3
3
  invalidate: () => void;
4
4
  };
5
- export declare const useEventRepository: () => import("../index.ts").EventRepository;
6
5
  export declare const useColorRepository: () => import("../index.ts").ColorRepository;
7
6
  export declare const usePreferencesRepository: () => import("../index.ts").PreferencesRepository;
@@ -1,10 +1,12 @@
1
1
  export { StorageProvider } from './context/StorageProvider.js';
2
2
  export { LocalImportPrompt } from './components/LocalImportPrompt.js';
3
- export { useColorRepository, useEventRepository, usePreferencesRepository, useStorage } from './hooks/useStorage.js';
3
+ export { useColorRepository, usePreferencesRepository, useStorage } from './hooks/useStorage.js';
4
4
  export { LocalEventRepository } from './repositories/LocalEventRepository.js';
5
5
  export { LocalColorRepository } from './repositories/LocalColorRepository.js';
6
6
  export { LocalPreferencesRepository } from './repositories/LocalPreferencesRepository.js';
7
7
  export { RemoteColorRepository } from './repositories/RemoteColorRepository.js';
8
8
  export { RemoteEventRepository } from './repositories/RemoteEventRepository.js';
9
9
  export { RemotePreferencesRepository } from './repositories/RemotePreferencesRepository.js';
10
- export type { ColorRepository, DateRange, EventQuery, EventRepository, PreferencesRepository, StorageRepositories, StorageContextValue, StorageMode, } from './types/storage.js';
10
+ export { RemoteHolidayRepository } from './repositories/RemoteHolidayRepository.js';
11
+ export { RemoteChatRepository } from './repositories/RemoteChatRepository.js';
12
+ export type { ColorRepository, EventQuery, EventRepository, EventSearchQuery, ChatRepository, HolidayQuery, HolidayRepository, PreferencesRepository, StorageMode, } from './types/storage.js';
@@ -1,9 +1,10 @@
1
1
  import { type CalendarEvent, type EventInput } from '../../../utils/event.js';
2
- import type { EventQuery, EventRepository } from '../types/storage.js';
2
+ import type { EventQuery, EventRepository, EventSearchQuery } from '../types/storage.js';
3
3
  export declare class LocalEventRepository implements EventRepository {
4
4
  #private;
5
5
  constructor(storageKey?: string);
6
6
  list({ from, to, calendarIds }: EventQuery): Promise<CalendarEvent[]>;
7
+ search({ text, calendarIds }: EventSearchQuery): Promise<CalendarEvent[]>;
7
8
  listAll(): Promise<CalendarEvent[]>;
8
9
  clear(): Promise<void>;
9
10
  listSeries(seriesId: string): Promise<CalendarEvent[]>;
@@ -0,0 +1,18 @@
1
+ import { type ApiClient } from '../../../utils/api.js';
2
+ import { type ChatEvent, type ChatKey, type ChatMessage } from '../../../utils/chat.js';
3
+ import type { ChatRepository } from '../types/storage.js';
4
+ type Listener = (event: ChatEvent) => void;
5
+ export declare class RemoteChatRepository implements ChatRepository {
6
+ #private;
7
+ constructor(api: ApiClient, socketUrl: string);
8
+ list(key: ChatKey, { before }?: {
9
+ before?: string;
10
+ }): Promise<import("../../../utils/chat.ts").ChatPage>;
11
+ send(key: ChatKey, text: string): Promise<ChatMessage>;
12
+ edit(id: string, text: string): Promise<ChatMessage>;
13
+ remove(id: string): Promise<void>;
14
+ markRead(key: ChatKey): Promise<void>;
15
+ unread(calendarIds: readonly string[]): Promise<import("../../../utils/chat.ts").ChatUnread[]>;
16
+ subscribe(listener: Listener): () => void;
17
+ }
18
+ export {};
@@ -1,12 +1,15 @@
1
1
  import { type ApiClient } from '../../../utils/api.js';
2
- import type { CalendarEvent, EventInput } from '../../../utils/event.js';
3
- import type { EventQuery, EventRepository } from '../types/storage.js';
2
+ import { type AttendeeStatus, type CalendarEvent, type EventInput } from '../../../utils/event.js';
3
+ import type { EventQuery, EventRepository, EventSearchQuery } from '../types/storage.js';
4
4
  export declare class RemoteEventRepository implements EventRepository {
5
5
  #private;
6
6
  constructor(api: ApiClient);
7
7
  list({ from, to, calendarIds }: EventQuery): Promise<CalendarEvent[]>;
8
8
  listSeries(seriesId: string): Promise<CalendarEvent[]>;
9
+ search({ text, calendarIds }: EventSearchQuery): Promise<CalendarEvent[]>;
9
10
  create(calendarId: string, input: EventInput): Promise<CalendarEvent>;
10
11
  update(id: string, input: EventInput): Promise<CalendarEvent>;
12
+ respond(id: string, status: AttendeeStatus): Promise<CalendarEvent>;
13
+ setReminders(id: string, reminders: number[]): Promise<CalendarEvent>;
11
14
  remove(id: string): Promise<void>;
12
15
  }
@@ -0,0 +1,7 @@
1
+ import type { ApiClient } from '../../../utils/api.js';
2
+ import type { HolidayQuery, HolidayRepository } from '../types/storage.js';
3
+ export declare class RemoteHolidayRepository implements HolidayRepository {
4
+ #private;
5
+ constructor(api: ApiClient);
6
+ list({ from, to, region, language }: HolidayQuery): Promise<import("../../../utils/holidays.ts").PublicHoliday[]>;
7
+ }
@@ -1,17 +1,25 @@
1
1
  import type { HexColor } from '../../../utils/color.js';
2
2
  import type { DateRange } from '../../../utils/date.js';
3
- import type { CalendarEvent, EventInput } from '../../../utils/event.js';
3
+ import type { AttendeeStatus, CalendarEvent, EventInput } from '../../../utils/event.js';
4
+ import type { ChatEvent, ChatKey, ChatMessage, ChatPage, ChatUnread } from '../../../utils/chat.js';
5
+ import type { PublicHoliday } from '../../../utils/holidays.js';
4
6
  import type { Preferences } from '../../../utils/preferences.js';
5
- export type { DateRange };
6
7
  export type EventQuery = DateRange & {
7
8
  calendarIds: readonly string[];
8
9
  };
10
+ export type EventSearchQuery = {
11
+ text: string;
12
+ calendarIds: readonly string[];
13
+ };
9
14
  export interface EventRepository {
10
15
  list(query: EventQuery): Promise<CalendarEvent[]>;
11
16
  listSeries(seriesId: string): Promise<CalendarEvent[]>;
12
17
  create(calendarId: string, input: EventInput): Promise<CalendarEvent>;
13
18
  update(id: string, input: EventInput): Promise<CalendarEvent>;
14
19
  remove(id: string): Promise<void>;
20
+ search?(query: EventSearchQuery): Promise<CalendarEvent[]>;
21
+ respond?(id: string, status: AttendeeStatus): Promise<CalendarEvent>;
22
+ setReminders?(id: string, reminders: number[]): Promise<CalendarEvent>;
15
23
  }
16
24
  export interface ColorRepository {
17
25
  list(): Promise<HexColor[]>;
@@ -22,12 +30,32 @@ export interface PreferencesRepository {
22
30
  get(): Promise<Preferences>;
23
31
  update(changes: Partial<Preferences>): Promise<Preferences>;
24
32
  }
33
+ export type HolidayQuery = DateRange & {
34
+ region: string;
35
+ language: string;
36
+ };
37
+ export interface HolidayRepository {
38
+ list(query: HolidayQuery): Promise<PublicHoliday[]>;
39
+ }
40
+ export interface ChatRepository {
41
+ list(key: ChatKey, options?: {
42
+ before?: string;
43
+ }): Promise<ChatPage>;
44
+ send(key: ChatKey, text: string): Promise<ChatMessage>;
45
+ edit(id: string, text: string): Promise<ChatMessage>;
46
+ remove(id: string): Promise<void>;
47
+ markRead(key: ChatKey): Promise<void>;
48
+ unread(calendarIds: readonly string[]): Promise<ChatUnread[]>;
49
+ subscribe(listener: (event: ChatEvent) => void): () => void;
50
+ }
25
51
  export type StorageMode = 'local' | 'remote';
26
52
  export type StorageRepositories = {
27
53
  mode: StorageMode;
28
54
  events: EventRepository;
29
55
  colors: ColorRepository;
30
56
  preferences: PreferencesRepository;
57
+ holidays?: HolidayRepository;
58
+ chat?: ChatRepository;
31
59
  };
32
60
  export type StorageContextValue = StorageRepositories & {
33
61
  version: number;
@@ -0,0 +1 @@
1
+ export declare function useDebouncedValue<T>(value: T, delayMs: number): T;
@@ -15,6 +15,11 @@ export declare function useForm<T extends object>({ initialValues, validate, pre
15
15
  values: T;
16
16
  errors: Partial<Record<keyof T, string>>;
17
17
  setField: <K extends keyof T>(field: K, value: T[K]) => void;
18
+ bind: <K extends keyof T>(field: K) => {
19
+ value: T[K];
20
+ error: Partial<Record<keyof T, string>>[K];
21
+ onChange: (value: T[K]) => void;
22
+ };
18
23
  validateAll: (prepared?: T) => boolean;
19
24
  reset: () => void;
20
25
  };
@@ -3,6 +3,11 @@ export declare function useFormState<T extends object>(initialValues: T, validat
3
3
  values: T;
4
4
  errors: Partial<Record<keyof T, string>>;
5
5
  setField: <K extends keyof T>(field: K, value: T[K]) => void;
6
+ bind: <K extends keyof T>(field: K) => {
7
+ value: T[K];
8
+ error: Partial<Record<keyof T, string>>[K];
9
+ onChange: (value: T[K]) => void;
10
+ };
6
11
  validateAll: (prepared?: T) => boolean;
7
12
  reset: () => void;
8
13
  };
@@ -0,0 +1,3 @@
1
+ export type Shortcuts = Partial<Record<string, () => void>>;
2
+ export declare const toShortcutKey: (event: Pick<KeyboardEvent, "key" | "altKey" | "ctrlKey" | "metaKey">) => string | null;
3
+ export declare function useKeyboardShortcuts(shortcuts: Shortcuts): void;
@@ -0,0 +1 @@
1
+ export declare const useLocationUrl: () => (location: string) => string | null;
@@ -15,6 +15,7 @@ export declare function createFormatter(locale: string, firstDay: number): {
15
15
  hour: (hour: number) => string;
16
16
  compactHour: (hour: number) => string;
17
17
  list: (items: readonly string[]) => string;
18
+ duration: (minutes: number) => string;
18
19
  shortWeekdays: {
19
20
  weekday: number;
20
21
  label: string;
@@ -1,5 +1,4 @@
1
1
  export { getErrorMessage } from './errorMessage.js';
2
- export type { Formatter } from './format.js';
3
2
  export type { I18n } from './I18nContext.js';
4
3
  export { I18nProvider } from './I18nProvider.js';
5
4
  export { getLocaleChoices, getLocaleName } from './locale.js';
@@ -2,9 +2,7 @@ export declare const BUILT_IN_LANGUAGES: readonly ["en", "de", "fr", "es", "it",
2
2
  export type BuiltInLanguage = (typeof BUILT_IN_LANGUAGES)[number];
3
3
  export type Language = string;
4
4
  export declare const DEFAULT_LANGUAGE: BuiltInLanguage;
5
- export declare const DEFAULT_LOCALE = "en-US";
6
5
  export declare const AUTO_LOCALE = "auto";
7
- export declare const BUILT_IN_LOCALES: readonly ["en-US", "en-GB", "de-DE", "fr-FR", "es-ES", "it-IT", "nl-NL", "pl-PL", "pt-BR", "pt-PT"];
8
6
  export declare const isBuiltInLanguage: (language: string) => language is BuiltInLanguage;
9
7
  export declare const canonicalizeLocale: (tag: unknown) => string | null;
10
8
  export declare const getLanguage: (locale: string, languages?: ReadonlySet<string>) => Language;
@@ -29,6 +29,23 @@ export declare const calendar: {
29
29
  now: (time: string) => string;
30
30
  openDay: (date: string) => string;
31
31
  moreEvents: (count: number) => string;
32
+ moreLinks: (count: number) => string;
33
+ holiday: (name: string) => string;
32
34
  fromCalendar: (name: string) => string;
33
35
  sharedEventNotice: (source: string) => string;
36
+ dismiss: string;
37
+ undo: {
38
+ action: string;
39
+ ctrlZ: string;
40
+ deleted: (title: string) => string;
41
+ moved: (title: string) => string;
42
+ };
43
+ search: {
44
+ open: string;
45
+ title: string;
46
+ placeholder: string;
47
+ hint: string;
48
+ empty: string;
49
+ searching: string;
50
+ };
34
51
  };
@@ -118,6 +118,7 @@ export declare const calendars: {
118
118
  members: string;
119
119
  invitations: string;
120
120
  danger: string;
121
+ exchange: string;
121
122
  };
122
123
  displayTitle: string;
123
124
  displayDescription: string;
@@ -168,6 +169,30 @@ export declare const calendars: {
168
169
  deleting: string;
169
170
  deleteMessage: (team: string, count: number) => string;
170
171
  };
172
+ feed: {
173
+ title: string;
174
+ description: string;
175
+ label: string;
176
+ create: string;
177
+ copy: string;
178
+ copied: string;
179
+ openApp: string;
180
+ warning: string;
181
+ renew: string;
182
+ remove: string;
183
+ };
184
+ ical: {
185
+ title: string;
186
+ description: string;
187
+ exportLabel: string;
188
+ exporting: string;
189
+ importLabel: string;
190
+ importing: string;
191
+ imported: (created: number, updated: number) => string;
192
+ skipped: (count: number) => string;
193
+ importFailed: string;
194
+ noEvents: string;
195
+ };
171
196
  transfer: {
172
197
  title: string;
173
198
  search: string;
@@ -2,6 +2,7 @@ import type { ErrorCode } from '../../../utils/appError.js';
2
2
  import type { ApiErrorKind } from '../../../utils/apiError.js';
3
3
  export declare const common: {
4
4
  loading: string;
5
+ configError: string;
5
6
  close: string;
6
7
  cancel: string;
7
8
  save: string;
@@ -38,6 +39,8 @@ export declare const validation: {
38
39
  weekdaysRequired: string;
39
40
  dateInvalid: string;
40
41
  untilBeforeStart: string;
42
+ locationTooLong: (max: number) => string;
43
+ linkInvalid: string;
41
44
  };
42
45
  export declare const colors: {
43
46
  blue: string;
@@ -18,10 +18,8 @@ export declare const events: {
18
18
  noCustomColors: string;
19
19
  removeColor: (label: string) => string;
20
20
  deleteTitle: string;
21
- deleteSeriesMessage: (title: string) => string;
22
21
  deleteMessage: (title: string) => string;
23
- yes: string;
24
- no: string;
22
+ deleteSeriesMessage: (title: string) => string;
25
23
  scopeTitle: string;
26
24
  scopeMessage: string;
27
25
  scopes: {
@@ -43,4 +41,67 @@ export declare const events: {
43
41
  one: string;
44
42
  many: string;
45
43
  };
44
+ location: string;
45
+ reminder: string;
46
+ noReminder: string;
47
+ reminderAtStart: string;
48
+ reminderBefore: (duration: string) => string;
49
+ reminderDue: (title: string, time: string) => string;
50
+ reminderBlocked: string;
51
+ attendees: string;
52
+ addAttendee: string;
53
+ inviteAll: (count: number) => string;
54
+ removeAttendee: (name: string) => string;
55
+ allMembersInvited: string;
56
+ attendeeStatus: {
57
+ needsAction: string;
58
+ accepted: string;
59
+ tentative: string;
60
+ declined: string;
61
+ };
62
+ yourResponse: string;
63
+ respond: {
64
+ accepted: string;
65
+ tentative: string;
66
+ declined: string;
67
+ };
68
+ attendeeSummary: (accepted: number, total: number) => string;
69
+ tabsLabel: string;
70
+ tabs: {
71
+ general: string;
72
+ recurrence: string;
73
+ attendees: string;
74
+ details: string;
75
+ };
76
+ links: string;
77
+ addLink: string;
78
+ linkUrl: string;
79
+ linkLabel: string;
80
+ openLink: (name: string) => string;
81
+ removeLink: (name: string) => string;
82
+ openMap: (location: string) => string;
83
+ chat: {
84
+ tab: string;
85
+ empty: string;
86
+ placeholder: string;
87
+ send: string;
88
+ sendHint: string;
89
+ edit: string;
90
+ edited: string;
91
+ confirmDelete: string;
92
+ loadOlder: string;
93
+ unread: (count: number) => string;
94
+ offline: string;
95
+ you: string;
96
+ removedAuthor: string;
97
+ };
98
+ duplicate: string;
99
+ duplicateNotice: (title: string) => string;
100
+ respondPage: {
101
+ title: string;
102
+ sending: string;
103
+ incompleteLink: string;
104
+ recurring: string;
105
+ saved: (status: string) => string;
106
+ };
46
107
  };