@rokoyfa/calendar 1.2.1 → 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 (137) hide show
  1. package/CHANGELOG.md +14 -0
  2. package/DEVELOPER_GUIDE.md +312 -10
  3. package/README.md +2 -0
  4. package/api/openapi.yaml +395 -4
  5. package/demo/calendar.config.jsonc +35 -1
  6. package/demo/calendar.config.yaml +34 -0
  7. package/dist-lib/cdn/calendar-widget.js +14 -12
  8. package/dist-lib/cdn/calendar-widget.js.map +1 -1
  9. package/dist-lib/cdn/de-Dqga3QZG.js +2 -0
  10. package/dist-lib/cdn/de-Dqga3QZG.js.map +1 -0
  11. package/dist-lib/cdn/es-BWSfTMjh.js +2 -0
  12. package/dist-lib/cdn/es-BWSfTMjh.js.map +1 -0
  13. package/dist-lib/cdn/fr-N9gwLjVq.js +2 -0
  14. package/dist-lib/cdn/fr-N9gwLjVq.js.map +1 -0
  15. package/dist-lib/cdn/it-B5Ib2xLn.js +2 -0
  16. package/dist-lib/cdn/it-B5Ib2xLn.js.map +1 -0
  17. package/dist-lib/cdn/nl-CjI7Uc8l.js +2 -0
  18. package/dist-lib/cdn/nl-CjI7Uc8l.js.map +1 -0
  19. package/dist-lib/cdn/pl-FRu3yQhc.js +2 -0
  20. package/dist-lib/cdn/pl-FRu3yQhc.js.map +1 -0
  21. package/dist-lib/cdn/pt-DBKJ-3Is.js +2 -0
  22. package/dist-lib/cdn/pt-DBKJ-3Is.js.map +1 -0
  23. package/dist-lib/npm/{de-lDO0Tv9y.js → de-DhWrY8Ae.js} +109 -3
  24. package/dist-lib/npm/de-DhWrY8Ae.js.map +1 -0
  25. package/dist-lib/npm/{es-Cy3Mmj9C.js → es-Bj8leuD5.js} +109 -3
  26. package/dist-lib/npm/es-Bj8leuD5.js.map +1 -0
  27. package/dist-lib/npm/{fr-Ci0ZM0nG.js → fr-DzAFZ0jh.js} +109 -3
  28. package/dist-lib/npm/fr-DzAFZ0jh.js.map +1 -0
  29. package/dist-lib/npm/index.js +3309 -1148
  30. package/dist-lib/npm/index.js.map +1 -1
  31. package/dist-lib/npm/{it-BiTHjgzI.js → it-lEmGP5yo.js} +109 -3
  32. package/dist-lib/npm/it-lEmGP5yo.js.map +1 -0
  33. package/dist-lib/npm/{nl-DZTwpAwV.js → nl-d1h63dvm.js} +109 -3
  34. package/dist-lib/npm/nl-d1h63dvm.js.map +1 -0
  35. package/dist-lib/npm/{pl-DeWLtyMR.js → pl-DynFKadb.js} +109 -3
  36. package/dist-lib/npm/pl-DynFKadb.js.map +1 -0
  37. package/dist-lib/npm/{pt-CaqSW5TJ.js → pt-foL7jDsE.js} +109 -3
  38. package/dist-lib/npm/pt-foL7jDsE.js.map +1 -0
  39. package/dist-lib/npm/types/components/Icons.d.ts +2 -0
  40. package/dist-lib/npm/types/config/routes.d.ts +1 -0
  41. package/dist-lib/npm/types/context/HostBridge.d.ts +38 -0
  42. package/dist-lib/npm/types/context/HostContext.d.ts +15 -0
  43. package/dist-lib/npm/types/data/restDataSource.d.ts +2 -1
  44. package/dist-lib/npm/types/data/tenantDataSource.d.ts +2 -1
  45. package/dist-lib/npm/types/data/types.d.ts +4 -1
  46. package/dist-lib/npm/types/features/attachments/components/AttachmentsField.d.ts +8 -0
  47. package/dist-lib/npm/types/features/attachments/hooks/useAttachments.d.ts +11 -0
  48. package/dist-lib/npm/types/features/attachments/index.d.ts +2 -0
  49. package/dist-lib/npm/types/features/authorization/components/account/DataExportSection.d.ts +1 -0
  50. package/dist-lib/npm/types/features/authorization/hooks/useAuth.d.ts +1 -0
  51. package/dist-lib/npm/types/features/authorization/index.d.ts +1 -0
  52. package/dist-lib/npm/types/features/authorization/repositories/HostTokenAuthRepository.d.ts +1 -0
  53. package/dist-lib/npm/types/features/authorization/repositories/RemoteAuthRepository.d.ts +1 -0
  54. package/dist-lib/npm/types/features/authorization/types/auth.d.ts +2 -0
  55. package/dist-lib/npm/types/features/calendar/components/Calendar.d.ts +7 -1
  56. package/dist-lib/npm/types/features/calendar/components/CalendarHeader.d.ts +3 -1
  57. package/dist-lib/npm/types/features/calendar/hooks/useEventNavigation.d.ts +4 -0
  58. package/dist-lib/npm/types/features/calendar/hooks/useHostController.d.ts +2 -0
  59. package/dist-lib/npm/types/features/calendar/hooks/useLiveEvents.d.ts +11 -0
  60. package/dist-lib/npm/types/features/calendar/hooks/useSegmentAttributes.d.ts +2 -0
  61. package/dist-lib/npm/types/features/calendar/utils/eventLabels.d.ts +4 -0
  62. package/dist-lib/npm/types/features/calendars/components/settings/ShareSection.d.ts +4 -0
  63. package/dist-lib/npm/types/features/calendars/components/settings/TrashSection.d.ts +4 -0
  64. package/dist-lib/npm/types/features/calendars/index.d.ts +1 -1
  65. package/dist-lib/npm/types/features/calendars/repositories/RemoteCalendarRepository.d.ts +3 -0
  66. package/dist-lib/npm/types/features/calendars/types/calendar.d.ts +3 -0
  67. package/dist-lib/npm/types/features/calendars/utils/permissions.d.ts +4 -0
  68. package/dist-lib/npm/types/features/categories/components/CategoriesSection.d.ts +6 -0
  69. package/dist-lib/npm/types/features/categories/components/CategoryField.d.ts +9 -0
  70. package/dist-lib/npm/types/features/categories/components/CategoryFilterModal.d.ts +10 -0
  71. package/dist-lib/npm/types/features/categories/hooks/useCategories.d.ts +9 -0
  72. package/dist-lib/npm/types/features/categories/index.d.ts +4 -0
  73. package/dist-lib/npm/types/features/events/components/DeleteEventModal.d.ts +2 -1
  74. package/dist-lib/npm/types/features/events/components/EventModal.d.ts +11 -3
  75. package/dist-lib/npm/types/features/events/hooks/useEvents.d.ts +4 -1
  76. package/dist-lib/npm/types/features/events/index.d.ts +2 -2
  77. package/dist-lib/npm/types/features/events/utils/icalExchange.d.ts +4 -1
  78. package/dist-lib/npm/types/features/storage/index.d.ts +6 -1
  79. package/dist-lib/npm/types/features/storage/repositories/LocalCategoryRepository.d.ts +14 -0
  80. package/dist-lib/npm/types/features/storage/repositories/LocalEventRepository.d.ts +8 -2
  81. package/dist-lib/npm/types/features/storage/repositories/RemoteAttachmentRepository.d.ts +11 -0
  82. package/dist-lib/npm/types/features/storage/repositories/RemoteCategoryRepository.d.ts +10 -0
  83. package/dist-lib/npm/types/features/storage/repositories/RemoteChatRepository.d.ts +2 -1
  84. package/dist-lib/npm/types/features/storage/repositories/RemoteEventRepository.d.ts +9 -3
  85. package/dist-lib/npm/types/features/storage/repositories/RemoteSharedCalendarRepository.d.ts +9 -0
  86. package/dist-lib/npm/types/features/storage/types/storage.d.ts +30 -2
  87. package/dist-lib/npm/types/features/storage/utils/liveSocket.d.ts +10 -0
  88. package/dist-lib/npm/types/i18n/messages/en/calendar.d.ts +9 -0
  89. package/dist-lib/npm/types/i18n/messages/en/calendars.d.ts +44 -0
  90. package/dist-lib/npm/types/i18n/messages/en/events.d.ts +36 -0
  91. package/dist-lib/npm/types/i18n/messages/en/index.d.ts +97 -1
  92. package/dist-lib/npm/types/i18n/messages/en/settings.d.ts +7 -0
  93. package/dist-lib/npm/types/i18n/messages/index.d.ts +97 -1
  94. package/dist-lib/npm/types/lib/CalendarWidget.d.ts +1 -1
  95. package/dist-lib/npm/types/lib/IsolatedRoot.d.ts +3 -1
  96. package/dist-lib/npm/types/lib/appearance.d.ts +3 -0
  97. package/dist-lib/npm/types/lib/config.d.ts +9 -3
  98. package/dist-lib/npm/types/lib/defaults.d.ts +6 -0
  99. package/dist-lib/npm/types/lib/element.d.ts +11 -1
  100. package/dist-lib/npm/types/lib/handle.d.ts +15 -0
  101. package/dist-lib/npm/types/lib/index.d.ts +4 -2
  102. package/dist-lib/npm/types/lib/options.d.ts +12 -0
  103. package/dist-lib/npm/types/pages/SharedCalendarPage.d.ts +1 -0
  104. package/dist-lib/npm/types/utils/api.d.ts +1 -0
  105. package/dist-lib/npm/types/utils/appError.d.ts +1 -1
  106. package/dist-lib/npm/types/utils/attachment.d.ts +31 -0
  107. package/dist-lib/npm/types/utils/category.d.ts +18 -0
  108. package/dist-lib/npm/types/utils/conflict.d.ts +1 -0
  109. package/dist-lib/npm/types/utils/dataExport.d.ts +13 -0
  110. package/dist-lib/npm/types/utils/event.d.ts +6 -1
  111. package/dist-lib/npm/types/utils/eventChange.d.ts +13 -0
  112. package/dist-lib/npm/types/utils/ical.d.ts +6 -1
  113. package/dist-lib/npm/types/utils/sharedCalendar.d.ts +13 -0
  114. package/dist-lib/npm/types/utils/trash.d.ts +14 -0
  115. package/package.json +1 -1
  116. package/schema/calendar-config.schema.json +65 -0
  117. package/dist-lib/cdn/de-CjkGEfiE.js +0 -2
  118. package/dist-lib/cdn/de-CjkGEfiE.js.map +0 -1
  119. package/dist-lib/cdn/es-BrMRh6bn.js +0 -2
  120. package/dist-lib/cdn/es-BrMRh6bn.js.map +0 -1
  121. package/dist-lib/cdn/fr-Ckr8Uxxd.js +0 -2
  122. package/dist-lib/cdn/fr-Ckr8Uxxd.js.map +0 -1
  123. package/dist-lib/cdn/it-_2BGklYa.js +0 -2
  124. package/dist-lib/cdn/it-_2BGklYa.js.map +0 -1
  125. package/dist-lib/cdn/nl-BykoYBK7.js +0 -2
  126. package/dist-lib/cdn/nl-BykoYBK7.js.map +0 -1
  127. package/dist-lib/cdn/pl-as7f_-F8.js +0 -2
  128. package/dist-lib/cdn/pl-as7f_-F8.js.map +0 -1
  129. package/dist-lib/cdn/pt-BWJIdrI6.js +0 -2
  130. package/dist-lib/cdn/pt-BWJIdrI6.js.map +0 -1
  131. package/dist-lib/npm/de-lDO0Tv9y.js.map +0 -1
  132. package/dist-lib/npm/es-Cy3Mmj9C.js.map +0 -1
  133. package/dist-lib/npm/fr-Ci0ZM0nG.js.map +0 -1
  134. package/dist-lib/npm/it-BiTHjgzI.js.map +0 -1
  135. package/dist-lib/npm/nl-DZTwpAwV.js.map +0 -1
  136. package/dist-lib/npm/pl-DeWLtyMR.js.map +0 -1
  137. package/dist-lib/npm/pt-CaqSW5TJ.js.map +0 -1
