@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.
- package/CHANGELOG.md +30 -0
- package/DEVELOPER_GUIDE.md +743 -0
- package/README.md +39 -108
- package/api/openapi.yaml +359 -3
- package/demo/calendar.config.jsonc +149 -0
- package/demo/calendar.config.yaml +146 -0
- package/dist-lib/cdn/browser-BSbYkIQu.js +130 -0
- package/dist-lib/cdn/browser-BSbYkIQu.js.map +1 -0
- package/dist-lib/cdn/calendar-widget.js +12 -7
- package/dist-lib/cdn/calendar-widget.js.map +1 -1
- package/dist-lib/cdn/de-CjkGEfiE.js +2 -0
- package/dist-lib/cdn/de-CjkGEfiE.js.map +1 -0
- package/dist-lib/cdn/es-BrMRh6bn.js +2 -0
- package/dist-lib/cdn/es-BrMRh6bn.js.map +1 -0
- package/dist-lib/cdn/fr-Ckr8Uxxd.js +2 -0
- package/dist-lib/cdn/fr-Ckr8Uxxd.js.map +1 -0
- package/dist-lib/cdn/it-_2BGklYa.js +2 -0
- package/dist-lib/cdn/it-_2BGklYa.js.map +1 -0
- package/dist-lib/cdn/nl-BykoYBK7.js +2 -0
- package/dist-lib/cdn/nl-BykoYBK7.js.map +1 -0
- package/dist-lib/cdn/pl-as7f_-F8.js +2 -0
- package/dist-lib/cdn/pl-as7f_-F8.js.map +1 -0
- package/dist-lib/cdn/pt-BWJIdrI6.js +2 -0
- package/dist-lib/cdn/pt-BWJIdrI6.js.map +1 -0
- package/dist-lib/cdn/rolldown-runtime-CrjiCqGf.js +1 -0
- package/dist-lib/cdn/src-l8Q4aJRr.js +12 -0
- package/dist-lib/cdn/src-l8Q4aJRr.js.map +1 -0
- package/dist-lib/npm/{de-CCzGjeTd.js → de-lDO0Tv9y.js} +135 -8
- package/dist-lib/npm/de-lDO0Tv9y.js.map +1 -0
- package/dist-lib/npm/{es-Ciaf66rH.js → es-Cy3Mmj9C.js} +135 -8
- package/dist-lib/npm/es-Cy3Mmj9C.js.map +1 -0
- package/dist-lib/npm/{fr-CAqNm10Z.js → fr-Ci0ZM0nG.js} +135 -8
- package/dist-lib/npm/fr-Ci0ZM0nG.js.map +1 -0
- package/dist-lib/npm/index.js +6012 -2564
- package/dist-lib/npm/index.js.map +1 -1
- package/dist-lib/npm/{it-Cqqdu2ua.js → it-BiTHjgzI.js} +135 -8
- package/dist-lib/npm/it-BiTHjgzI.js.map +1 -0
- package/dist-lib/npm/{nl-CkchSA8q.js → nl-DZTwpAwV.js} +135 -8
- package/dist-lib/npm/nl-DZTwpAwV.js.map +1 -0
- package/dist-lib/npm/{pl-CCBDUr8k.js → pl-DeWLtyMR.js} +135 -8
- package/dist-lib/npm/pl-DeWLtyMR.js.map +1 -0
- package/dist-lib/npm/{pt-DucaCaoY.js → pt-CaqSW5TJ.js} +135 -8
- package/dist-lib/npm/pt-CaqSW5TJ.js.map +1 -0
- package/dist-lib/npm/types/components/Button.d.ts +1 -1
- package/dist-lib/npm/types/components/Icons.d.ts +5 -0
- package/dist-lib/npm/types/components/SegmentedControl.d.ts +2 -2
- package/dist-lib/npm/types/components/SegmentedField.d.ts +2 -11
- package/dist-lib/npm/types/components/StatusMessage.d.ts +0 -1
- package/dist-lib/npm/types/components/Tabs.d.ts +3 -1
- package/dist-lib/npm/types/config/routes.d.ts +1 -1
- package/dist-lib/npm/types/context/HostContext.d.ts +26 -3
- package/dist-lib/npm/types/context/TimeZoneContext.d.ts +3 -0
- package/dist-lib/npm/types/data/restDataSource.d.ts +5 -1
- package/dist-lib/npm/types/data/tenantDataSource.d.ts +4 -1
- package/dist-lib/npm/types/data/types.d.ts +3 -1
- package/dist-lib/npm/types/features/authorization/hooks/useAuth.d.ts +2 -1
- package/dist-lib/npm/types/features/authorization/hooks/useRedirectTarget.d.ts +4 -0
- package/dist-lib/npm/types/features/authorization/index.d.ts +1 -1
- package/dist-lib/npm/types/features/authorization/repositories/HostTokenAuthRepository.d.ts +2 -0
- package/dist-lib/npm/types/features/authorization/repositories/RemoteAuthRepository.d.ts +2 -0
- package/dist-lib/npm/types/features/authorization/types/auth.d.ts +3 -0
- package/dist-lib/npm/types/features/calendar/components/Calendar.d.ts +14 -1
- package/dist-lib/npm/types/features/calendar/components/CalendarHeader.d.ts +2 -1
- package/dist-lib/npm/types/features/calendar/components/DayColumn.d.ts +2 -1
- package/dist-lib/npm/types/features/calendar/components/EventLinks.d.ts +7 -0
- package/dist-lib/npm/types/features/calendar/components/EventLocation.d.ts +3 -0
- package/dist-lib/npm/types/features/calendar/components/EventSearchModal.d.ts +9 -0
- package/dist-lib/npm/types/features/calendar/components/EventTitle.d.ts +2 -1
- package/dist-lib/npm/types/features/calendar/components/MiniMonth.d.ts +2 -1
- package/dist-lib/npm/types/features/calendar/components/UndoNotice.d.ts +7 -0
- package/dist-lib/npm/types/features/calendar/constants/views.d.ts +4 -1
- package/dist-lib/npm/types/features/calendar/context/CurrentUserContext.d.ts +3 -0
- package/dist-lib/npm/types/features/calendar/context/HolidaysContext.d.ts +4 -0
- package/dist-lib/npm/types/features/calendar/hooks/useAttendeeCandidates.d.ts +3 -0
- package/dist-lib/npm/types/features/calendar/hooks/useEventDrag.d.ts +1 -1
- package/dist-lib/npm/types/features/calendar/hooks/useEventSearch.d.ts +7 -0
- package/dist-lib/npm/types/features/calendar/hooks/useEventSource.d.ts +2 -1
- package/dist-lib/npm/types/features/calendar/hooks/usePressDrag.d.ts +23 -0
- package/dist-lib/npm/types/features/calendar/hooks/useSegmentAttributes.d.ts +15 -0
- package/dist-lib/npm/types/features/calendar/hooks/useSlotSelection.d.ts +1 -4
- package/dist-lib/npm/types/features/calendar/index.d.ts +1 -2
- package/dist-lib/npm/types/features/calendar/types/editor.d.ts +3 -0
- package/dist-lib/npm/types/features/calendar/types/view.d.ts +1 -1
- package/dist-lib/npm/types/features/calendar/utils/eventDrag.d.ts +0 -1
- package/dist-lib/npm/types/features/calendar/utils/eventLabels.d.ts +0 -3
- package/dist-lib/npm/types/features/calendar/utils/search.d.ts +11 -0
- package/dist-lib/npm/types/features/calendars/components/ShowInPersonalSwitch.d.ts +4 -0
- package/dist-lib/npm/types/features/calendars/components/settings/ExchangeSection.d.ts +4 -0
- package/dist-lib/npm/types/features/calendars/components/settings/SubscribeSection.d.ts +4 -0
- package/dist-lib/npm/types/features/calendars/context/CalendarsProvider.d.ts +2 -1
- package/dist-lib/npm/types/features/calendars/index.d.ts +2 -2
- package/dist-lib/npm/types/features/calendars/repositories/LocalCalendarRepository.d.ts +12 -1
- package/dist-lib/npm/types/features/calendars/repositories/RemoteCalendarRepository.d.ts +3 -0
- package/dist-lib/npm/types/features/calendars/types/calendar.d.ts +5 -1
- package/dist-lib/npm/types/features/calendars/utils/activeCalendarStorage.d.ts +2 -0
- package/dist-lib/npm/types/features/calendars/utils/permissions.d.ts +1 -2
- package/dist-lib/npm/types/features/chat/components/ChatPanel.d.ts +8 -0
- package/dist-lib/npm/types/features/chat/components/ChatProvider.d.ts +13 -0
- package/dist-lib/npm/types/features/chat/components/UnreadBadge.d.ts +4 -0
- package/dist-lib/npm/types/features/chat/context/ChatContext.d.ts +14 -0
- package/dist-lib/npm/types/features/chat/hooks/useChatMessages.d.ts +13 -0
- package/dist-lib/npm/types/features/chat/hooks/useChatUnread.d.ts +7 -0
- package/dist-lib/npm/types/features/chat/index.d.ts +4 -0
- package/dist-lib/npm/types/features/chat/utils/time.d.ts +2 -0
- package/dist-lib/npm/types/features/events/components/AttendeesField.d.ts +15 -0
- package/dist-lib/npm/types/features/events/components/EventModal.d.ts +19 -3
- package/dist-lib/npm/types/features/events/components/LinksField.d.ts +8 -0
- package/dist-lib/npm/types/features/events/components/ReminderField.d.ts +6 -0
- package/dist-lib/npm/types/features/events/hooks/useEvents.d.ts +6 -3
- package/dist-lib/npm/types/features/events/index.d.ts +3 -1
- package/dist-lib/npm/types/features/events/utils/icalExchange.d.ts +11 -0
- package/dist-lib/npm/types/features/events/utils/undo.d.ts +7 -0
- package/dist-lib/npm/types/features/holidays/components/HolidaySettings.d.ts +1 -0
- package/dist-lib/npm/types/features/holidays/hooks/useHolidays.d.ts +3 -0
- package/dist-lib/npm/types/features/holidays/index.d.ts +2 -0
- package/dist-lib/npm/types/features/holidays/utils/holidayLibrary.d.ts +8 -0
- package/dist-lib/npm/types/features/preferences/components/NotificationSettings.d.ts +3 -0
- package/dist-lib/npm/types/features/preferences/index.d.ts +1 -0
- package/dist-lib/npm/types/features/reminders/ReminderNotices.d.ts +1 -0
- package/dist-lib/npm/types/features/reminders/useReminders.d.ts +2 -0
- package/dist-lib/npm/types/features/storage/hooks/useStorage.d.ts +1 -2
- package/dist-lib/npm/types/features/storage/index.d.ts +4 -2
- package/dist-lib/npm/types/features/storage/repositories/LocalEventRepository.d.ts +2 -1
- package/dist-lib/npm/types/features/storage/repositories/RemoteChatRepository.d.ts +18 -0
- package/dist-lib/npm/types/features/storage/repositories/RemoteEventRepository.d.ts +5 -2
- package/dist-lib/npm/types/features/storage/repositories/RemoteHolidayRepository.d.ts +7 -0
- package/dist-lib/npm/types/features/storage/types/storage.d.ts +30 -2
- package/dist-lib/npm/types/hooks/useDebouncedValue.d.ts +1 -0
- package/dist-lib/npm/types/hooks/useForm.d.ts +5 -0
- package/dist-lib/npm/types/hooks/useFormState.d.ts +5 -0
- package/dist-lib/npm/types/hooks/useKeyboardShortcuts.d.ts +3 -0
- package/dist-lib/npm/types/hooks/useLocationUrl.d.ts +1 -0
- package/dist-lib/npm/types/i18n/format.d.ts +1 -0
- package/dist-lib/npm/types/i18n/index.d.ts +0 -1
- package/dist-lib/npm/types/i18n/locale.d.ts +0 -2
- package/dist-lib/npm/types/i18n/messages/en/calendar.d.ts +17 -0
- package/dist-lib/npm/types/i18n/messages/en/calendars.d.ts +25 -0
- package/dist-lib/npm/types/i18n/messages/en/core.d.ts +3 -0
- package/dist-lib/npm/types/i18n/messages/en/events.d.ts +64 -3
- package/dist-lib/npm/types/i18n/messages/en/index.d.ts +130 -3
- package/dist-lib/npm/types/i18n/messages/en/settings.d.ts +21 -0
- package/dist-lib/npm/types/i18n/messages/index.d.ts +130 -3
- package/dist-lib/npm/types/lib/CalendarWidget.d.ts +1 -1
- package/dist-lib/npm/types/lib/config.d.ts +9 -22
- package/dist-lib/npm/types/lib/configFile.d.ts +6 -0
- package/dist-lib/npm/types/lib/defaults.d.ts +25 -1
- package/dist-lib/npm/types/lib/element.d.ts +5 -1
- package/dist-lib/npm/types/lib/index.d.ts +6 -3
- package/dist-lib/npm/types/lib/options.d.ts +35 -0
- package/dist-lib/npm/types/lib/useCalendarOptions.d.ts +11 -0
- package/dist-lib/npm/types/pages/RespondPage.d.ts +1 -0
- package/dist-lib/npm/types/utils/api.d.ts +4 -5
- package/dist-lib/npm/types/utils/apiError.d.ts +0 -2
- package/dist-lib/npm/types/utils/appError.d.ts +2 -1
- package/dist-lib/npm/types/utils/calendarView.d.ts +1 -0
- package/dist-lib/npm/types/utils/chat.d.ts +44 -0
- package/dist-lib/npm/types/utils/color.d.ts +0 -1
- package/dist-lib/npm/types/utils/date.d.ts +0 -6
- package/dist-lib/npm/types/utils/event.d.ts +41 -5
- package/dist-lib/npm/types/utils/holidays.d.ts +18 -0
- package/dist-lib/npm/types/utils/ical.d.ts +11 -0
- package/dist-lib/npm/types/utils/location.d.ts +4 -0
- package/dist-lib/npm/types/utils/notifications.d.ts +3 -0
- package/dist-lib/npm/types/utils/preferences.d.ts +7 -1
- package/dist-lib/npm/types/utils/recurrence.d.ts +3 -4
- package/dist-lib/npm/types/utils/reminders.d.ts +13 -0
- package/dist-lib/npm/types/utils/timeZone.d.ts +1 -1
- package/package.json +10 -1
- package/schema/calendar-config.schema.json +232 -0
- package/dist-lib/cdn/de-BPZBZXaZ.js +0 -2
- package/dist-lib/cdn/de-BPZBZXaZ.js.map +0 -1
- package/dist-lib/cdn/es-DsIckdik.js +0 -2
- package/dist-lib/cdn/es-DsIckdik.js.map +0 -1
- package/dist-lib/cdn/fr-DWAs3O6J.js +0 -2
- package/dist-lib/cdn/fr-DWAs3O6J.js.map +0 -1
- package/dist-lib/cdn/it-CbhjxqIb.js +0 -2
- package/dist-lib/cdn/it-CbhjxqIb.js.map +0 -1
- package/dist-lib/cdn/nl-mjTHznX5.js +0 -2
- package/dist-lib/cdn/nl-mjTHznX5.js.map +0 -1
- package/dist-lib/cdn/pl-CXT0jb2D.js +0 -2
- package/dist-lib/cdn/pl-CXT0jb2D.js.map +0 -1
- package/dist-lib/cdn/pt-D0oXlVdU.js +0 -2
- package/dist-lib/cdn/pt-D0oXlVdU.js.map +0 -1
- package/dist-lib/npm/de-CCzGjeTd.js.map +0 -1
- package/dist-lib/npm/es-Ciaf66rH.js.map +0 -1
- package/dist-lib/npm/fr-CAqNm10Z.js.map +0 -1
- package/dist-lib/npm/it-Cqqdu2ua.js.map +0 -1
- package/dist-lib/npm/nl-CkchSA8q.js.map +0 -1
- package/dist-lib/npm/pl-CCBDUr8k.js.map +0 -1
- package/dist-lib/npm/pt-DucaCaoY.js.map +0 -1
- package/dist-lib/npm/types/hooks/useArrowKeyNavigation.d.ts +0 -6
|
@@ -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;
|
|
@@ -37,6 +38,8 @@ export declare const en: {
|
|
|
37
38
|
weekdaysRequired: string;
|
|
38
39
|
dateInvalid: string;
|
|
39
40
|
untilBeforeStart: string;
|
|
41
|
+
locationTooLong: (max: number) => string;
|
|
42
|
+
linkInvalid: string;
|
|
40
43
|
};
|
|
41
44
|
colors: {
|
|
42
45
|
blue: string;
|
|
@@ -114,8 +117,25 @@ export declare const en: {
|
|
|
114
117
|
now: (time: string) => string;
|
|
115
118
|
openDay: (date: string) => string;
|
|
116
119
|
moreEvents: (count: number) => string;
|
|
120
|
+
moreLinks: (count: number) => string;
|
|
121
|
+
holiday: (name: string) => string;
|
|
117
122
|
fromCalendar: (name: string) => string;
|
|
118
123
|
sharedEventNotice: (source: string) => string;
|
|
124
|
+
dismiss: string;
|
|
125
|
+
undo: {
|
|
126
|
+
action: string;
|
|
127
|
+
ctrlZ: string;
|
|
128
|
+
deleted: (title: string) => string;
|
|
129
|
+
moved: (title: string) => string;
|
|
130
|
+
};
|
|
131
|
+
search: {
|
|
132
|
+
open: string;
|
|
133
|
+
title: string;
|
|
134
|
+
placeholder: string;
|
|
135
|
+
hint: string;
|
|
136
|
+
empty: string;
|
|
137
|
+
searching: string;
|
|
138
|
+
};
|
|
119
139
|
};
|
|
120
140
|
events: {
|
|
121
141
|
createTitle: string;
|
|
@@ -137,10 +157,8 @@ export declare const en: {
|
|
|
137
157
|
noCustomColors: string;
|
|
138
158
|
removeColor: (label: string) => string;
|
|
139
159
|
deleteTitle: string;
|
|
140
|
-
deleteSeriesMessage: (title: string) => string;
|
|
141
160
|
deleteMessage: (title: string) => string;
|
|
142
|
-
|
|
143
|
-
no: string;
|
|
161
|
+
deleteSeriesMessage: (title: string) => string;
|
|
144
162
|
scopeTitle: string;
|
|
145
163
|
scopeMessage: string;
|
|
146
164
|
scopes: {
|
|
@@ -162,6 +180,69 @@ export declare const en: {
|
|
|
162
180
|
one: string;
|
|
163
181
|
many: string;
|
|
164
182
|
};
|
|
183
|
+
location: string;
|
|
184
|
+
reminder: string;
|
|
185
|
+
noReminder: string;
|
|
186
|
+
reminderAtStart: string;
|
|
187
|
+
reminderBefore: (duration: string) => string;
|
|
188
|
+
reminderDue: (title: string, time: string) => string;
|
|
189
|
+
reminderBlocked: string;
|
|
190
|
+
attendees: string;
|
|
191
|
+
addAttendee: string;
|
|
192
|
+
inviteAll: (count: number) => string;
|
|
193
|
+
removeAttendee: (name: string) => string;
|
|
194
|
+
allMembersInvited: string;
|
|
195
|
+
attendeeStatus: {
|
|
196
|
+
needsAction: string;
|
|
197
|
+
accepted: string;
|
|
198
|
+
tentative: string;
|
|
199
|
+
declined: string;
|
|
200
|
+
};
|
|
201
|
+
yourResponse: string;
|
|
202
|
+
respond: {
|
|
203
|
+
accepted: string;
|
|
204
|
+
tentative: string;
|
|
205
|
+
declined: string;
|
|
206
|
+
};
|
|
207
|
+
attendeeSummary: (accepted: number, total: number) => string;
|
|
208
|
+
tabsLabel: string;
|
|
209
|
+
tabs: {
|
|
210
|
+
general: string;
|
|
211
|
+
recurrence: string;
|
|
212
|
+
attendees: string;
|
|
213
|
+
details: string;
|
|
214
|
+
};
|
|
215
|
+
links: string;
|
|
216
|
+
addLink: string;
|
|
217
|
+
linkUrl: string;
|
|
218
|
+
linkLabel: string;
|
|
219
|
+
openLink: (name: string) => string;
|
|
220
|
+
removeLink: (name: string) => string;
|
|
221
|
+
openMap: (location: string) => string;
|
|
222
|
+
chat: {
|
|
223
|
+
tab: string;
|
|
224
|
+
empty: string;
|
|
225
|
+
placeholder: string;
|
|
226
|
+
send: string;
|
|
227
|
+
sendHint: string;
|
|
228
|
+
edit: string;
|
|
229
|
+
edited: string;
|
|
230
|
+
confirmDelete: string;
|
|
231
|
+
loadOlder: string;
|
|
232
|
+
unread: (count: number) => string;
|
|
233
|
+
offline: string;
|
|
234
|
+
you: string;
|
|
235
|
+
removedAuthor: string;
|
|
236
|
+
};
|
|
237
|
+
duplicate: string;
|
|
238
|
+
duplicateNotice: (title: string) => string;
|
|
239
|
+
respondPage: {
|
|
240
|
+
title: string;
|
|
241
|
+
sending: string;
|
|
242
|
+
incompleteLink: string;
|
|
243
|
+
recurring: string;
|
|
244
|
+
saved: (status: string) => string;
|
|
245
|
+
};
|
|
165
246
|
};
|
|
166
247
|
storage: {
|
|
167
248
|
importTitle: string;
|
|
@@ -177,11 +258,32 @@ export declare const en: {
|
|
|
177
258
|
invitations: string;
|
|
178
259
|
appearance: string;
|
|
179
260
|
account: string;
|
|
261
|
+
notifications: string;
|
|
180
262
|
};
|
|
181
263
|
languageTitle: string;
|
|
182
264
|
languageDescription: string;
|
|
183
265
|
languageLabel: string;
|
|
184
266
|
languageAuto: string;
|
|
267
|
+
timeZoneTitle: string;
|
|
268
|
+
timeZoneDescription: string;
|
|
269
|
+
timeZoneLabel: string;
|
|
270
|
+
timeZoneAuto: (zone: string) => string;
|
|
271
|
+
holidaysTitle: string;
|
|
272
|
+
holidaysDescription: string;
|
|
273
|
+
holidaysCountry: string;
|
|
274
|
+
holidaysRegion: string;
|
|
275
|
+
holidaysAuto: (name: string) => string;
|
|
276
|
+
holidaysOff: string;
|
|
277
|
+
holidaysWholeCountry: string;
|
|
278
|
+
notifications: {
|
|
279
|
+
title: string;
|
|
280
|
+
description: string;
|
|
281
|
+
unverified: string;
|
|
282
|
+
emailInvites: string;
|
|
283
|
+
emailChanges: string;
|
|
284
|
+
emailReminders: string;
|
|
285
|
+
emailChat: string;
|
|
286
|
+
};
|
|
185
287
|
themeTitle: string;
|
|
186
288
|
themeLabel: string;
|
|
187
289
|
startViewTitle: string;
|
|
@@ -406,6 +508,7 @@ export declare const en: {
|
|
|
406
508
|
members: string;
|
|
407
509
|
invitations: string;
|
|
408
510
|
danger: string;
|
|
511
|
+
exchange: string;
|
|
409
512
|
};
|
|
410
513
|
displayTitle: string;
|
|
411
514
|
displayDescription: string;
|
|
@@ -456,6 +559,30 @@ export declare const en: {
|
|
|
456
559
|
deleting: string;
|
|
457
560
|
deleteMessage: (team: string, count: number) => string;
|
|
458
561
|
};
|
|
562
|
+
feed: {
|
|
563
|
+
title: string;
|
|
564
|
+
description: string;
|
|
565
|
+
label: string;
|
|
566
|
+
create: string;
|
|
567
|
+
copy: string;
|
|
568
|
+
copied: string;
|
|
569
|
+
openApp: string;
|
|
570
|
+
warning: string;
|
|
571
|
+
renew: string;
|
|
572
|
+
remove: string;
|
|
573
|
+
};
|
|
574
|
+
ical: {
|
|
575
|
+
title: string;
|
|
576
|
+
description: string;
|
|
577
|
+
exportLabel: string;
|
|
578
|
+
exporting: string;
|
|
579
|
+
importLabel: string;
|
|
580
|
+
importing: string;
|
|
581
|
+
imported: (created: number, updated: number) => string;
|
|
582
|
+
skipped: (count: number) => string;
|
|
583
|
+
importFailed: string;
|
|
584
|
+
noEvents: string;
|
|
585
|
+
};
|
|
459
586
|
transfer: {
|
|
460
587
|
title: string;
|
|
461
588
|
search: string;
|
|
@@ -5,11 +5,32 @@ export declare const settings: {
|
|
|
5
5
|
invitations: string;
|
|
6
6
|
appearance: string;
|
|
7
7
|
account: string;
|
|
8
|
+
notifications: string;
|
|
8
9
|
};
|
|
9
10
|
languageTitle: string;
|
|
10
11
|
languageDescription: string;
|
|
11
12
|
languageLabel: string;
|
|
12
13
|
languageAuto: string;
|
|
14
|
+
timeZoneTitle: string;
|
|
15
|
+
timeZoneDescription: string;
|
|
16
|
+
timeZoneLabel: string;
|
|
17
|
+
timeZoneAuto: (zone: string) => string;
|
|
18
|
+
holidaysTitle: string;
|
|
19
|
+
holidaysDescription: string;
|
|
20
|
+
holidaysCountry: string;
|
|
21
|
+
holidaysRegion: string;
|
|
22
|
+
holidaysAuto: (name: string) => string;
|
|
23
|
+
holidaysOff: string;
|
|
24
|
+
holidaysWholeCountry: string;
|
|
25
|
+
notifications: {
|
|
26
|
+
title: string;
|
|
27
|
+
description: string;
|
|
28
|
+
unverified: string;
|
|
29
|
+
emailInvites: string;
|
|
30
|
+
emailChanges: string;
|
|
31
|
+
emailReminders: string;
|
|
32
|
+
emailChat: string;
|
|
33
|
+
};
|
|
13
34
|
themeTitle: string;
|
|
14
35
|
themeLabel: string;
|
|
15
36
|
startViewTitle: 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;
|
|
@@ -40,6 +41,8 @@ export declare const getLoadedMessages: (language: Language) => {
|
|
|
40
41
|
weekdaysRequired: string;
|
|
41
42
|
dateInvalid: string;
|
|
42
43
|
untilBeforeStart: string;
|
|
44
|
+
locationTooLong: (max: number) => string;
|
|
45
|
+
linkInvalid: string;
|
|
43
46
|
};
|
|
44
47
|
colors: {
|
|
45
48
|
blue: string;
|
|
@@ -117,8 +120,25 @@ export declare const getLoadedMessages: (language: Language) => {
|
|
|
117
120
|
now: (time: string) => string;
|
|
118
121
|
openDay: (date: string) => string;
|
|
119
122
|
moreEvents: (count: number) => string;
|
|
123
|
+
moreLinks: (count: number) => string;
|
|
124
|
+
holiday: (name: string) => string;
|
|
120
125
|
fromCalendar: (name: string) => string;
|
|
121
126
|
sharedEventNotice: (source: string) => string;
|
|
127
|
+
dismiss: string;
|
|
128
|
+
undo: {
|
|
129
|
+
action: string;
|
|
130
|
+
ctrlZ: string;
|
|
131
|
+
deleted: (title: string) => string;
|
|
132
|
+
moved: (title: string) => string;
|
|
133
|
+
};
|
|
134
|
+
search: {
|
|
135
|
+
open: string;
|
|
136
|
+
title: string;
|
|
137
|
+
placeholder: string;
|
|
138
|
+
hint: string;
|
|
139
|
+
empty: string;
|
|
140
|
+
searching: string;
|
|
141
|
+
};
|
|
122
142
|
};
|
|
123
143
|
events: {
|
|
124
144
|
createTitle: string;
|
|
@@ -140,10 +160,8 @@ export declare const getLoadedMessages: (language: Language) => {
|
|
|
140
160
|
noCustomColors: string;
|
|
141
161
|
removeColor: (label: string) => string;
|
|
142
162
|
deleteTitle: string;
|
|
143
|
-
deleteSeriesMessage: (title: string) => string;
|
|
144
163
|
deleteMessage: (title: string) => string;
|
|
145
|
-
|
|
146
|
-
no: string;
|
|
164
|
+
deleteSeriesMessage: (title: string) => string;
|
|
147
165
|
scopeTitle: string;
|
|
148
166
|
scopeMessage: string;
|
|
149
167
|
scopes: {
|
|
@@ -165,6 +183,69 @@ export declare const getLoadedMessages: (language: Language) => {
|
|
|
165
183
|
one: string;
|
|
166
184
|
many: string;
|
|
167
185
|
};
|
|
186
|
+
location: string;
|
|
187
|
+
reminder: string;
|
|
188
|
+
noReminder: string;
|
|
189
|
+
reminderAtStart: string;
|
|
190
|
+
reminderBefore: (duration: string) => string;
|
|
191
|
+
reminderDue: (title: string, time: string) => string;
|
|
192
|
+
reminderBlocked: string;
|
|
193
|
+
attendees: string;
|
|
194
|
+
addAttendee: string;
|
|
195
|
+
inviteAll: (count: number) => string;
|
|
196
|
+
removeAttendee: (name: string) => string;
|
|
197
|
+
allMembersInvited: string;
|
|
198
|
+
attendeeStatus: {
|
|
199
|
+
needsAction: string;
|
|
200
|
+
accepted: string;
|
|
201
|
+
tentative: string;
|
|
202
|
+
declined: string;
|
|
203
|
+
};
|
|
204
|
+
yourResponse: string;
|
|
205
|
+
respond: {
|
|
206
|
+
accepted: string;
|
|
207
|
+
tentative: string;
|
|
208
|
+
declined: string;
|
|
209
|
+
};
|
|
210
|
+
attendeeSummary: (accepted: number, total: number) => string;
|
|
211
|
+
tabsLabel: string;
|
|
212
|
+
tabs: {
|
|
213
|
+
general: string;
|
|
214
|
+
recurrence: string;
|
|
215
|
+
attendees: string;
|
|
216
|
+
details: string;
|
|
217
|
+
};
|
|
218
|
+
links: string;
|
|
219
|
+
addLink: string;
|
|
220
|
+
linkUrl: string;
|
|
221
|
+
linkLabel: string;
|
|
222
|
+
openLink: (name: string) => string;
|
|
223
|
+
removeLink: (name: string) => string;
|
|
224
|
+
openMap: (location: string) => string;
|
|
225
|
+
chat: {
|
|
226
|
+
tab: string;
|
|
227
|
+
empty: string;
|
|
228
|
+
placeholder: string;
|
|
229
|
+
send: string;
|
|
230
|
+
sendHint: string;
|
|
231
|
+
edit: string;
|
|
232
|
+
edited: string;
|
|
233
|
+
confirmDelete: string;
|
|
234
|
+
loadOlder: string;
|
|
235
|
+
unread: (count: number) => string;
|
|
236
|
+
offline: string;
|
|
237
|
+
you: string;
|
|
238
|
+
removedAuthor: string;
|
|
239
|
+
};
|
|
240
|
+
duplicate: string;
|
|
241
|
+
duplicateNotice: (title: string) => string;
|
|
242
|
+
respondPage: {
|
|
243
|
+
title: string;
|
|
244
|
+
sending: string;
|
|
245
|
+
incompleteLink: string;
|
|
246
|
+
recurring: string;
|
|
247
|
+
saved: (status: string) => string;
|
|
248
|
+
};
|
|
168
249
|
};
|
|
169
250
|
storage: {
|
|
170
251
|
importTitle: string;
|
|
@@ -180,11 +261,32 @@ export declare const getLoadedMessages: (language: Language) => {
|
|
|
180
261
|
invitations: string;
|
|
181
262
|
appearance: string;
|
|
182
263
|
account: string;
|
|
264
|
+
notifications: string;
|
|
183
265
|
};
|
|
184
266
|
languageTitle: string;
|
|
185
267
|
languageDescription: string;
|
|
186
268
|
languageLabel: string;
|
|
187
269
|
languageAuto: string;
|
|
270
|
+
timeZoneTitle: string;
|
|
271
|
+
timeZoneDescription: string;
|
|
272
|
+
timeZoneLabel: string;
|
|
273
|
+
timeZoneAuto: (zone: string) => string;
|
|
274
|
+
holidaysTitle: string;
|
|
275
|
+
holidaysDescription: string;
|
|
276
|
+
holidaysCountry: string;
|
|
277
|
+
holidaysRegion: string;
|
|
278
|
+
holidaysAuto: (name: string) => string;
|
|
279
|
+
holidaysOff: string;
|
|
280
|
+
holidaysWholeCountry: string;
|
|
281
|
+
notifications: {
|
|
282
|
+
title: string;
|
|
283
|
+
description: string;
|
|
284
|
+
unverified: string;
|
|
285
|
+
emailInvites: string;
|
|
286
|
+
emailChanges: string;
|
|
287
|
+
emailReminders: string;
|
|
288
|
+
emailChat: string;
|
|
289
|
+
};
|
|
188
290
|
themeTitle: string;
|
|
189
291
|
themeLabel: string;
|
|
190
292
|
startViewTitle: string;
|
|
@@ -409,6 +511,7 @@ export declare const getLoadedMessages: (language: Language) => {
|
|
|
409
511
|
members: string;
|
|
410
512
|
invitations: string;
|
|
411
513
|
danger: string;
|
|
514
|
+
exchange: string;
|
|
412
515
|
};
|
|
413
516
|
displayTitle: string;
|
|
414
517
|
displayDescription: string;
|
|
@@ -459,6 +562,30 @@ export declare const getLoadedMessages: (language: Language) => {
|
|
|
459
562
|
deleting: string;
|
|
460
563
|
deleteMessage: (team: string, count: number) => string;
|
|
461
564
|
};
|
|
565
|
+
feed: {
|
|
566
|
+
title: string;
|
|
567
|
+
description: string;
|
|
568
|
+
label: string;
|
|
569
|
+
create: string;
|
|
570
|
+
copy: string;
|
|
571
|
+
copied: string;
|
|
572
|
+
openApp: string;
|
|
573
|
+
warning: string;
|
|
574
|
+
renew: string;
|
|
575
|
+
remove: string;
|
|
576
|
+
};
|
|
577
|
+
ical: {
|
|
578
|
+
title: string;
|
|
579
|
+
description: string;
|
|
580
|
+
exportLabel: string;
|
|
581
|
+
exporting: string;
|
|
582
|
+
importLabel: string;
|
|
583
|
+
importing: string;
|
|
584
|
+
imported: (created: number, updated: number) => string;
|
|
585
|
+
skipped: (count: number) => string;
|
|
586
|
+
importFailed: string;
|
|
587
|
+
noEvents: string;
|
|
588
|
+
};
|
|
462
589
|
transfer: {
|
|
463
590
|
title: string;
|
|
464
591
|
search: string;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { type CalendarProps } from './config.js';
|
|
2
|
-
export declare function CalendarWidget({
|
|
2
|
+
export declare function CalendarWidget({ config, dataSource, getUserToken, onEventCreate, onEventUpdate, onEventDelete, className, style, ...direct }: CalendarProps): import("react").JSX.Element;
|
|
@@ -1,31 +1,18 @@
|
|
|
1
|
-
import type { MessageOverrides } from '../i18n/index.js';
|
|
2
1
|
import type { CSSProperties } from 'react';
|
|
3
2
|
import type { CalendarDataSource } from '../data/index.js';
|
|
4
|
-
import type { HostTheme } from '../context/HostContext.js';
|
|
5
3
|
import type { UserTokenProvider } from '../features/authorization/index.js';
|
|
6
|
-
import type { CalendarView } from '../utils/calendarView.js';
|
|
7
4
|
import type { EventCallbacks } from './eventCallbacks.js';
|
|
8
|
-
import type {
|
|
9
|
-
|
|
10
|
-
export
|
|
11
|
-
export type
|
|
12
|
-
export
|
|
5
|
+
import type { CalendarOptions } from './options.js';
|
|
6
|
+
import type { CalendarConfigSource } from './useCalendarOptions.js';
|
|
7
|
+
export { DEFAULT_CONFIG, DEFAULT_FEATURES, FEATURE_NAMES, HOLIDAY_SOURCES, STORAGE_MODES } from './defaults.js';
|
|
8
|
+
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 type { CalendarConfigSource } from './useCalendarOptions.js';
|
|
12
|
+
export type CalendarProps = EventCallbacks & CalendarOptions & {
|
|
13
|
+
config?: CalendarConfigSource;
|
|
13
14
|
dataSource?: CalendarDataSource;
|
|
14
|
-
tenant?: string;
|
|
15
15
|
getUserToken?: UserTokenProvider;
|
|
16
|
-
storageMode?: StorageMode;
|
|
17
|
-
apiBaseUrl?: string;
|
|
18
|
-
apiTimeoutMs?: number;
|
|
19
|
-
features?: Partial<CalendarFeatures>;
|
|
20
|
-
routing?: CalendarRouting;
|
|
21
|
-
basename?: string;
|
|
22
|
-
initialPath?: string;
|
|
23
|
-
linkParam?: string | false;
|
|
24
|
-
locale?: string;
|
|
25
|
-
messages?: MessageOverrides;
|
|
26
|
-
theme?: HostTheme;
|
|
27
|
-
initialView?: CalendarView;
|
|
28
|
-
timeZone?: string;
|
|
29
16
|
className?: string;
|
|
30
17
|
style?: CSSProperties;
|
|
31
18
|
};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { type ParsedOptions } from './options.js';
|
|
2
|
+
export type ConfigFormat = 'json' | 'yaml';
|
|
3
|
+
export declare const getConfigFormat: (url: string, contentType: string | null) => ConfigFormat;
|
|
4
|
+
export declare const stripJsonComments: (source: string) => string;
|
|
5
|
+
export declare function parseConfigText(source: string, format: ConfigFormat): Promise<ParsedOptions>;
|
|
6
|
+
export declare function loadConfigFile(url: string, signal?: AbortSignal): Promise<ParsedOptions>;
|
|
@@ -1,9 +1,33 @@
|
|
|
1
|
+
import { type CalendarView } from '../utils/calendarView.js';
|
|
1
2
|
export declare const STORAGE_MODES: readonly ["local", "remote"];
|
|
2
3
|
export type StorageMode = (typeof STORAGE_MODES)[number];
|
|
3
|
-
export
|
|
4
|
+
export declare const HOLIDAY_SOURCES: readonly ["library", "backend"];
|
|
5
|
+
export type HolidaySource = (typeof HOLIDAY_SOURCES)[number];
|
|
6
|
+
export declare const DEFAULT_FEATURES: {
|
|
4
7
|
auth: boolean;
|
|
5
8
|
teams: boolean;
|
|
9
|
+
chat: boolean;
|
|
10
|
+
attendees: boolean;
|
|
11
|
+
recurrence: boolean;
|
|
12
|
+
reminders: boolean;
|
|
13
|
+
links: boolean;
|
|
14
|
+
mapLinks: boolean;
|
|
15
|
+
holidays: boolean;
|
|
16
|
+
search: boolean;
|
|
17
|
+
undo: boolean;
|
|
18
|
+
duplicate: boolean;
|
|
19
|
+
shortcuts: boolean;
|
|
20
|
+
subscriptions: boolean;
|
|
21
|
+
importExport: boolean;
|
|
22
|
+
emailNotifications: boolean;
|
|
23
|
+
timeZones: boolean;
|
|
24
|
+
customColors: boolean;
|
|
6
25
|
};
|
|
26
|
+
export type CalendarFeatures = typeof DEFAULT_FEATURES;
|
|
27
|
+
export type CalendarFeature = keyof CalendarFeatures;
|
|
28
|
+
export declare const FEATURE_NAMES: CalendarFeature[];
|
|
29
|
+
export declare const resolveFeatures: (features?: Partial<CalendarFeatures>) => CalendarFeatures;
|
|
30
|
+
export declare const resolveViews: (views: readonly CalendarView[] | undefined) => readonly CalendarView[];
|
|
7
31
|
export type CalendarConfig = {
|
|
8
32
|
storageMode: StorageMode;
|
|
9
33
|
apiBaseUrl: string;
|
|
@@ -1,10 +1,12 @@
|
|
|
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
4
|
import type { MessageOverrides } from '../i18n/index.js';
|
|
4
5
|
export declare const DEFAULT_ELEMENT_NAME = "calendar-widget";
|
|
6
|
+
export declare const toFeatureAttribute: (feature: CalendarFeature) => string;
|
|
5
7
|
export declare class CalendarElement extends HTMLElement {
|
|
6
8
|
#private;
|
|
7
|
-
static observedAttributes:
|
|
9
|
+
static observedAttributes: string[];
|
|
8
10
|
static readonly version: string;
|
|
9
11
|
get dataSource(): CalendarDataSource | undefined;
|
|
10
12
|
set dataSource(value: CalendarDataSource | undefined);
|
|
@@ -12,6 +14,8 @@ export declare class CalendarElement extends HTMLElement {
|
|
|
12
14
|
set getUserToken(value: UserTokenProvider | undefined);
|
|
13
15
|
get messages(): MessageOverrides | undefined;
|
|
14
16
|
set messages(value: MessageOverrides | undefined);
|
|
17
|
+
get config(): CalendarConfigSource | undefined;
|
|
18
|
+
set config(value: CalendarConfigSource | undefined);
|
|
15
19
|
connectedCallback(): void;
|
|
16
20
|
disconnectedCallback(): void;
|
|
17
21
|
attributeChangedCallback(): void;
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
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
|
-
export
|
|
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
6
|
export type { DeletedEvent, EventCallbacks } from './eventCallbacks.js';
|
|
6
7
|
export type { HostTheme } from '../context/HostContext.js';
|
|
7
8
|
export type { CalendarView } from '../utils/calendarView.js';
|
|
@@ -10,8 +11,10 @@ export { localDataSource, restDataSource, TENANT_HEADER, tenantDataSource } from
|
|
|
10
11
|
export type { CalendarDataSource, DataRepositories, DataSession, DataSourceContext, RestDataSourceOptions, TenantDataSourceOptions, } from '../data/index.js';
|
|
11
12
|
export type { AuthMethod, AuthRepository, User, UserTokenProvider } from '../features/authorization/index.js';
|
|
12
13
|
export type { CalendarChanges, CalendarDraft, CalendarRepository, CalendarSummary, Invitation, PendingInvitation, TeamChanges, TeamInvitation, TeamMember, TeamRole, } from '../features/calendars/index.js';
|
|
13
|
-
export type { ColorRepository, EventQuery, EventRepository, PreferencesRepository, } from '../features/storage/index.js';
|
|
14
|
-
export type { CalendarEvent, EventInput } from '../utils/event.js';
|
|
14
|
+
export type { ChatRepository, ColorRepository, EventQuery, EventRepository, EventSearchQuery, HolidayQuery, HolidayRepository, PreferencesRepository, } from '../features/storage/index.js';
|
|
15
|
+
export type { Attendee, AttendeeStatus, CalendarEvent, EventInput, EventLink } from '../utils/event.js';
|
|
16
|
+
export type { ChatEvent, ChatKey, ChatMessage, ChatPage, ChatUnread } from '../utils/chat.js';
|
|
15
17
|
export type { Preferences } from '../utils/preferences.js';
|
|
18
|
+
export type { PublicHoliday } from '../utils/holidays.js';
|
|
16
19
|
export type { Recurrence } from '../utils/recurrence.js';
|
|
17
20
|
export type { HexColor } from '../utils/color.js';
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import type { HostTheme } from '../context/HostContext.js';
|
|
2
|
+
import type { MessageOverrides } from '../i18n/index.js';
|
|
3
|
+
import { type CalendarView } from '../utils/calendarView.js';
|
|
4
|
+
import { type CalendarFeatures, type HolidaySource, type StorageMode } from './defaults.js';
|
|
5
|
+
export declare const ROUTING_MODES: readonly ["memory", "browser"];
|
|
6
|
+
export type CalendarRouting = (typeof ROUTING_MODES)[number];
|
|
7
|
+
export declare const HOST_THEMES: readonly ["light", "dark"];
|
|
8
|
+
export type CalendarOptions = {
|
|
9
|
+
tenant?: string;
|
|
10
|
+
storageMode?: StorageMode;
|
|
11
|
+
apiBaseUrl?: string;
|
|
12
|
+
apiTimeoutMs?: number;
|
|
13
|
+
features?: Partial<CalendarFeatures>;
|
|
14
|
+
views?: readonly CalendarView[];
|
|
15
|
+
routing?: CalendarRouting;
|
|
16
|
+
basename?: string;
|
|
17
|
+
initialPath?: string;
|
|
18
|
+
linkParam?: string | false;
|
|
19
|
+
locale?: string;
|
|
20
|
+
messages?: MessageOverrides;
|
|
21
|
+
theme?: HostTheme;
|
|
22
|
+
initialView?: CalendarView;
|
|
23
|
+
timeZone?: string;
|
|
24
|
+
holidays?: string;
|
|
25
|
+
holidaySource?: HolidaySource;
|
|
26
|
+
mapUrl?: string;
|
|
27
|
+
};
|
|
28
|
+
export type CalendarOptionName = keyof CalendarOptions;
|
|
29
|
+
export type ParsedOptions = {
|
|
30
|
+
options: CalendarOptions;
|
|
31
|
+
issues: string[];
|
|
32
|
+
};
|
|
33
|
+
export declare const OPTION_NAMES: CalendarOptionName[];
|
|
34
|
+
export declare function parseCalendarOptions(value: unknown): ParsedOptions;
|
|
35
|
+
export declare function mergeCalendarOptions(base: CalendarOptions, overrides: CalendarOptions): CalendarOptions;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { type CalendarOptions } from './options.js';
|
|
2
|
+
export type CalendarConfigSource = string | CalendarOptions;
|
|
3
|
+
export type ConfigState = {
|
|
4
|
+
status: 'ready';
|
|
5
|
+
options: CalendarOptions;
|
|
6
|
+
} | {
|
|
7
|
+
status: 'loading';
|
|
8
|
+
} | {
|
|
9
|
+
status: 'error';
|
|
10
|
+
};
|
|
11
|
+
export declare function useCalendarOptions(config: CalendarConfigSource | undefined): ConfigState;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function RespondPage(): import("react").JSX.Element;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { ApiError } from './apiError.js';
|
|
2
|
-
|
|
2
|
+
type QueryValue = string | number | boolean | null | undefined;
|
|
3
3
|
export type QueryParams = Record<string, QueryValue | readonly QueryValue[]>;
|
|
4
|
-
|
|
5
|
-
|
|
4
|
+
type HttpMethod = 'GET' | 'POST' | 'PUT' | 'PATCH' | 'DELETE';
|
|
5
|
+
type ApiRequestOptions = {
|
|
6
6
|
query?: QueryParams;
|
|
7
7
|
body?: unknown;
|
|
8
8
|
headers?: HeadersInit;
|
|
@@ -26,7 +26,6 @@ export type ApiClient = {
|
|
|
26
26
|
patch<T>(path: string, body?: unknown, options?: Omit<ApiRequestOptions, 'body'>): Promise<T>;
|
|
27
27
|
delete<T = void>(path: string, options?: Omit<ApiRequestOptions, 'body'>): Promise<T>;
|
|
28
28
|
};
|
|
29
|
-
export declare const buildQueryString: (query?: QueryParams) => string;
|
|
30
|
-
export declare const joinUrl: (baseUrl: string, path: string) => string;
|
|
31
29
|
export declare const encodePathSegment: (value: string | number) => string;
|
|
32
30
|
export declare function createApiClient({ baseUrl, timeoutMs: defaultTimeoutMs, credentials, headers: defaultHeaders, getAccessToken, getLanguage, onUnauthorized, }: ApiClientOptions): ApiClient;
|
|
31
|
+
export {};
|
|
@@ -7,8 +7,6 @@ type ApiErrorOptions = {
|
|
|
7
7
|
body?: unknown;
|
|
8
8
|
cause?: unknown;
|
|
9
9
|
};
|
|
10
|
-
export declare const getServerMessage: (body: unknown) => string | null;
|
|
11
|
-
export declare const getServerCode: (body: unknown) => "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" | undefined;
|
|
12
10
|
export declare class ApiError extends Error {
|
|
13
11
|
readonly kind: ApiErrorKind;
|
|
14
12
|
readonly status: number | null;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
declare const ERROR_CODES: readonly ["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"];
|
|
2
2
|
export declare const isErrorCode: (value: unknown) => value is ErrorCode;
|
|
3
3
|
export type ErrorCode = (typeof ERROR_CODES)[number];
|
|
4
4
|
export declare class AppError extends Error {
|
|
@@ -8,3 +8,4 @@ export declare class AppError extends Error {
|
|
|
8
8
|
});
|
|
9
9
|
}
|
|
10
10
|
export declare const isAppError: (error: unknown) => error is AppError;
|
|
11
|
+
export {};
|
|
@@ -1,3 +1,4 @@
|
|
|
1
1
|
export declare const CALENDAR_VIEWS: readonly ["day", "week", "month", "year"];
|
|
2
2
|
export type CalendarView = (typeof CALENDAR_VIEWS)[number];
|
|
3
3
|
export declare const isCalendarView: (value: unknown) => value is CalendarView;
|
|
4
|
+
export declare const nearestView: (wanted: CalendarView, enabled: readonly CalendarView[]) => CalendarView;
|