@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.
Files changed (144) hide show
  1. package/CHANGELOG.md +22 -0
  2. package/DEVELOPER_GUIDE.md +1045 -0
  3. package/README.md +41 -190
  4. package/api/openapi.yaml +395 -4
  5. package/demo/calendar.config.jsonc +183 -0
  6. package/demo/calendar.config.yaml +180 -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 +14 -11
  10. package/dist-lib/cdn/calendar-widget.js.map +1 -1
  11. package/dist-lib/cdn/de-Dqga3QZG.js +2 -0
  12. package/dist-lib/cdn/de-Dqga3QZG.js.map +1 -0
  13. package/dist-lib/cdn/es-BWSfTMjh.js +2 -0
  14. package/dist-lib/cdn/es-BWSfTMjh.js.map +1 -0
  15. package/dist-lib/cdn/fr-N9gwLjVq.js +2 -0
  16. package/dist-lib/cdn/fr-N9gwLjVq.js.map +1 -0
  17. package/dist-lib/cdn/it-B5Ib2xLn.js +2 -0
  18. package/dist-lib/cdn/it-B5Ib2xLn.js.map +1 -0
  19. package/dist-lib/cdn/nl-CjI7Uc8l.js +2 -0
  20. package/dist-lib/cdn/nl-CjI7Uc8l.js.map +1 -0
  21. package/dist-lib/cdn/pl-FRu3yQhc.js +2 -0
  22. package/dist-lib/cdn/pl-FRu3yQhc.js.map +1 -0
  23. package/dist-lib/cdn/pt-DBKJ-3Is.js +2 -0
  24. package/dist-lib/cdn/pt-DBKJ-3Is.js.map +1 -0
  25. package/dist-lib/npm/{de-Cuz-uz3s.js → de-DhWrY8Ae.js} +111 -3
  26. package/dist-lib/npm/de-DhWrY8Ae.js.map +1 -0
  27. package/dist-lib/npm/{es-BnRzdU90.js → es-Bj8leuD5.js} +111 -3
  28. package/dist-lib/npm/es-Bj8leuD5.js.map +1 -0
  29. package/dist-lib/npm/{fr-B-nmvStg.js → fr-DzAFZ0jh.js} +111 -3
  30. package/dist-lib/npm/fr-DzAFZ0jh.js.map +1 -0
  31. package/dist-lib/npm/index.js +3876 -1400
  32. package/dist-lib/npm/index.js.map +1 -1
  33. package/dist-lib/npm/{it-DMTpE4GO.js → it-lEmGP5yo.js} +111 -3
  34. package/dist-lib/npm/it-lEmGP5yo.js.map +1 -0
  35. package/dist-lib/npm/{nl-DQkyEt9Z.js → nl-d1h63dvm.js} +111 -3
  36. package/dist-lib/npm/nl-d1h63dvm.js.map +1 -0
  37. package/dist-lib/npm/{pl-CcjU41yx.js → pl-DynFKadb.js} +111 -3
  38. package/dist-lib/npm/pl-DynFKadb.js.map +1 -0
  39. package/dist-lib/npm/{pt-Dulais2f.js → pt-foL7jDsE.js} +111 -3
  40. package/dist-lib/npm/pt-foL7jDsE.js.map +1 -0
  41. package/dist-lib/npm/types/components/Icons.d.ts +2 -0
  42. package/dist-lib/npm/types/config/routes.d.ts +1 -0
  43. package/dist-lib/npm/types/context/HostBridge.d.ts +38 -0
  44. package/dist-lib/npm/types/context/HostContext.d.ts +39 -2
  45. package/dist-lib/npm/types/data/restDataSource.d.ts +3 -1
  46. package/dist-lib/npm/types/data/tenantDataSource.d.ts +3 -1
  47. package/dist-lib/npm/types/data/types.d.ts +4 -1
  48. package/dist-lib/npm/types/features/attachments/components/AttachmentsField.d.ts +8 -0
  49. package/dist-lib/npm/types/features/attachments/hooks/useAttachments.d.ts +11 -0
  50. package/dist-lib/npm/types/features/attachments/index.d.ts +2 -0
  51. package/dist-lib/npm/types/features/authorization/components/account/DataExportSection.d.ts +1 -0
  52. package/dist-lib/npm/types/features/authorization/hooks/useAuth.d.ts +1 -0
  53. package/dist-lib/npm/types/features/authorization/index.d.ts +1 -0
  54. package/dist-lib/npm/types/features/authorization/repositories/HostTokenAuthRepository.d.ts +1 -0
  55. package/dist-lib/npm/types/features/authorization/repositories/RemoteAuthRepository.d.ts +1 -0
  56. package/dist-lib/npm/types/features/authorization/types/auth.d.ts +2 -0
  57. package/dist-lib/npm/types/features/calendar/components/Calendar.d.ts +7 -1
  58. package/dist-lib/npm/types/features/calendar/components/CalendarHeader.d.ts +3 -1
  59. package/dist-lib/npm/types/features/calendar/constants/views.d.ts +2 -2
  60. package/dist-lib/npm/types/features/calendar/hooks/useEventNavigation.d.ts +4 -0
  61. package/dist-lib/npm/types/features/calendar/hooks/useHostController.d.ts +2 -0
  62. package/dist-lib/npm/types/features/calendar/hooks/useLiveEvents.d.ts +11 -0
  63. package/dist-lib/npm/types/features/calendar/hooks/useSegmentAttributes.d.ts +2 -0
  64. package/dist-lib/npm/types/features/calendar/utils/eventLabels.d.ts +4 -0
  65. package/dist-lib/npm/types/features/calendars/components/settings/ShareSection.d.ts +4 -0
  66. package/dist-lib/npm/types/features/calendars/components/settings/TrashSection.d.ts +4 -0
  67. package/dist-lib/npm/types/features/calendars/index.d.ts +1 -1
  68. package/dist-lib/npm/types/features/calendars/repositories/RemoteCalendarRepository.d.ts +3 -0
  69. package/dist-lib/npm/types/features/calendars/types/calendar.d.ts +3 -0
  70. package/dist-lib/npm/types/features/calendars/utils/permissions.d.ts +4 -0
  71. package/dist-lib/npm/types/features/categories/components/CategoriesSection.d.ts +6 -0
  72. package/dist-lib/npm/types/features/categories/components/CategoryField.d.ts +9 -0
  73. package/dist-lib/npm/types/features/categories/components/CategoryFilterModal.d.ts +10 -0
  74. package/dist-lib/npm/types/features/categories/hooks/useCategories.d.ts +9 -0
  75. package/dist-lib/npm/types/features/categories/index.d.ts +4 -0
  76. package/dist-lib/npm/types/features/events/components/DeleteEventModal.d.ts +2 -1
  77. package/dist-lib/npm/types/features/events/components/EventModal.d.ts +11 -3
  78. package/dist-lib/npm/types/features/events/hooks/useEvents.d.ts +4 -1
  79. package/dist-lib/npm/types/features/events/index.d.ts +2 -2
  80. package/dist-lib/npm/types/features/events/utils/icalExchange.d.ts +4 -1
  81. package/dist-lib/npm/types/features/storage/index.d.ts +6 -1
  82. package/dist-lib/npm/types/features/storage/repositories/LocalCategoryRepository.d.ts +14 -0
  83. package/dist-lib/npm/types/features/storage/repositories/LocalEventRepository.d.ts +8 -2
  84. package/dist-lib/npm/types/features/storage/repositories/RemoteAttachmentRepository.d.ts +11 -0
  85. package/dist-lib/npm/types/features/storage/repositories/RemoteCategoryRepository.d.ts +10 -0
  86. package/dist-lib/npm/types/features/storage/repositories/RemoteChatRepository.d.ts +2 -1
  87. package/dist-lib/npm/types/features/storage/repositories/RemoteEventRepository.d.ts +9 -3
  88. package/dist-lib/npm/types/features/storage/repositories/RemoteSharedCalendarRepository.d.ts +9 -0
  89. package/dist-lib/npm/types/features/storage/types/storage.d.ts +30 -2
  90. package/dist-lib/npm/types/features/storage/utils/liveSocket.d.ts +10 -0
  91. package/dist-lib/npm/types/i18n/messages/en/calendar.d.ts +9 -0
  92. package/dist-lib/npm/types/i18n/messages/en/calendars.d.ts +44 -0
  93. package/dist-lib/npm/types/i18n/messages/en/core.d.ts +1 -0
  94. package/dist-lib/npm/types/i18n/messages/en/events.d.ts +37 -0
  95. package/dist-lib/npm/types/i18n/messages/en/index.d.ts +99 -1
  96. package/dist-lib/npm/types/i18n/messages/en/settings.d.ts +7 -0
  97. package/dist-lib/npm/types/i18n/messages/index.d.ts +99 -1
  98. package/dist-lib/npm/types/lib/CalendarWidget.d.ts +1 -1
  99. package/dist-lib/npm/types/lib/IsolatedRoot.d.ts +3 -1
  100. package/dist-lib/npm/types/lib/appearance.d.ts +3 -0
  101. package/dist-lib/npm/types/lib/config.d.ts +16 -27
  102. package/dist-lib/npm/types/lib/configFile.d.ts +6 -0
  103. package/dist-lib/npm/types/lib/defaults.d.ts +29 -1
  104. package/dist-lib/npm/types/lib/element.d.ts +15 -1
  105. package/dist-lib/npm/types/lib/handle.d.ts +15 -0
  106. package/dist-lib/npm/types/lib/index.d.ts +6 -2
  107. package/dist-lib/npm/types/lib/options.d.ts +47 -0
  108. package/dist-lib/npm/types/lib/useCalendarOptions.d.ts +11 -0
  109. package/dist-lib/npm/types/pages/SharedCalendarPage.d.ts +1 -0
  110. package/dist-lib/npm/types/utils/api.d.ts +1 -0
  111. package/dist-lib/npm/types/utils/appError.d.ts +1 -1
  112. package/dist-lib/npm/types/utils/attachment.d.ts +31 -0
  113. package/dist-lib/npm/types/utils/calendarView.d.ts +1 -0
  114. package/dist-lib/npm/types/utils/category.d.ts +18 -0
  115. package/dist-lib/npm/types/utils/conflict.d.ts +1 -0
  116. package/dist-lib/npm/types/utils/dataExport.d.ts +13 -0
  117. package/dist-lib/npm/types/utils/event.d.ts +6 -1
  118. package/dist-lib/npm/types/utils/eventChange.d.ts +13 -0
  119. package/dist-lib/npm/types/utils/ical.d.ts +6 -1
  120. package/dist-lib/npm/types/utils/sharedCalendar.d.ts +13 -0
  121. package/dist-lib/npm/types/utils/trash.d.ts +14 -0
  122. package/package.json +8 -2
  123. package/schema/calendar-config.schema.json +297 -0
  124. package/dist-lib/cdn/de-BjzK4Pgn.js +0 -2
  125. package/dist-lib/cdn/de-BjzK4Pgn.js.map +0 -1
  126. package/dist-lib/cdn/es-TA5DvEsw.js +0 -2
  127. package/dist-lib/cdn/es-TA5DvEsw.js.map +0 -1
  128. package/dist-lib/cdn/fr-Dx-nmhQ7.js +0 -2
  129. package/dist-lib/cdn/fr-Dx-nmhQ7.js.map +0 -1
  130. package/dist-lib/cdn/it-D_2eA3dT.js +0 -2
  131. package/dist-lib/cdn/it-D_2eA3dT.js.map +0 -1
  132. package/dist-lib/cdn/nl-dC1zae2Z.js +0 -2
  133. package/dist-lib/cdn/nl-dC1zae2Z.js.map +0 -1
  134. package/dist-lib/cdn/pl-9TYRPoy1.js +0 -2
  135. package/dist-lib/cdn/pl-9TYRPoy1.js.map +0 -1
  136. package/dist-lib/cdn/pt-CvBN-qx1.js +0 -2
  137. package/dist-lib/cdn/pt-CvBN-qx1.js.map +0 -1
  138. package/dist-lib/npm/de-Cuz-uz3s.js.map +0 -1
  139. package/dist-lib/npm/es-BnRzdU90.js.map +0 -1
  140. package/dist-lib/npm/fr-B-nmvStg.js.map +0 -1
  141. package/dist-lib/npm/it-DMTpE4GO.js.map +0 -1
  142. package/dist-lib/npm/nl-DQkyEt9Z.js.map +0 -1
  143. package/dist-lib/npm/pl-CcjU41yx.js.map +0 -1
  144. package/dist-lib/npm/pt-Dulais2f.js.map +0 -1