@@ -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;
@@ -18,6 +18,41 @@ 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
+ };
21
56
  deleteMessage: (title: string) => string;
22
57
  deleteSeriesMessage: (title: string) => string;
23
58
  scopeTitle: string;
@@ -69,6 +104,7 @@ export declare const events: {
69
104
  tabsLabel: string;
70
105
  tabs: {
71
106
  general: string;
107
+ appearance: string;
72
108
  recurrence: string;
73
109
  attendees: string;
74
110
  details: string;
@@ -16,7 +16,7 @@ export declare const en: {
16
16
  next: string;
17
17
  back: string;
18
18
  };
19
- 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> & {
20
20
  status: Partial<Record<number, string>>;
21
21
  serverError: string;
22
22
  requestFailed: (status: number) => string;
@@ -115,6 +115,8 @@ export declare const en: {
115
115
  today: string;
116
116
  newEvent: string;
117
117
  now: (time: string) => string;
118
+ ownResponse: (status: string) => string;
119
+ todayMark: string;
118
120
  openDay: (date: string) => string;
119
121
  moreEvents: (count: number) => string;
120
122
  moreLinks: (count: number) => string;
@@ -128,6 +130,13 @@ export declare const en: {
128
130
  deleted: (title: string) => string;
129
131
  moved: (title: string) => string;
130
132
  };
133
+ filter: {
134
+ open: string;
135
+ openActive: string;
136
+ title: string;
137
+ uncategorized: string;
138
+ reset: string;
139
+ };
131
140
  search: {
132
141
  open: string;
133
142
  title: string;
@@ -157,6 +166,41 @@ export declare const en: {
157
166
  noCustomColors: string;
158
167
  removeColor: (label: string) => string;
159
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
+ };
160
204
  deleteMessage: (title: string) => string;
161
205
  deleteSeriesMessage: (title: string) => string;
162
206
  scopeTitle: string;
@@ -208,6 +252,7 @@ export declare const en: {
208
252
  tabsLabel: string;
209
253
  tabs: {
210
254
  general: string;
255
+ appearance: string;
211
256
  recurrence: string;
212
257
  attendees: string;
213
258
  details: string;
@@ -259,6 +304,13 @@ export declare const en: {
259
304
  appearance: string;
260
305
  account: string;
261
306
  notifications: string;
307
+ data: string;
308
+ };
309
+ dataExport: {
310
+ title: string;
311
+ accountDescription: string;
312
+ localDescription: string;
313
+ download: string;
262
314
  };
263
315
  languageTitle: string;
264
316
  languageDescription: string;
@@ -509,6 +561,7 @@ export declare const en: {
509
561
  invitations: string;
510
562
  danger: string;
511
563
  exchange: string;
564
+ trash: string;
512
565
  };
513
566
  displayTitle: string;
514
567
  displayDescription: string;
@@ -559,6 +612,49 @@ export declare const en: {
559
612
  deleting: string;
560
613
  deleteMessage: (team: string, count: number) => string;
561
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
+ };
562
658
  feed: {
563
659
  title: string;
564
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;
@@ -19,7 +19,7 @@ export declare const getLoadedMessages: (language: Language) => {
19
19
  next: string;
20
20
  back: string;
21
21
  };
22
- 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> & {
23
23
  status: Partial<Record<number, string>>;
24
24
  serverError: string;
25
25
  requestFailed: (status: number) => string;
@@ -118,6 +118,8 @@ export declare const getLoadedMessages: (language: Language) => {
118
118
  today: string;
119
119
  newEvent: string;
120
120
  now: (time: string) => string;
121
+ ownResponse: (status: string) => string;
122
+ todayMark: string;
121
123
  openDay: (date: string) => string;
122
124
  moreEvents: (count: number) => string;
123
125
  moreLinks: (count: number) => string;
@@ -131,6 +133,13 @@ export declare const getLoadedMessages: (language: Language) => {
131
133
  deleted: (title: string) => string;
132
134
  moved: (title: string) => string;
133
135
  };
136
+ filter: {
137
+ open: string;
138
+ openActive: string;
139
+ title: string;
140
+ uncategorized: string;
141
+ reset: string;
142
+ };
134
143
  search: {
135
144
  open: string;
136
145
  title: string;
@@ -160,6 +169,41 @@ export declare const getLoadedMessages: (language: Language) => {
160
169
  noCustomColors: string;
161
170
  removeColor: (label: string) => string;
162
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
+ };
163
207
  deleteMessage: (title: string) => string;
164
208
  deleteSeriesMessage: (title: string) => string;
165
209
  scopeTitle: string;
@@ -211,6 +255,7 @@ export declare const getLoadedMessages: (language: Language) => {
211
255
  tabsLabel: string;
212
256
  tabs: {
213
257
  general: string;
258
+ appearance: string;
214
259
  recurrence: string;
215
260
  attendees: string;
216
261
  details: string;
@@ -262,6 +307,13 @@ export declare const getLoadedMessages: (language: Language) => {
262
307
  appearance: string;
263
308
  account: string;
264
309
  notifications: string;
310
+ data: string;
311
+ };
312
+ dataExport: {
313
+ title: string;
314
+ accountDescription: string;
315
+ localDescription: string;
316
+ download: string;
265
317
  };
266
318
  languageTitle: string;
267
319
  languageDescription: string;
@@ -512,6 +564,7 @@ export declare const getLoadedMessages: (language: Language) => {
512
564
  invitations: string;
513
565
  danger: string;
514
566
  exchange: string;
567
+ trash: string;
515
568
  };
516
569
  displayTitle: string;
517
570
  displayDescription: string;
@@ -562,6 +615,49 @@ export declare const getLoadedMessages: (language: Language) => {
562
615
  deleting: string;
563
616
  deleteMessage: (team: string, count: number) => string;
564
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
+ };
565
661
  feed: {
566
662
  title: string;
567
663
  description: string;
@@ -1,2 +1,2 @@
1
1
  import { type CalendarProps } from './config.js';
2
- export declare function CalendarWidget({ config, dataSource, getUserToken, onEventCreate, onEventUpdate, onEventDelete, className, style, ...direct }: 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,16 +1,22 @@
1
- import type { CSSProperties } from 'react';
1
+ import type { CSSProperties, Ref } from 'react';
2
+ import type { CalendarState } from '../context/HostBridge.js';
2
3
  import type { CalendarDataSource } from '../data/index.js';
3
4
  import type { UserTokenProvider } from '../features/authorization/index.js';
4
5
  import type { EventCallbacks } from './eventCallbacks.js';
6
+ import type { CalendarHandle } from './handle.js';
5
7
  import type { CalendarOptions } from './options.js';
6
8
  import type { CalendarConfigSource } from './useCalendarOptions.js';
7
9
  export { DEFAULT_CONFIG, DEFAULT_FEATURES, FEATURE_NAMES, HOLIDAY_SOURCES, STORAGE_MODES } from './defaults.js';
8
10
  export type { CalendarFeature, CalendarFeatures, HolidaySource, StorageMode } from './defaults.js';
9
- export { HOST_THEMES, OPTION_NAMES, ROUTING_MODES, parseCalendarOptions } from './options.js';
10
- export type { CalendarOptions, CalendarRouting, ParsedOptions } from './options.js';
11
+ export { DENSITIES, HOST_THEMES, OPTION_NAMES, ROUTING_MODES, parseCalendarOptions } from './options.js';
12
+ export type { CalendarAppearance, CalendarOptions, CalendarRouting, ParsedOptions } from './options.js';
11
13
  export type { CalendarConfigSource } from './useCalendarOptions.js';
14
+ export type { CalendarHandle } from './handle.js';
15
+ export type { CalendarState, NewEventDraft } from '../context/HostBridge.js';
12
16
  export type CalendarProps = EventCallbacks & CalendarOptions & {
13
17
  config?: CalendarConfigSource;
18
+ ref?: Ref<CalendarHandle>;
19
+ onViewChange?: (state: CalendarState) => void;
14
20
  dataSource?: CalendarDataSource;
15
21
  getUserToken?: UserTokenProvider;
16
22
  className?: string;
@@ -22,6 +22,12 @@ export declare const DEFAULT_FEATURES: {
22
22
  emailNotifications: boolean;
23
23
  timeZones: boolean;
24
24
  customColors: boolean;
25
+ categories: boolean;
26
+ publicLinks: boolean;
27
+ attachments: boolean;
28
+ liveUpdates: boolean;
29
+ trash: boolean;
30
+ dataExport: boolean;
25
31
  };
26
32
  export type CalendarFeatures = typeof DEFAULT_FEATURES;
27
33
  export type CalendarFeature = keyof CalendarFeatures;
@@ -1,6 +1,7 @@
1
1
  import type { CalendarDataSource } from '../data/index.js';
2
2
  import type { UserTokenProvider } from '../features/authorization/index.js';
3
- import { type CalendarConfigSource, type CalendarFeature } from './config.js';
3
+ import { type CalendarView } from '../utils/calendarView.js';
4
+ import { type CalendarConfigSource, type CalendarFeature, type CalendarState, type NewEventDraft } from './config.js';
4
5
  import type { MessageOverrides } from '../i18n/index.js';
5
6
  export declare const DEFAULT_ELEMENT_NAME = "calendar-widget";
6
7
  export declare const toFeatureAttribute: (feature: CalendarFeature) => string;
@@ -19,5 +20,14 @@ export declare class CalendarElement extends HTMLElement {
19
20
  connectedCallback(): void;
20
21
  disconnectedCallback(): void;
21
22
  attributeChangedCallback(): void;
23
+ getState(): CalendarState | null;
24
+ goToDate(date: string | Date): boolean;
25
+ setView(view: CalendarView): boolean;
26
+ next(): boolean;
27
+ previous(): boolean;
28
+ today(): boolean;
29
+ openEvent(eventId: string, date: string | Date): boolean;
30
+ createEvent(draft?: NewEventDraft): boolean;
31
+ refresh(): boolean;
22
32
  }
23
33
  export declare function defineCalendarElement(name?: string): void;
@@ -0,0 +1,15 @@
1
+ import type { CalendarState, HostBridge, NewEventDraft } from '../context/HostBridge.js';
2
+ import { type CalendarView } from '../utils/calendarView.js';
3
+ export type CalendarHandle = {
4
+ getState: () => CalendarState | null;
5
+ goToDate: (date: string | Date) => boolean;
6
+ setView: (view: CalendarView) => boolean;
7
+ next: () => boolean;
8
+ previous: () => boolean;
9
+ today: () => boolean;
10
+ openEvent: (eventId: string, date: string | Date) => boolean;
11
+ createEvent: (draft?: NewEventDraft) => boolean;
12
+ refresh: () => boolean;
13
+ };
14
+ export declare const HANDLE_METHODS: readonly ["getState", "goToDate", "setView", "next", "previous", "today", "openEvent", "createEvent", "refresh"];
15
+ export declare const createCalendarHandle: (bridge: HostBridge) => CalendarHandle;
@@ -2,7 +2,7 @@ export { CalendarWidget as Calendar } from './CalendarWidget.js';
2
2
  export { VERSION } from './version.js';
3
3
  export { CalendarElement, DEFAULT_ELEMENT_NAME, defineCalendarElement } from './element.js';
4
4
  export { DEFAULT_FEATURES, FEATURE_NAMES, parseCalendarOptions } from './config.js';
5
- export type { CalendarConfigSource, CalendarFeature, CalendarFeatures, CalendarOptions, CalendarProps, CalendarRouting, HolidaySource, ParsedOptions, StorageMode, } from './config.js';
5
+ export type { CalendarAppearance, CalendarConfigSource, CalendarHandle, CalendarState, NewEventDraft, CalendarFeature, CalendarFeatures, CalendarOptions, CalendarProps, CalendarRouting, HolidaySource, ParsedOptions, StorageMode, } from './config.js';
6
6
  export type { DeletedEvent, EventCallbacks } from './eventCallbacks.js';
7
7
  export type { HostTheme } from '../context/HostContext.js';
8
8
  export type { CalendarView } from '../utils/calendarView.js';
@@ -11,9 +11,11 @@ export { localDataSource, restDataSource, TENANT_HEADER, tenantDataSource } from
11
11
  export type { CalendarDataSource, DataRepositories, DataSession, DataSourceContext, RestDataSourceOptions, TenantDataSourceOptions, } from '../data/index.js';
12
12
  export type { AuthMethod, AuthRepository, User, UserTokenProvider } from '../features/authorization/index.js';
13
13
  export type { CalendarChanges, CalendarDraft, CalendarRepository, CalendarSummary, Invitation, PendingInvitation, TeamChanges, TeamInvitation, TeamMember, TeamRole, } from '../features/calendars/index.js';
14
- export type { ChatRepository, ColorRepository, EventQuery, EventRepository, EventSearchQuery, HolidayQuery, HolidayRepository, PreferencesRepository, } from '../features/storage/index.js';
14
+ export type { CategoryRepository, ChatRepository, SharedCalendarRepository, ColorRepository, EventQuery, EventRepository, EventSearchQuery, HolidayQuery, HolidayRepository, PreferencesRepository, } from '../features/storage/index.js';
15
15
  export type { Attendee, AttendeeStatus, CalendarEvent, EventInput, EventLink } from '../utils/event.js';
16
16
  export type { ChatEvent, ChatKey, ChatMessage, ChatPage, ChatUnread } from '../utils/chat.js';
17
+ export type { Category } from '../utils/category.js';
18
+ export type { SharedCalendar } from '../utils/sharedCalendar.js';
17
19
  export type { Preferences } from '../utils/preferences.js';
18
20
  export type { PublicHoliday } from '../utils/holidays.js';
19
21
  export type { Recurrence } from '../utils/recurrence.js';