@@ -1,15 +1,21 @@
1
1
  import { type ApiClient } from '../../../utils/api.js';
2
2
  import { type AttendeeStatus, type CalendarEvent, type EventInput } from '../../../utils/event.js';
3
3
  import type { EventQuery, EventRepository, EventSearchQuery } from '../types/storage.js';
4
+ import { type EventChange } from '../../../utils/eventChange.js';
5
+ import type { LiveSocket } from '../utils/liveSocket.js';
4
6
  export declare class RemoteEventRepository implements EventRepository {
5
7
  #private;
6
- constructor(api: ApiClient);
8
+ readonly subscribe?: (listener: (change: EventChange) => void) => () => void;
9
+ constructor(api: ApiClient, socket?: LiveSocket);
7
10
  list({ from, to, calendarIds }: EventQuery): Promise<CalendarEvent[]>;
8
11
  listSeries(seriesId: string): Promise<CalendarEvent[]>;
9
12
  search({ text, calendarIds }: EventSearchQuery): Promise<CalendarEvent[]>;
10
13
  create(calendarId: string, input: EventInput): Promise<CalendarEvent>;
11
- update(id: string, input: EventInput): Promise<CalendarEvent>;
14
+ update(id: string, input: EventInput, version?: number): Promise<CalendarEvent>;
12
15
  respond(id: string, status: AttendeeStatus): Promise<CalendarEvent>;
13
16
  setReminders(id: string, reminders: number[]): Promise<CalendarEvent>;
14
- remove(id: string): Promise<void>;
17
+ listTrash(calendarId: string): Promise<import("../../../utils/trash.ts").TrashedEvent[]>;
18
+ restore(id: string): Promise<CalendarEvent>;
19
+ purge(id: string): Promise<void>;
20
+ remove(id: string, version?: number): Promise<void>;
15
21
  }
@@ -0,0 +1,9 @@
1
+ import { type ApiClient } from '../../../utils/api.js';
2
+ import type { DateRange } from '../../../utils/date.js';
3
+ import type { SharedCalendarRepository } from '../types/storage.js';
4
+ export declare class RemoteSharedCalendarRepository implements SharedCalendarRepository {
5
+ #private;
6
+ constructor(api: ApiClient);
7
+ get(token: string): Promise<import("../../../utils/sharedCalendar.ts").SharedCalendar>;
8
+ listEvents(token: string, { from, to }: DateRange): Promise<import("../../../utils/event.ts").CalendarEvent[]>;
9
+ }
@@ -1,9 +1,14 @@
1
+ import type { Attachment } from '../../../utils/attachment.js';
2
+ import type { Category } from '../../../utils/category.js';
1
3
  import type { HexColor } from '../../../utils/color.js';
2
4
  import type { DateRange } from '../../../utils/date.js';
3
5
  import type { AttendeeStatus, CalendarEvent, EventInput } from '../../../utils/event.js';
4
6
  import type { ChatEvent, ChatKey, ChatMessage, ChatPage, ChatUnread } from '../../../utils/chat.js';
7
+ import type { EventChange } from '../../../utils/eventChange.js';
8
+ import type { TrashedEvent } from '../../../utils/trash.js';
5
9
  import type { PublicHoliday } from '../../../utils/holidays.js';
6
10
  import type { Preferences } from '../../../utils/preferences.js';
11
+ import type { SharedCalendar } from '../../../utils/sharedCalendar.js';
7
12
  export type EventQuery = DateRange & {
8
13
  calendarIds: readonly string[];
9
14
  };
@@ -15,17 +20,37 @@ export interface EventRepository {
15
20
  list(query: EventQuery): Promise<CalendarEvent[]>;
16
21
  listSeries(seriesId: string): Promise<CalendarEvent[]>;
17
22
  create(calendarId: string, input: EventInput): Promise<CalendarEvent>;
18
- update(id: string, input: EventInput): Promise<CalendarEvent>;
19
- remove(id: string): Promise<void>;
23
+ update(id: string, input: EventInput, version?: number): Promise<CalendarEvent>;
24
+ remove(id: string, version?: number): Promise<void>;
20
25
  search?(query: EventSearchQuery): Promise<CalendarEvent[]>;
21
26
  respond?(id: string, status: AttendeeStatus): Promise<CalendarEvent>;
22
27
  setReminders?(id: string, reminders: number[]): Promise<CalendarEvent>;
28
+ subscribe?(listener: (change: EventChange) => void): () => void;
29
+ listTrash?(calendarId: string): Promise<TrashedEvent[]>;
30
+ restore?(id: string): Promise<CalendarEvent>;
31
+ purge?(id: string): Promise<void>;
23
32
  }
24
33
  export interface ColorRepository {
25
34
  list(): Promise<HexColor[]>;
26
35
  add(color: HexColor): Promise<HexColor[]>;
27
36
  remove(color: HexColor): Promise<HexColor[]>;
28
37
  }
38
+ export interface CategoryRepository {
39
+ list(calendarIds: readonly string[]): Promise<Category[]>;
40
+ create(calendarId: string, name: string): Promise<Category>;
41
+ rename(id: string, name: string): Promise<Category>;
42
+ remove(id: string): Promise<void>;
43
+ }
44
+ export interface AttachmentRepository {
45
+ list(eventId: string): Promise<Attachment[]>;
46
+ upload(eventId: string, file: File): Promise<Attachment>;
47
+ download(attachment: Attachment): Promise<Blob>;
48
+ remove(id: string): Promise<void>;
49
+ }
50
+ export interface SharedCalendarRepository {
51
+ get(token: string): Promise<SharedCalendar>;
52
+ listEvents(token: string, range: DateRange): Promise<CalendarEvent[]>;
53
+ }
29
54
  export interface PreferencesRepository {
30
55
  get(): Promise<Preferences>;
31
56
  update(changes: Partial<Preferences>): Promise<Preferences>;
@@ -56,6 +81,9 @@ export type StorageRepositories = {
56
81
  preferences: PreferencesRepository;
57
82
  holidays?: HolidayRepository;
58
83
  chat?: ChatRepository;
84
+ categories?: CategoryRepository;
85
+ shared?: SharedCalendarRepository;
86
+ attachments?: AttachmentRepository;
59
87
  };
60
88
  export type StorageContextValue = StorageRepositories & {
61
89
  version: number;
@@ -0,0 +1,10 @@
1
+ export type LiveMessage = Record<string, unknown> & {
2
+ type: string;
3
+ };
4
+ type Listener = (message: LiveMessage) => void;
5
+ export declare class LiveSocket {
6
+ #private;
7
+ constructor(url: string);
8
+ subscribe(listener: Listener): () => void;
9
+ }
10
+ export {};
@@ -27,6 +27,8 @@ export declare const calendar: {
27
27
  today: string;
28
28
  newEvent: string;
29
29
  now: (time: string) => string;
30
+ ownResponse: (status: string) => string;
31
+ todayMark: string;
30
32
  openDay: (date: string) => string;
31
33
  moreEvents: (count: number) => string;
32
34
  moreLinks: (count: number) => string;
@@ -40,6 +42,13 @@ export declare const calendar: {
40
42
  deleted: (title: string) => string;
41
43
  moved: (title: string) => string;
42
44
  };
45
+ filter: {
46
+ open: string;
47
+ openActive: string;
48
+ title: string;
49
+ uncategorized: string;
50
+ reset: string;
51
+ };
43
52
  search: {
44
53
  open: string;
45
54
  title: string;
@@ -119,6 +119,7 @@ export declare const calendars: {
119
119
  invitations: string;
120
120
  danger: string;
121
121
  exchange: string;
122
+ trash: string;
122
123
  };
123
124
  displayTitle: string;
124
125
  displayDescription: string;
@@ -169,6 +170,49 @@ export declare const calendars: {
169
170
  deleting: string;
170
171
  deleteMessage: (team: string, count: number) => string;
171
172
  };
173
+ categories: {
174
+ title: string;
175
+ description: string;
176
+ empty: string;
177
+ nameLabel: string;
178
+ newLabel: string;
179
+ add: string;
180
+ rename: string;
181
+ remove: (name: string) => string;
182
+ };
183
+ trash: {
184
+ title: string;
185
+ description: string;
186
+ empty: string;
187
+ withDetached: (count: number) => string;
188
+ deletedBy: (name: string, date: string) => string;
189
+ deletedAt: (date: string) => string;
190
+ expires: (date: string) => string;
191
+ search: string;
192
+ searchPlaceholder: string;
193
+ noResults: string;
194
+ showMore: (shown: number, total: number) => string;
195
+ restore: string;
196
+ deleteForever: string;
197
+ deleteForeverLabel: (title: string) => string;
198
+ confirmTitle: string;
199
+ confirmDelete: (title: string) => string;
200
+ };
201
+ share: {
202
+ title: string;
203
+ description: string;
204
+ label: string;
205
+ pathLabel: string;
206
+ create: string;
207
+ copy: string;
208
+ copied: string;
209
+ open: string;
210
+ warning: string;
211
+ renew: string;
212
+ remove: string;
213
+ readOnly: string;
214
+ notFound: string;
215
+ };
172
216
  feed: {
173
217
  title: string;
174
218
  description: 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;
@@ -18,6 +18,42 @@ export declare const events: {
18
18
  noCustomColors: string;
19
19
  removeColor: (label: string) => string;
20
20
  deleteTitle: string;
21
+ viewTitle: string;
22
+ deleteTrashHint: string;
23
+ remoteChange: {
24
+ updated: string;
25
+ deleted: string;
26
+ reload: string;
27
+ };
28
+ conflict: {
29
+ message: string;
30
+ overwrite: string;
31
+ reload: string;
32
+ };
33
+ attachments: {
34
+ title: string;
35
+ add: string;
36
+ uploading: string;
37
+ empty: string;
38
+ pendingHint: string;
39
+ hint: (count: number, size: string) => string;
40
+ download: (name: string) => string;
41
+ remove: (name: string) => string;
42
+ uploadedBy: (name: string) => string;
43
+ tooLarge: (name: string, size: string) => string;
44
+ emptyFile: (name: string) => string;
45
+ tooMany: (name: string, count: number) => string;
46
+ notUploaded: (names: string) => string;
47
+ count: (count: number) => string;
48
+ };
49
+ categories: {
50
+ label: string;
51
+ add: string;
52
+ newLabel: string;
53
+ create: string;
54
+ empty: string;
55
+ };
56
+ deleteMessage: (title: string) => string;
21
57
  deleteSeriesMessage: (title: string) => string;
22
58
  scopeTitle: string;
23
59
  scopeMessage: string;
@@ -68,6 +104,7 @@ export declare const events: {
68
104
  tabsLabel: string;
69
105
  tabs: {
70
106
  general: string;
107
+ appearance: string;
71
108
  recurrence: string;
72
109
  attendees: string;
73
110
  details: string;
@@ -1,6 +1,7 @@
1
1
  export declare const en: {
2
2
  common: {
3
3
  loading: string;
4
+ configError: string;
4
5
  close: string;
5
6
  cancel: string;
6
7
  save: string;
@@ -15,7 +16,7 @@ export declare const en: {
15
16
  next: string;
16
17
  back: string;
17
18
  };
18
- errors: Record<"unknown" | "eventNotFound" | "accountRequired" | "saveEventsFailed" | "savePreferencesFailed" | "saveColorFailed" | "saveDecisionFailed" | "invalidLink" | "invalidResetLink" | "invalidCredentials" | "emailTaken" | "wrongCurrentPassword" | "wrongPassword" | "soleOwner" | "unauthorized" | "forbidden" | "notFound" | "serverError" | "payloadTooLarge" | "calendarNotFound" | "teamNotFound" | "memberNotFound" | "invitationNotFound" | "invitationExpired" | "tooManyLoginAttempts" | "seriesHasDetached" | "selfInvite" | "alreadyMember" | "alreadyInvited" | "personalTeam" | "lastOwner" | "alreadyOwner" | "lastCalendar" | "tooManyColors" | "managedByHost" | "unknownTenant" | "originNotAllowed" | "invalidUserToken", string> & {
19
+ errors: Record<"unknown" | "eventNotFound" | "accountRequired" | "saveEventsFailed" | "savePreferencesFailed" | "saveColorFailed" | "saveCategoriesFailed" | "categoryExists" | "tooManyCategories" | "categoryNotFound" | "shareNotFound" | "attachmentNotFound" | "eventChanged" | "seriesDeleted" | "attachmentTooLarge" | "tooManyAttachments" | "saveDecisionFailed" | "invalidLink" | "invalidResetLink" | "invalidCredentials" | "emailTaken" | "wrongCurrentPassword" | "wrongPassword" | "soleOwner" | "unauthorized" | "forbidden" | "notFound" | "serverError" | "payloadTooLarge" | "calendarNotFound" | "teamNotFound" | "memberNotFound" | "invitationNotFound" | "invitationExpired" | "tooManyLoginAttempts" | "seriesHasDetached" | "selfInvite" | "alreadyMember" | "alreadyInvited" | "personalTeam" | "lastOwner" | "alreadyOwner" | "lastCalendar" | "tooManyColors" | "managedByHost" | "unknownTenant" | "originNotAllowed" | "invalidUserToken", string> & {
19
20
  status: Partial<Record<number, string>>;
20
21
  serverError: string;
21
22
  requestFailed: (status: number) => string;
@@ -114,6 +115,8 @@ export declare const en: {
114
115
  today: string;
115
116
  newEvent: string;
116
117
  now: (time: string) => string;
118
+ ownResponse: (status: string) => string;
119
+ todayMark: string;
117
120
  openDay: (date: string) => string;
118
121
  moreEvents: (count: number) => string;
119
122
  moreLinks: (count: number) => string;
@@ -127,6 +130,13 @@ export declare const en: {
127
130
  deleted: (title: string) => string;
128
131
  moved: (title: string) => string;
129
132
  };
133
+ filter: {
134
+ open: string;
135
+ openActive: string;
136
+ title: string;
137
+ uncategorized: string;
138
+ reset: string;
139
+ };
130
140
  search: {
131
141
  open: string;
132
142
  title: string;
@@ -156,6 +166,42 @@ export declare const en: {
156
166
  noCustomColors: string;
157
167
  removeColor: (label: string) => string;
158
168
  deleteTitle: string;
169
+ viewTitle: string;
170
+ deleteTrashHint: string;
171
+ remoteChange: {
172
+ updated: string;
173
+ deleted: string;
174
+ reload: string;
175
+ };
176
+ conflict: {
177
+ message: string;
178
+ overwrite: string;
179
+ reload: string;
180
+ };
181
+ attachments: {
182
+ title: string;
183
+ add: string;
184
+ uploading: string;
185
+ empty: string;
186
+ pendingHint: string;
187
+ hint: (count: number, size: string) => string;
188
+ download: (name: string) => string;
189
+ remove: (name: string) => string;
190
+ uploadedBy: (name: string) => string;
191
+ tooLarge: (name: string, size: string) => string;
192
+ emptyFile: (name: string) => string;
193
+ tooMany: (name: string, count: number) => string;
194
+ notUploaded: (names: string) => string;
195
+ count: (count: number) => string;
196
+ };
197
+ categories: {
198
+ label: string;
199
+ add: string;
200
+ newLabel: string;
201
+ create: string;
202
+ empty: string;
203
+ };
204
+ deleteMessage: (title: string) => string;
159
205
  deleteSeriesMessage: (title: string) => string;
160
206
  scopeTitle: string;
161
207
  scopeMessage: string;
@@ -206,6 +252,7 @@ export declare const en: {
206
252
  tabsLabel: string;
207
253
  tabs: {
208
254
  general: string;
255
+ appearance: string;
209
256
  recurrence: string;
210
257
  attendees: string;
211
258
  details: string;
@@ -257,6 +304,13 @@ export declare const en: {
257
304
  appearance: string;
258
305
  account: string;
259
306
  notifications: string;
307
+ data: string;
308
+ };
309
+ dataExport: {
310
+ title: string;
311
+ accountDescription: string;
312
+ localDescription: string;
313
+ download: string;
260
314
  };
261
315
  languageTitle: string;
262
316
  languageDescription: string;
@@ -507,6 +561,7 @@ export declare const en: {
507
561
  invitations: string;
508
562
  danger: string;
509
563
  exchange: string;
564
+ trash: string;
510
565
  };
511
566
  displayTitle: string;
512
567
  displayDescription: string;
@@ -557,6 +612,49 @@ export declare const en: {
557
612
  deleting: string;
558
613
  deleteMessage: (team: string, count: number) => string;
559
614
  };
615
+ categories: {
616
+ title: string;
617
+ description: string;
618
+ empty: string;
619
+ nameLabel: string;
620
+ newLabel: string;
621
+ add: string;
622
+ rename: string;
623
+ remove: (name: string) => string;
624
+ };
625
+ trash: {
626
+ title: string;
627
+ description: string;
628
+ empty: string;
629
+ withDetached: (count: number) => string;
630
+ deletedBy: (name: string, date: string) => string;
631
+ deletedAt: (date: string) => string;
632
+ expires: (date: string) => string;
633
+ search: string;
634
+ searchPlaceholder: string;
635
+ noResults: string;
636
+ showMore: (shown: number, total: number) => string;
637
+ restore: string;
638
+ deleteForever: string;
639
+ deleteForeverLabel: (title: string) => string;
640
+ confirmTitle: string;
641
+ confirmDelete: (title: string) => string;
642
+ };
643
+ share: {
644
+ title: string;
645
+ description: string;
646
+ label: string;
647
+ pathLabel: string;
648
+ create: string;
649
+ copy: string;
650
+ copied: string;
651
+ open: string;
652
+ warning: string;
653
+ renew: string;
654
+ remove: string;
655
+ readOnly: string;
656
+ notFound: string;
657
+ };
560
658
  feed: {
561
659
  title: string;
562
660
  description: string;
@@ -6,6 +6,13 @@ export declare const settings: {
6
6
  appearance: string;
7
7
  account: string;
8
8
  notifications: string;
9
+ data: string;
10
+ };
11
+ dataExport: {
12
+ title: string;
13
+ accountDescription: string;
14
+ localDescription: string;
15
+ download: string;
9
16
  };
10
17
  languageTitle: string;
11
18
  languageDescription: string;
@@ -4,6 +4,7 @@ export type { DeepPartial, MessageOverrides, Messages, PartialMessages } from '.
4
4
  export declare const getLoadedMessages: (language: Language) => {
5
5
  common: {
6
6
  loading: string;
7
+ configError: string;
7
8
  close: string;
8
9
  cancel: string;
9
10
  save: string;
@@ -18,7 +19,7 @@ export declare const getLoadedMessages: (language: Language) => {
18
19
  next: string;
19
20
  back: string;
20
21
  };
21
- errors: Record<"unknown" | "eventNotFound" | "accountRequired" | "saveEventsFailed" | "savePreferencesFailed" | "saveColorFailed" | "saveDecisionFailed" | "invalidLink" | "invalidResetLink" | "invalidCredentials" | "emailTaken" | "wrongCurrentPassword" | "wrongPassword" | "soleOwner" | "unauthorized" | "forbidden" | "notFound" | "serverError" | "payloadTooLarge" | "calendarNotFound" | "teamNotFound" | "memberNotFound" | "invitationNotFound" | "invitationExpired" | "tooManyLoginAttempts" | "seriesHasDetached" | "selfInvite" | "alreadyMember" | "alreadyInvited" | "personalTeam" | "lastOwner" | "alreadyOwner" | "lastCalendar" | "tooManyColors" | "managedByHost" | "unknownTenant" | "originNotAllowed" | "invalidUserToken", string> & {
22
+ errors: Record<"unknown" | "eventNotFound" | "accountRequired" | "saveEventsFailed" | "savePreferencesFailed" | "saveColorFailed" | "saveCategoriesFailed" | "categoryExists" | "tooManyCategories" | "categoryNotFound" | "shareNotFound" | "attachmentNotFound" | "eventChanged" | "seriesDeleted" | "attachmentTooLarge" | "tooManyAttachments" | "saveDecisionFailed" | "invalidLink" | "invalidResetLink" | "invalidCredentials" | "emailTaken" | "wrongCurrentPassword" | "wrongPassword" | "soleOwner" | "unauthorized" | "forbidden" | "notFound" | "serverError" | "payloadTooLarge" | "calendarNotFound" | "teamNotFound" | "memberNotFound" | "invitationNotFound" | "invitationExpired" | "tooManyLoginAttempts" | "seriesHasDetached" | "selfInvite" | "alreadyMember" | "alreadyInvited" | "personalTeam" | "lastOwner" | "alreadyOwner" | "lastCalendar" | "tooManyColors" | "managedByHost" | "unknownTenant" | "originNotAllowed" | "invalidUserToken", string> & {
22
23
  status: Partial<Record<number, string>>;
23
24
  serverError: string;
24
25
  requestFailed: (status: number) => string;
@@ -117,6 +118,8 @@ export declare const getLoadedMessages: (language: Language) => {
117
118
  today: string;
118
119
  newEvent: string;
119
120
  now: (time: string) => string;
121
+ ownResponse: (status: string) => string;
122
+ todayMark: string;
120
123
  openDay: (date: string) => string;
121
124
  moreEvents: (count: number) => string;
122
125
  moreLinks: (count: number) => string;
@@ -130,6 +133,13 @@ export declare const getLoadedMessages: (language: Language) => {
130
133
  deleted: (title: string) => string;
131
134
  moved: (title: string) => string;
132
135
  };
136
+ filter: {
137
+ open: string;
138
+ openActive: string;
139
+ title: string;
140
+ uncategorized: string;
141
+ reset: string;
142
+ };
133
143
  search: {
134
144
  open: string;
135
145
  title: string;
@@ -159,6 +169,42 @@ export declare const getLoadedMessages: (language: Language) => {
159
169
  noCustomColors: string;
160
170
  removeColor: (label: string) => string;
161
171
  deleteTitle: string;
172
+ viewTitle: string;
173
+ deleteTrashHint: string;
174
+ remoteChange: {
175
+ updated: string;
176
+ deleted: string;
177
+ reload: string;
178
+ };
179
+ conflict: {
180
+ message: string;
181
+ overwrite: string;
182
+ reload: string;
183
+ };
184
+ attachments: {
185
+ title: string;
186
+ add: string;
187
+ uploading: string;
188
+ empty: string;
189
+ pendingHint: string;
190
+ hint: (count: number, size: string) => string;
191
+ download: (name: string) => string;
192
+ remove: (name: string) => string;
193
+ uploadedBy: (name: string) => string;
194
+ tooLarge: (name: string, size: string) => string;
195
+ emptyFile: (name: string) => string;
196
+ tooMany: (name: string, count: number) => string;
197
+ notUploaded: (names: string) => string;
198
+ count: (count: number) => string;
199
+ };
200
+ categories: {
201
+ label: string;
202
+ add: string;
203
+ newLabel: string;
204
+ create: string;
205
+ empty: string;
206
+ };
207
+ deleteMessage: (title: string) => string;
162
208
  deleteSeriesMessage: (title: string) => string;
163
209
  scopeTitle: string;
164
210
  scopeMessage: string;
@@ -209,6 +255,7 @@ export declare const getLoadedMessages: (language: Language) => {
209
255
  tabsLabel: string;
210
256
  tabs: {
211
257
  general: string;
258
+ appearance: string;
212
259
  recurrence: string;
213
260
  attendees: string;
214
261
  details: string;
@@ -260,6 +307,13 @@ export declare const getLoadedMessages: (language: Language) => {
260
307
  appearance: string;
261
308
  account: string;
262
309
  notifications: string;
310
+ data: string;
311
+ };
312
+ dataExport: {
313
+ title: string;
314
+ accountDescription: string;
315
+ localDescription: string;
316
+ download: string;
263
317
  };
264
318
  languageTitle: string;
265
319
  languageDescription: string;
@@ -510,6 +564,7 @@ export declare const getLoadedMessages: (language: Language) => {
510
564
  invitations: string;
511
565
  danger: string;
512
566
  exchange: string;
567
+ trash: string;
513
568
  };
514
569
  displayTitle: string;
515
570
  displayDescription: string;
@@ -560,6 +615,49 @@ export declare const getLoadedMessages: (language: Language) => {
560
615
  deleting: string;
561
616
  deleteMessage: (team: string, count: number) => string;
562
617
  };
618
+ categories: {
619
+ title: string;
620
+ description: string;
621
+ empty: string;
622
+ nameLabel: string;
623
+ newLabel: string;
624
+ add: string;
625
+ rename: string;
626
+ remove: (name: string) => string;
627
+ };
628
+ trash: {
629
+ title: string;
630
+ description: string;
631
+ empty: string;
632
+ withDetached: (count: number) => string;
633
+ deletedBy: (name: string, date: string) => string;
634
+ deletedAt: (date: string) => string;
635
+ expires: (date: string) => string;
636
+ search: string;
637
+ searchPlaceholder: string;
638
+ noResults: string;
639
+ showMore: (shown: number, total: number) => string;
640
+ restore: string;
641
+ deleteForever: string;
642
+ deleteForeverLabel: (title: string) => string;
643
+ confirmTitle: string;
644
+ confirmDelete: (title: string) => string;
645
+ };
646
+ share: {
647
+ title: string;
648
+ description: string;
649
+ label: string;
650
+ pathLabel: string;
651
+ create: string;
652
+ copy: string;
653
+ copied: string;
654
+ open: string;
655
+ warning: string;
656
+ renew: string;
657
+ remove: string;
658
+ readOnly: string;
659
+ notFound: string;
660
+ };
563
661
  feed: {
564
662
  title: string;
565
663
  description: string;
@@ -1,2 +1,2 @@
1
1
  import { type CalendarProps } from './config.js';
2
- export declare function CalendarWidget({ dataSource: providedDataSource, tenant, getUserToken, storageMode, apiBaseUrl, apiTimeoutMs, features, routing, basename, initialPath, linkParam, locale, messages, theme, initialView, timeZone, holidays, holidaySource, mapUrl, onEventCreate, onEventUpdate, onEventDelete, className, style, }: CalendarProps): import("react").JSX.Element;
2
+ export declare function CalendarWidget({ config, dataSource, getUserToken, onEventCreate, onEventUpdate, onEventDelete, onViewChange, ref, className, style, ...direct }: CalendarProps): import("react").JSX.Element;
@@ -1,9 +1,11 @@
1
1
  import { type CSSProperties, type ReactNode } from 'react';
2
+ import type { CalendarAppearance } from './options.js';
2
3
  type IsolatedRootProps = {
3
4
  className?: string;
4
5
  style?: CSSProperties;
5
6
  autoFocus?: boolean;
7
+ appearance?: CalendarAppearance;
6
8
  children: ReactNode;
7
9
  };
8
- export declare function IsolatedRoot({ className, style, autoFocus, children }: IsolatedRootProps): import("react").JSX.Element;
10
+ export declare function IsolatedRoot({ className, style, autoFocus, appearance, children }: IsolatedRootProps): import("react").JSX.Element;
9
11
  export {};
@@ -0,0 +1,3 @@
1
+ import { type CalendarAppearance } from './options.js';
2
+ export declare const getReadableTextColor: (color: string) => "#222222" | "#ffffff" | null;
3
+ export declare const getAppearanceVariables: ({ accentColor, fontFamily, radius }: CalendarAppearance) => Record<string, string>;
@@ -1,35 +1,24 @@
1
- import type { MessageOverrides } from '../i18n/index.js';
2
- import type { CSSProperties } from 'react';
1
+ import type { CSSProperties, Ref } from 'react';
2
+ import type { CalendarState } from '../context/HostBridge.js';
3
3
  import type { CalendarDataSource } from '../data/index.js';
4
- import type { HostTheme } from '../context/HostContext.js';
5
4
  import type { UserTokenProvider } from '../features/authorization/index.js';
6
- import type { CalendarView } from '../utils/calendarView.js';
7
5
  import type { EventCallbacks } from './eventCallbacks.js';
8
- import type { CalendarFeatures, HolidaySource, StorageMode } from './defaults.js';
9
- export { DEFAULT_CONFIG, STORAGE_MODES } from './defaults.js';
10
- export { HOLIDAY_SOURCES } from './defaults.js';
11
- export type { CalendarFeatures, HolidaySource, StorageMode } from './defaults.js';
12
- export type CalendarRouting = 'memory' | 'browser';
13
- export type CalendarProps = EventCallbacks & {
6
+ import type { CalendarHandle } from './handle.js';
7
+ import type { CalendarOptions } from './options.js';
8
+ import type { CalendarConfigSource } from './useCalendarOptions.js';
9
+ export { DEFAULT_CONFIG, DEFAULT_FEATURES, FEATURE_NAMES, HOLIDAY_SOURCES, STORAGE_MODES } from './defaults.js';
10
+ export type { CalendarFeature, CalendarFeatures, HolidaySource, StorageMode } from './defaults.js';
11
+ export { DENSITIES, HOST_THEMES, OPTION_NAMES, ROUTING_MODES, parseCalendarOptions } from './options.js';
12
+ export type { CalendarAppearance, CalendarOptions, CalendarRouting, ParsedOptions } from './options.js';
13
+ export type { CalendarConfigSource } from './useCalendarOptions.js';
14
+ export type { CalendarHandle } from './handle.js';
15
+ export type { CalendarState, NewEventDraft } from '../context/HostBridge.js';
16
+ export type CalendarProps = EventCallbacks & CalendarOptions & {
17
+ config?: CalendarConfigSource;
18
+ ref?: Ref<CalendarHandle>;
19
+ onViewChange?: (state: CalendarState) => void;
14
20
  dataSource?: CalendarDataSource;
15
- tenant?: string;
16
21
  getUserToken?: UserTokenProvider;
17
- storageMode?: StorageMode;
18
- apiBaseUrl?: string;
19
- apiTimeoutMs?: number;
20
- features?: Partial<CalendarFeatures>;
21
- routing?: CalendarRouting;
22
- basename?: string;
23
- initialPath?: string;
24
- linkParam?: string | false;
25
- locale?: string;
26
- messages?: MessageOverrides;
27
- theme?: HostTheme;
28
- initialView?: CalendarView;
29
- timeZone?: string;
30
- holidays?: string;
31
- holidaySource?: HolidaySource;
32
- mapUrl?: string;
33
22
  className?: string;
34
23
  style?: CSSProperties;
35
24
  };