@arbidocs/blocks 0.4.71 → 0.4.72
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/dist/agents/index.cjs +223 -224
- package/dist/agents/index.js +7 -8
- package/dist/calendar/CalendarGrid.d.ts +2 -0
- package/dist/calendar/CalendarList.d.ts +2 -0
- package/dist/calendar/CalendarSettingsForm.d.ts +2 -0
- package/dist/calendar/EventDetails.d.ts +2 -0
- package/dist/calendar/EventEditor.d.ts +2 -0
- package/dist/calendar/MiniMonth.d.ts +2 -0
- package/dist/calendar/RecurrenceEditor.d.ts +13 -0
- package/dist/calendar/RoomFinder.d.ts +2 -0
- package/dist/calendar/SchedulingAssistant.d.ts +2 -0
- package/dist/calendar/ScopeDialog.d.ts +2 -0
- package/dist/calendar/TimeZonePicker.d.ts +2 -0
- package/dist/calendar/colors.d.ts +4 -0
- package/dist/calendar/draft.d.ts +43 -0
- package/dist/calendar/format.d.ts +14 -0
- package/dist/calendar/grid-model.d.ts +24 -0
- package/dist/calendar/index.cjs +4122 -0
- package/dist/calendar/index.cjs.map +1 -0
- package/dist/calendar/index.d.ts +30 -0
- package/dist/calendar/index.js +4043 -0
- package/dist/calendar/index.js.map +1 -0
- package/dist/calendar/labels.d.ts +4 -0
- package/dist/calendar/recurrence-labels.d.ts +22 -0
- package/dist/calendar/recurrence.d.ts +66 -0
- package/dist/calendar/reminders.d.ts +26 -0
- package/dist/calendar/scheduling.d.ts +27 -0
- package/dist/calendar/types.d.ts +605 -0
- package/dist/calendar/ui.d.ts +16 -0
- package/dist/calendar/zone.d.ts +56 -0
- package/dist/chat/index.cjs +123 -123
- package/dist/chat/index.js +3 -3
- package/dist/{chunk-XNRGCQPZ.cjs → chunk-3SFFTSOI.cjs} +5 -5
- package/dist/{chunk-XNRGCQPZ.cjs.map → chunk-3SFFTSOI.cjs.map} +1 -1
- package/dist/{chunk-7WM62NMM.cjs → chunk-6OL5S7MJ.cjs} +5 -2
- package/dist/chunk-6OL5S7MJ.cjs.map +1 -0
- package/dist/{chunk-VUEZARW5.cjs → chunk-B3WCKBJ7.cjs} +278 -5
- package/dist/chunk-B3WCKBJ7.cjs.map +1 -0
- package/dist/{chunk-L5UPP2HC.js → chunk-D46ZAPEE.js} +5 -2
- package/dist/chunk-D46ZAPEE.js.map +1 -0
- package/dist/{chunk-7M22KND4.cjs → chunk-DH7C2UJO.cjs} +10 -10
- package/dist/{chunk-7M22KND4.cjs.map → chunk-DH7C2UJO.cjs.map} +1 -1
- package/dist/{chunk-CXWESDIZ.cjs → chunk-F4RUCUXF.cjs} +6 -6
- package/dist/{chunk-CXWESDIZ.cjs.map → chunk-F4RUCUXF.cjs.map} +1 -1
- package/dist/{chunk-DABEWNL2.js → chunk-G5DP27DU.js} +3 -3
- package/dist/{chunk-DABEWNL2.js.map → chunk-G5DP27DU.js.map} +1 -1
- package/dist/{chunk-LTA2IAQB.cjs → chunk-G5QTGKDJ.cjs} +4 -4
- package/dist/{chunk-LTA2IAQB.cjs.map → chunk-G5QTGKDJ.cjs.map} +1 -1
- package/dist/{chunk-VZGBCBYB.js → chunk-GJV2G4FC.js} +276 -7
- package/dist/chunk-GJV2G4FC.js.map +1 -0
- package/dist/{chunk-HLMFU7L2.js → chunk-IMC2Z32C.js} +8 -8
- package/dist/{chunk-HLMFU7L2.js.map → chunk-IMC2Z32C.js.map} +1 -1
- package/dist/{chunk-5DM6VU4L.cjs → chunk-KJ3QEKOJ.cjs} +3 -3
- package/dist/{chunk-5DM6VU4L.cjs.map → chunk-KJ3QEKOJ.cjs.map} +1 -1
- package/dist/{chunk-3TVTG7FK.js → chunk-KOXUBCLL.js} +3 -3
- package/dist/{chunk-3TVTG7FK.js.map → chunk-KOXUBCLL.js.map} +1 -1
- package/dist/{chunk-ILGHS6ZV.js → chunk-SB5ZKOYN.js} +3 -3
- package/dist/{chunk-ILGHS6ZV.js.map → chunk-SB5ZKOYN.js.map} +1 -1
- package/dist/{chunk-CPMNAJLF.js → chunk-TX2ZICS7.js} +24 -4
- package/dist/chunk-TX2ZICS7.js.map +1 -0
- package/dist/{chunk-2ZTONLT5.cjs → chunk-ULWRNGGE.cjs} +25 -4
- package/dist/chunk-ULWRNGGE.cjs.map +1 -0
- package/dist/{chunk-BMWZTNZB.js → chunk-VRPRAU3J.js} +3 -3
- package/dist/{chunk-BMWZTNZB.js.map → chunk-VRPRAU3J.js.map} +1 -1
- package/dist/collaboration/index.cjs +44 -45
- package/dist/collaboration/index.js +2 -3
- package/dist/connect/index.cjs +64 -35
- package/dist/connect/index.cjs.map +1 -1
- package/dist/connect/index.d.ts +1 -1
- package/dist/connect/index.js +36 -9
- package/dist/connect/index.js.map +1 -1
- package/dist/connection/ConnectedSettings.d.ts +13 -0
- package/dist/document-tools/index.cjs +4 -5
- package/dist/document-tools/index.cjs.map +1 -1
- package/dist/document-tools/index.js +1 -2
- package/dist/document-tools/index.js.map +1 -1
- package/dist/facts/index.cjs +2 -2
- package/dist/facts/index.js +2 -2
- package/dist/files/import/index.d.ts +0 -1
- package/dist/files/index.cjs +24 -88
- package/dist/files/index.cjs.map +1 -1
- package/dist/files/index.js +6 -68
- package/dist/files/index.js.map +1 -1
- package/dist/home/index.cjs +1 -1
- package/dist/home/index.js +1 -1
- package/dist/index.cjs +536 -537
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +13 -14
- package/dist/index.js.map +1 -1
- package/dist/settings/Billing.d.ts +4 -0
- package/dist/settings/IdentityVerification.d.ts +83 -0
- package/dist/settings/PlanBadge.d.ts +2 -2
- package/dist/settings/PlanCard.d.ts +6 -1
- package/dist/settings/ProfileCard.d.ts +5 -1
- package/dist/settings/SubscriptionParts.d.ts +6 -2
- package/dist/settings/index.cjs +128 -95
- package/dist/settings/index.cjs.map +1 -1
- package/dist/settings/index.d.ts +1 -0
- package/dist/settings/index.js +64 -47
- package/dist/settings/index.js.map +1 -1
- package/dist/shell/ActionCluster.d.ts +3 -1
- package/dist/shell/index.cjs +55 -55
- package/dist/shell/index.js +3 -3
- package/dist/studio/index.cjs +6 -6
- package/dist/studio/index.js +5 -5
- package/dist/workspaces/index.cjs +2 -3
- package/dist/workspaces/index.cjs.map +1 -1
- package/dist/workspaces/index.js +1 -2
- package/dist/workspaces/index.js.map +1 -1
- package/package.json +23 -5
- package/src/calendar/calendar.css +316 -0
- package/dist/chunk-2ZTONLT5.cjs.map +0 -1
- package/dist/chunk-7WM62NMM.cjs.map +0 -1
- package/dist/chunk-CPMNAJLF.js.map +0 -1
- package/dist/chunk-DCDVWPMB.cjs +0 -29
- package/dist/chunk-DCDVWPMB.cjs.map +0 -1
- package/dist/chunk-L5UPP2HC.js.map +0 -1
- package/dist/chunk-TJMKFY5P.js +0 -27
- package/dist/chunk-TJMKFY5P.js.map +0 -1
- package/dist/chunk-VUEZARW5.cjs.map +0 -1
- package/dist/chunk-VZGBCBYB.js.map +0 -1
- package/dist/files/import/CalendarImportRow.d.ts +0 -26
|
@@ -0,0 +1,605 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Shared types for `@arbidocs/blocks/calendar`: the presentational calendar block (grid, mini month,
|
|
3
|
+
* calendar list, event editor / details, scope dialog, time-zone picker, settings form).
|
|
4
|
+
*
|
|
5
|
+
* The block is props-in / callbacks-out. `EventDraft` mirrors the backend `EventCreate` / `EventWrite`
|
|
6
|
+
* shapes (snake_case kept) so the app can send it as-is.
|
|
7
|
+
*/
|
|
8
|
+
import type { ReactNode } from 'react';
|
|
9
|
+
export type CalendarViewKind = 'day' | 'week' | 'work_week' | 'month' | 'agenda' | 'year';
|
|
10
|
+
export type CalendarLayer = 'event' | 'facts' | 'workflows' | 'tasks';
|
|
11
|
+
export type OverlayLayer = Exclude<CalendarLayer, 'event'>;
|
|
12
|
+
export type EventStatus = 'confirmed' | 'tentative' | 'cancelled';
|
|
13
|
+
export type PartStat = 'needs_action' | 'accepted' | 'declined' | 'tentative' | 'delegated';
|
|
14
|
+
export type ShowAs = 'free' | 'tentative' | 'busy' | 'oof' | 'working_elsewhere';
|
|
15
|
+
export type Sensitivity = 'normal' | 'private' | 'confidential';
|
|
16
|
+
export type AttendeeRole = 'required' | 'optional' | 'chair' | 'non_participant';
|
|
17
|
+
export type AttendeeKind = 'individual' | 'room' | 'resource' | 'group' | 'unknown';
|
|
18
|
+
export type EditScope = 'this' | 'following' | 'all';
|
|
19
|
+
export interface GridEvent {
|
|
20
|
+
/** Unique per occurrence (API instance_id / overlay instance_id). */
|
|
21
|
+
instanceId: string;
|
|
22
|
+
/** evt-… (API id) or overlay id. */
|
|
23
|
+
eventId: string;
|
|
24
|
+
calendarId?: string;
|
|
25
|
+
title: string;
|
|
26
|
+
/** ISO instant. */
|
|
27
|
+
startUtc: string;
|
|
28
|
+
endUtc: string;
|
|
29
|
+
allDay: boolean;
|
|
30
|
+
/** YYYY-MM-DD for all-day (exclusive end in endDate). */
|
|
31
|
+
startDate?: string;
|
|
32
|
+
endDate?: string;
|
|
33
|
+
/** Hex colour. */
|
|
34
|
+
color: string;
|
|
35
|
+
/** Drag / resize allowed. */
|
|
36
|
+
editable: boolean;
|
|
37
|
+
layer: CalendarLayer;
|
|
38
|
+
status?: EventStatus;
|
|
39
|
+
myPartstat?: PartStat | null;
|
|
40
|
+
showAs?: ShowAs;
|
|
41
|
+
isRecurring?: boolean;
|
|
42
|
+
hasConference?: boolean;
|
|
43
|
+
location?: string | null;
|
|
44
|
+
restricted?: boolean;
|
|
45
|
+
}
|
|
46
|
+
export interface GridRange {
|
|
47
|
+
start: Date;
|
|
48
|
+
end: Date;
|
|
49
|
+
view: CalendarViewKind;
|
|
50
|
+
/** YYYY-MM-DD anchor. */
|
|
51
|
+
date: string;
|
|
52
|
+
}
|
|
53
|
+
export interface SlotSelection {
|
|
54
|
+
startUtc: string;
|
|
55
|
+
endUtc: string;
|
|
56
|
+
allDay: boolean;
|
|
57
|
+
startDate?: string;
|
|
58
|
+
endDate?: string;
|
|
59
|
+
}
|
|
60
|
+
export interface EventTimeChange {
|
|
61
|
+
instanceId: string;
|
|
62
|
+
eventId: string;
|
|
63
|
+
startUtc: string;
|
|
64
|
+
endUtc: string;
|
|
65
|
+
allDay: boolean;
|
|
66
|
+
startDate?: string;
|
|
67
|
+
endDate?: string;
|
|
68
|
+
revert: () => void;
|
|
69
|
+
}
|
|
70
|
+
export interface WorkingHoursSpec {
|
|
71
|
+
/** 0 = Monday … 6 = Sunday. */
|
|
72
|
+
day: number;
|
|
73
|
+
/** HH:MM */
|
|
74
|
+
start: string;
|
|
75
|
+
end: string;
|
|
76
|
+
}
|
|
77
|
+
export interface CalendarLabels {
|
|
78
|
+
today: string;
|
|
79
|
+
view: string;
|
|
80
|
+
previous: string;
|
|
81
|
+
next: string;
|
|
82
|
+
day: string;
|
|
83
|
+
week: string;
|
|
84
|
+
workWeek: string;
|
|
85
|
+
month: string;
|
|
86
|
+
agenda: string;
|
|
87
|
+
year: string;
|
|
88
|
+
allDay: string;
|
|
89
|
+
busy: string;
|
|
90
|
+
noTitle: string;
|
|
91
|
+
noEvents: string;
|
|
92
|
+
weekAbbrev: string;
|
|
93
|
+
more: string;
|
|
94
|
+
newEvent: string;
|
|
95
|
+
myCalendars: string;
|
|
96
|
+
sharedCalendars: string;
|
|
97
|
+
workspaceCalendars: string;
|
|
98
|
+
subscribedCalendars: string;
|
|
99
|
+
overlays: string;
|
|
100
|
+
facts: string;
|
|
101
|
+
workflows: string;
|
|
102
|
+
tasks: string;
|
|
103
|
+
createCalendar: string;
|
|
104
|
+
editCalendar: string;
|
|
105
|
+
importCalendar: string;
|
|
106
|
+
exportCalendar: string;
|
|
107
|
+
deleteCalendar: string;
|
|
108
|
+
locked: string;
|
|
109
|
+
showCalendar: string;
|
|
110
|
+
hideCalendar: string;
|
|
111
|
+
calendarColor: string;
|
|
112
|
+
title: string;
|
|
113
|
+
titlePlaceholder: string;
|
|
114
|
+
calendar: string;
|
|
115
|
+
start: string;
|
|
116
|
+
end: string;
|
|
117
|
+
startTime: string;
|
|
118
|
+
endTime: string;
|
|
119
|
+
arbiCall: string;
|
|
120
|
+
startTimeZone: string;
|
|
121
|
+
endTimeZone: string;
|
|
122
|
+
separateTimeZones: string;
|
|
123
|
+
repeat: string;
|
|
124
|
+
location: string;
|
|
125
|
+
description: string;
|
|
126
|
+
attendees: string;
|
|
127
|
+
addAttendee: string;
|
|
128
|
+
required: string;
|
|
129
|
+
optional: string;
|
|
130
|
+
showAs: string;
|
|
131
|
+
sensitivity: string;
|
|
132
|
+
categories: string;
|
|
133
|
+
addCategory: string;
|
|
134
|
+
color: string;
|
|
135
|
+
defaultColor: string;
|
|
136
|
+
reminders: string;
|
|
137
|
+
addReminder: string;
|
|
138
|
+
useDefaultReminders: string;
|
|
139
|
+
conference: string;
|
|
140
|
+
addArbiCall: string;
|
|
141
|
+
addMeetingLink: string;
|
|
142
|
+
meetingLinkPlaceholder: string;
|
|
143
|
+
removeConference: string;
|
|
144
|
+
attachments: string;
|
|
145
|
+
addAttachment: string;
|
|
146
|
+
attachmentUrlPlaceholder: string;
|
|
147
|
+
attachmentTitlePlaceholder: string;
|
|
148
|
+
status: string;
|
|
149
|
+
save: string;
|
|
150
|
+
saving: string;
|
|
151
|
+
cancel: string;
|
|
152
|
+
delete: string;
|
|
153
|
+
edit: string;
|
|
154
|
+
remove: string;
|
|
155
|
+
createTitle: string;
|
|
156
|
+
editTitle: string;
|
|
157
|
+
minutes: string;
|
|
158
|
+
hours: string;
|
|
159
|
+
days: string;
|
|
160
|
+
weeks: string;
|
|
161
|
+
beforeStart: string;
|
|
162
|
+
popup: string;
|
|
163
|
+
email: string;
|
|
164
|
+
atStart: string;
|
|
165
|
+
free: string;
|
|
166
|
+
tentative: string;
|
|
167
|
+
oof: string;
|
|
168
|
+
workingElsewhere: string;
|
|
169
|
+
normal: string;
|
|
170
|
+
private: string;
|
|
171
|
+
confidential: string;
|
|
172
|
+
confirmed: string;
|
|
173
|
+
cancelled: string;
|
|
174
|
+
join: string;
|
|
175
|
+
accept: string;
|
|
176
|
+
decline: string;
|
|
177
|
+
maybe: string;
|
|
178
|
+
going: string;
|
|
179
|
+
organizer: string;
|
|
180
|
+
needsAction: string;
|
|
181
|
+
accepted: string;
|
|
182
|
+
declined: string;
|
|
183
|
+
delegated: string;
|
|
184
|
+
recurring: string;
|
|
185
|
+
scopeEditTitle: string;
|
|
186
|
+
scopeDeleteTitle: string;
|
|
187
|
+
scopeThis: string;
|
|
188
|
+
scopeFollowing: string;
|
|
189
|
+
scopeAll: string;
|
|
190
|
+
settingsTitle: string;
|
|
191
|
+
timeZone: string;
|
|
192
|
+
secondaryTimeZone: string;
|
|
193
|
+
none: string;
|
|
194
|
+
weekStart: string;
|
|
195
|
+
workingHours: string;
|
|
196
|
+
defaultView: string;
|
|
197
|
+
defaultDuration: string;
|
|
198
|
+
defaultCalendar: string;
|
|
199
|
+
showDeclined: string;
|
|
200
|
+
showWeekNumbers: string;
|
|
201
|
+
autoAddInvitations: string;
|
|
202
|
+
autoAddAll: string;
|
|
203
|
+
autoAddKnown: string;
|
|
204
|
+
autoAddNone: string;
|
|
205
|
+
declineMessage: string;
|
|
206
|
+
searchTimeZones: string;
|
|
207
|
+
invalidRange: string;
|
|
208
|
+
titleRequired: string;
|
|
209
|
+
removeFromCalendar: string;
|
|
210
|
+
proposeNewTime: string;
|
|
211
|
+
scopeRespondTitle: string;
|
|
212
|
+
send: string;
|
|
213
|
+
focusTime: string;
|
|
214
|
+
autoDecline: string;
|
|
215
|
+
declineMessagePlaceholder: string;
|
|
216
|
+
schedulingAssistant: string;
|
|
217
|
+
findATime: string;
|
|
218
|
+
findingTimes: string;
|
|
219
|
+
noSuggestions: string;
|
|
220
|
+
everyoneFree: string;
|
|
221
|
+
unavailableCount: string;
|
|
222
|
+
unknownAvailability: string;
|
|
223
|
+
outsideWorkingHours: string;
|
|
224
|
+
rooms: string;
|
|
225
|
+
findRoom: string;
|
|
226
|
+
minCapacity: string;
|
|
227
|
+
featureFilter: string;
|
|
228
|
+
addRoom: string;
|
|
229
|
+
roomAdded: string;
|
|
230
|
+
roomFree: string;
|
|
231
|
+
roomBusy: string;
|
|
232
|
+
noRooms: string;
|
|
233
|
+
room: string;
|
|
234
|
+
you: string;
|
|
235
|
+
addCalendar: string;
|
|
236
|
+
subscribeFromUrl: string;
|
|
237
|
+
addHolidays: string;
|
|
238
|
+
importIcs: string;
|
|
239
|
+
shareCalendar: string;
|
|
240
|
+
refreshCalendar: string;
|
|
241
|
+
publishTo: string;
|
|
242
|
+
suggestions: string;
|
|
243
|
+
}
|
|
244
|
+
export interface CalendarGridProps {
|
|
245
|
+
events: GridEvent[];
|
|
246
|
+
view: CalendarViewKind;
|
|
247
|
+
/** YYYY-MM-DD anchor date in `timeZone`. */
|
|
248
|
+
date: string;
|
|
249
|
+
/** IANA zone every time is rendered in. */
|
|
250
|
+
timeZone: string;
|
|
251
|
+
secondaryTimeZone?: string | null;
|
|
252
|
+
/** 0 = Sunday … 6 = Saturday. */
|
|
253
|
+
weekStart: number;
|
|
254
|
+
workingHours?: WorkingHoursSpec[];
|
|
255
|
+
showWeekNumbers?: boolean;
|
|
256
|
+
nowIndicator?: boolean;
|
|
257
|
+
onRangeChange: (r: GridRange) => void;
|
|
258
|
+
onSelectSlot?: (s: SlotSelection) => void;
|
|
259
|
+
onEventClick?: (instanceId: string, eventId: string) => void;
|
|
260
|
+
onEventChange?: (c: EventTimeChange) => void;
|
|
261
|
+
onViewChange?: (v: CalendarViewKind) => void;
|
|
262
|
+
onDateChange?: (date: string) => void;
|
|
263
|
+
/** Global keyboard shortcuts (t, d/w/x/m/a/y, j/k/n/p/←/→, c). Default on. */
|
|
264
|
+
keyboardShortcuts?: boolean;
|
|
265
|
+
/** Keyboard `c`: the host opens the create editor. */
|
|
266
|
+
onCreateShortcut?: () => void;
|
|
267
|
+
height?: number | 'auto';
|
|
268
|
+
labels?: Partial<CalendarLabels>;
|
|
269
|
+
/** Hide the built-in toolbar (the host renders its own). */
|
|
270
|
+
hideToolbar?: boolean;
|
|
271
|
+
/** Extra content rendered at the end of the toolbar (e.g. a settings button). */
|
|
272
|
+
toolbarEnd?: ReactNode;
|
|
273
|
+
className?: string;
|
|
274
|
+
}
|
|
275
|
+
export interface CalendarListItem {
|
|
276
|
+
id: string;
|
|
277
|
+
name: string | null;
|
|
278
|
+
color: string;
|
|
279
|
+
hidden: boolean;
|
|
280
|
+
locked: boolean;
|
|
281
|
+
role: string;
|
|
282
|
+
isDefault: boolean;
|
|
283
|
+
group: 'mine' | 'shared' | 'workspace' | 'subscribed' | 'rooms';
|
|
284
|
+
canWrite: boolean;
|
|
285
|
+
/** Mirrored from a connected account: 'google' | 'microsoft' | 'caldav' | 'ics' (native: omitted). */
|
|
286
|
+
provider?: string | null;
|
|
287
|
+
}
|
|
288
|
+
/** Mirrors the API DateTimeSpec: `date` alone = all-day; `date_time` = wall time in `time_zone` (null = floating). */
|
|
289
|
+
export interface DateTimeSpec {
|
|
290
|
+
date?: string | null;
|
|
291
|
+
date_time?: string | null;
|
|
292
|
+
time_zone?: string | null;
|
|
293
|
+
}
|
|
294
|
+
export interface ReminderDraft {
|
|
295
|
+
minutes_before: number;
|
|
296
|
+
action: 'display' | 'email';
|
|
297
|
+
relative_to?: 'start' | 'end';
|
|
298
|
+
}
|
|
299
|
+
export interface AttendeeDraft {
|
|
300
|
+
email?: string | null;
|
|
301
|
+
user_id?: string | null;
|
|
302
|
+
name?: string | null;
|
|
303
|
+
role?: AttendeeRole;
|
|
304
|
+
kind?: AttendeeKind;
|
|
305
|
+
}
|
|
306
|
+
export interface ConferenceDraft {
|
|
307
|
+
type: 'arbi' | 'external';
|
|
308
|
+
url: string;
|
|
309
|
+
call_id?: string | null;
|
|
310
|
+
label?: string | null;
|
|
311
|
+
}
|
|
312
|
+
export interface AttachmentDraft {
|
|
313
|
+
url: string;
|
|
314
|
+
title?: string | null;
|
|
315
|
+
doc_id?: string | null;
|
|
316
|
+
}
|
|
317
|
+
export interface EventDraft {
|
|
318
|
+
calendar_id?: string;
|
|
319
|
+
title: string;
|
|
320
|
+
description?: string | null;
|
|
321
|
+
location?: string | null;
|
|
322
|
+
start: DateTimeSpec;
|
|
323
|
+
end: DateTimeSpec;
|
|
324
|
+
recurrence?: {
|
|
325
|
+
rrule?: string | null;
|
|
326
|
+
rdates?: DateTimeSpec[];
|
|
327
|
+
exdates?: DateTimeSpec[];
|
|
328
|
+
} | null;
|
|
329
|
+
status?: EventStatus;
|
|
330
|
+
show_as?: GridEvent['showAs'];
|
|
331
|
+
sensitivity?: Sensitivity;
|
|
332
|
+
categories?: string[];
|
|
333
|
+
color?: string | null;
|
|
334
|
+
reminders?: ReminderDraft[];
|
|
335
|
+
use_default_reminders?: boolean;
|
|
336
|
+
attendees?: AttendeeDraft[];
|
|
337
|
+
conference?: ConferenceDraft | null;
|
|
338
|
+
attachments?: AttachmentDraft[];
|
|
339
|
+
url?: string | null;
|
|
340
|
+
conversation_id?: string | null;
|
|
341
|
+
/** Out of office / focus time: decline new invitations that overlap (with `decline_message`). */
|
|
342
|
+
auto_decline?: boolean;
|
|
343
|
+
decline_message?: string | null;
|
|
344
|
+
}
|
|
345
|
+
export interface MiniMonthProps {
|
|
346
|
+
/** YYYY-MM-DD selected date. */
|
|
347
|
+
date: string;
|
|
348
|
+
/** 0 = Sunday … 6 = Saturday. */
|
|
349
|
+
weekStart: number;
|
|
350
|
+
timeZone: string;
|
|
351
|
+
onSelect: (date: string) => void;
|
|
352
|
+
/** Inclusive YYYY-MM-DD range to highlight (e.g. the visible week). */
|
|
353
|
+
highlightRange?: {
|
|
354
|
+
start: string;
|
|
355
|
+
end: string;
|
|
356
|
+
} | null;
|
|
357
|
+
showWeekNumbers?: boolean;
|
|
358
|
+
labels?: Partial<CalendarLabels>;
|
|
359
|
+
className?: string;
|
|
360
|
+
}
|
|
361
|
+
export interface CalendarOverlaysState {
|
|
362
|
+
facts: boolean;
|
|
363
|
+
workflows: boolean;
|
|
364
|
+
tasks: boolean;
|
|
365
|
+
}
|
|
366
|
+
export interface CalendarListProps {
|
|
367
|
+
calendars: CalendarListItem[];
|
|
368
|
+
overlays: CalendarOverlaysState;
|
|
369
|
+
onToggleHidden: (id: string) => void;
|
|
370
|
+
onColorChange: (id: string, color: string) => void;
|
|
371
|
+
onToggleOverlay: (layer: OverlayLayer) => void;
|
|
372
|
+
onCreate: () => void;
|
|
373
|
+
onEdit: (id: string) => void;
|
|
374
|
+
onImport: (id: string) => void;
|
|
375
|
+
onExport: (id: string) => void;
|
|
376
|
+
onDelete: (id: string) => void;
|
|
377
|
+
/** Sharing dialog for a calendar the caller owns. */
|
|
378
|
+
onShare?: (id: string) => void;
|
|
379
|
+
/** Re-fetch a subscription / holiday calendar. */
|
|
380
|
+
onRefresh?: (id: string) => void;
|
|
381
|
+
/** "Publish to…" a connected account (own native calendars only). */
|
|
382
|
+
onPublish?: (id: string) => void;
|
|
383
|
+
/** With any of these the "+" opens an "Add calendar" menu (new / subscribe / holidays / import). */
|
|
384
|
+
onSubscribe?: () => void;
|
|
385
|
+
onAddHolidays?: () => void;
|
|
386
|
+
onImportFile?: () => void;
|
|
387
|
+
labels?: Partial<CalendarLabels>;
|
|
388
|
+
className?: string;
|
|
389
|
+
}
|
|
390
|
+
export interface EventEditorProps {
|
|
391
|
+
value: EventDraft;
|
|
392
|
+
onChange: (draft: EventDraft) => void;
|
|
393
|
+
onSave: () => void;
|
|
394
|
+
onCancel: () => void;
|
|
395
|
+
onDelete?: () => void;
|
|
396
|
+
calendars: CalendarListItem[];
|
|
397
|
+
mode: 'create' | 'edit';
|
|
398
|
+
canAddCall: boolean;
|
|
399
|
+
onAddCall?: () => Promise<{
|
|
400
|
+
call_id: string;
|
|
401
|
+
url: string;
|
|
402
|
+
} | null>;
|
|
403
|
+
defaultTimeZone: string;
|
|
404
|
+
/** Extra section rendered under the guests (the host's scheduling assistant / room finder). */
|
|
405
|
+
schedulingSlot?: ReactNode;
|
|
406
|
+
/** Autocomplete for the guest input (contacts / people); the host searches on `onAttendeeQueryChange`. */
|
|
407
|
+
attendeeSuggestions?: {
|
|
408
|
+
email: string;
|
|
409
|
+
name?: string | null;
|
|
410
|
+
detail?: string | null;
|
|
411
|
+
}[];
|
|
412
|
+
onAttendeeQueryChange?: (query: string) => void;
|
|
413
|
+
saving?: boolean;
|
|
414
|
+
error?: string | null;
|
|
415
|
+
labels?: Partial<CalendarLabels>;
|
|
416
|
+
/** Optional IANA zone list for the pickers (defaults to Intl.supportedValuesOf). */
|
|
417
|
+
zones?: string[];
|
|
418
|
+
className?: string;
|
|
419
|
+
}
|
|
420
|
+
/** Read-side event shape for EventDetails (a subset of the API CalendarEvent, snake_case kept). */
|
|
421
|
+
export interface CalendarEventView {
|
|
422
|
+
id: string;
|
|
423
|
+
instance_id: string;
|
|
424
|
+
calendar_id: string;
|
|
425
|
+
title: string;
|
|
426
|
+
description?: string | null;
|
|
427
|
+
location?: string | null;
|
|
428
|
+
start: DateTimeSpec;
|
|
429
|
+
end: DateTimeSpec;
|
|
430
|
+
all_day: boolean;
|
|
431
|
+
start_utc: string;
|
|
432
|
+
end_utc: string;
|
|
433
|
+
is_recurring?: boolean;
|
|
434
|
+
status?: EventStatus;
|
|
435
|
+
show_as?: ShowAs;
|
|
436
|
+
sensitivity?: Sensitivity;
|
|
437
|
+
categories?: string[];
|
|
438
|
+
color?: string | null;
|
|
439
|
+
reminders?: ReminderDraft[];
|
|
440
|
+
organizer?: {
|
|
441
|
+
email?: string | null;
|
|
442
|
+
name?: string | null;
|
|
443
|
+
user_id?: string | null;
|
|
444
|
+
} | null;
|
|
445
|
+
attendees?: (AttendeeDraft & {
|
|
446
|
+
partstat?: PartStat;
|
|
447
|
+
is_organizer?: boolean;
|
|
448
|
+
})[];
|
|
449
|
+
my_partstat?: PartStat | null;
|
|
450
|
+
is_organizer?: boolean;
|
|
451
|
+
conference?: {
|
|
452
|
+
type: 'arbi' | 'external';
|
|
453
|
+
url?: string | null;
|
|
454
|
+
label?: string | null;
|
|
455
|
+
call_id?: string | null;
|
|
456
|
+
} | null;
|
|
457
|
+
attachments?: AttachmentDraft[];
|
|
458
|
+
url?: string | null;
|
|
459
|
+
can_edit?: boolean;
|
|
460
|
+
restricted?: boolean;
|
|
461
|
+
}
|
|
462
|
+
export interface EventDetailsProps {
|
|
463
|
+
event: CalendarEventView;
|
|
464
|
+
/** Zone the times are rendered in (user settings zone). */
|
|
465
|
+
timeZone: string;
|
|
466
|
+
calendarName?: string | null;
|
|
467
|
+
calendarColor?: string | null;
|
|
468
|
+
onEdit?: () => void;
|
|
469
|
+
onDelete?: () => void;
|
|
470
|
+
onRespond?: (partstat: 'accepted' | 'declined' | 'tentative') => void;
|
|
471
|
+
/** "Propose new time" for an invitation (shown next to the RSVP buttons). */
|
|
472
|
+
onProposeTime?: () => void;
|
|
473
|
+
onJoin?: () => void;
|
|
474
|
+
onClose?: () => void;
|
|
475
|
+
/** Render the Join button as enabled (the host decides the join window). */
|
|
476
|
+
canJoin?: boolean;
|
|
477
|
+
labels?: Partial<CalendarLabels>;
|
|
478
|
+
className?: string;
|
|
479
|
+
}
|
|
480
|
+
export interface ScopeDialogProps {
|
|
481
|
+
open: boolean;
|
|
482
|
+
action: 'edit' | 'delete' | 'respond';
|
|
483
|
+
onChoose: (scope: EditScope) => void;
|
|
484
|
+
onCancel: () => void;
|
|
485
|
+
/** Hide "this and following" (e.g. for a single exception). */
|
|
486
|
+
allowFollowing?: boolean;
|
|
487
|
+
labels?: Partial<CalendarLabels>;
|
|
488
|
+
}
|
|
489
|
+
export interface TimeZonePickerProps {
|
|
490
|
+
value: string | null;
|
|
491
|
+
onChange: (zone: string) => void;
|
|
492
|
+
zones?: string[];
|
|
493
|
+
/** Offer an empty "none" option (for the secondary zone). */
|
|
494
|
+
allowNone?: boolean;
|
|
495
|
+
onClear?: () => void;
|
|
496
|
+
id?: string;
|
|
497
|
+
ariaLabel?: string;
|
|
498
|
+
disabled?: boolean;
|
|
499
|
+
labels?: Partial<CalendarLabels>;
|
|
500
|
+
className?: string;
|
|
501
|
+
}
|
|
502
|
+
export interface CalendarWorkingHours extends WorkingHoursSpec {
|
|
503
|
+
location?: 'office' | 'home' | 'other' | null;
|
|
504
|
+
}
|
|
505
|
+
/** Mirrors the API CalendarSettings. */
|
|
506
|
+
export interface CalendarSettingsValue {
|
|
507
|
+
time_zone: string;
|
|
508
|
+
secondary_time_zone?: string | null;
|
|
509
|
+
week_start: number;
|
|
510
|
+
working_hours: CalendarWorkingHours[];
|
|
511
|
+
default_view: CalendarViewKind;
|
|
512
|
+
default_duration_minutes: number;
|
|
513
|
+
default_calendar_id?: string | null;
|
|
514
|
+
show_declined: boolean;
|
|
515
|
+
show_week_numbers: boolean;
|
|
516
|
+
auto_add_invitations?: 'all' | 'known' | 'none';
|
|
517
|
+
decline_message?: string | null;
|
|
518
|
+
overlays?: OverlayLayer[];
|
|
519
|
+
}
|
|
520
|
+
export interface CalendarSettingsFormProps {
|
|
521
|
+
value: CalendarSettingsValue;
|
|
522
|
+
onChange: (value: CalendarSettingsValue) => void;
|
|
523
|
+
onSave: () => void;
|
|
524
|
+
onCancel?: () => void;
|
|
525
|
+
calendars?: CalendarListItem[];
|
|
526
|
+
zones?: string[];
|
|
527
|
+
saving?: boolean;
|
|
528
|
+
error?: string | null;
|
|
529
|
+
labels?: Partial<CalendarLabels>;
|
|
530
|
+
className?: string;
|
|
531
|
+
}
|
|
532
|
+
export interface BusyInterval {
|
|
533
|
+
startUtc: string;
|
|
534
|
+
endUtc: string;
|
|
535
|
+
showAs?: ShowAs;
|
|
536
|
+
title?: string | null;
|
|
537
|
+
}
|
|
538
|
+
export interface SchedulingRow {
|
|
539
|
+
/** Address or id the row stands for. */
|
|
540
|
+
id: string;
|
|
541
|
+
label: string;
|
|
542
|
+
/** false: the attendee's availability is not visible to the caller. */
|
|
543
|
+
known: boolean;
|
|
544
|
+
busy: BusyInterval[];
|
|
545
|
+
/** Working intervals (UTC) within the shown day; outside them is shaded. Undefined = unknown. */
|
|
546
|
+
working?: {
|
|
547
|
+
startUtc: string;
|
|
548
|
+
endUtc: string;
|
|
549
|
+
}[];
|
|
550
|
+
kind?: 'person' | 'room';
|
|
551
|
+
}
|
|
552
|
+
export interface TimeSuggestionView {
|
|
553
|
+
startUtc: string;
|
|
554
|
+
endUtc: string;
|
|
555
|
+
available: string[];
|
|
556
|
+
unavailable: string[];
|
|
557
|
+
}
|
|
558
|
+
export interface SchedulingAssistantProps {
|
|
559
|
+
/** YYYY-MM-DD day shown, in `timeZone`. */
|
|
560
|
+
date: string;
|
|
561
|
+
timeZone: string;
|
|
562
|
+
rows: SchedulingRow[];
|
|
563
|
+
/** The event's current slot (highlighted). */
|
|
564
|
+
selection?: {
|
|
565
|
+
startUtc: string;
|
|
566
|
+
endUtc: string;
|
|
567
|
+
} | null;
|
|
568
|
+
/** First and last hour shown (default 7 and 20). */
|
|
569
|
+
dayStartHour?: number;
|
|
570
|
+
dayEndHour?: number;
|
|
571
|
+
loading?: boolean;
|
|
572
|
+
suggestions?: TimeSuggestionView[] | null;
|
|
573
|
+
finding?: boolean;
|
|
574
|
+
onFindTime?: () => void;
|
|
575
|
+
onPickSuggestion?: (s: TimeSuggestionView) => void;
|
|
576
|
+
onDateChange?: (date: string) => void;
|
|
577
|
+
labels?: Partial<CalendarLabels>;
|
|
578
|
+
className?: string;
|
|
579
|
+
}
|
|
580
|
+
export interface RoomOption {
|
|
581
|
+
id: string;
|
|
582
|
+
name: string;
|
|
583
|
+
email: string;
|
|
584
|
+
capacity?: number | null;
|
|
585
|
+
building?: string | null;
|
|
586
|
+
floor?: string | null;
|
|
587
|
+
features?: string[];
|
|
588
|
+
/** Free for the whole event slot (null: unknown). */
|
|
589
|
+
free?: boolean | null;
|
|
590
|
+
}
|
|
591
|
+
export interface RoomFinderProps {
|
|
592
|
+
rooms: RoomOption[];
|
|
593
|
+
loading?: boolean;
|
|
594
|
+
minCapacity: number | null;
|
|
595
|
+
feature: string;
|
|
596
|
+
onFiltersChange: (f: {
|
|
597
|
+
minCapacity: number | null;
|
|
598
|
+
feature: string;
|
|
599
|
+
}) => void;
|
|
600
|
+
/** Emails already on the event. */
|
|
601
|
+
addedEmails: string[];
|
|
602
|
+
onAdd: (room: RoomOption) => void;
|
|
603
|
+
labels?: Partial<CalendarLabels>;
|
|
604
|
+
className?: string;
|
|
605
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/** Small form primitives shared by the calendar forms (native controls: work on phones, easy to test). */
|
|
2
|
+
import { type ReactNode, type SelectHTMLAttributes } from 'react';
|
|
3
|
+
export declare const NativeSelect: import("react").ForwardRefExoticComponent<SelectHTMLAttributes<HTMLSelectElement> & import("react").RefAttributes<HTMLSelectElement>>;
|
|
4
|
+
export declare function FieldRow({ icon, label, children, className, }: {
|
|
5
|
+
icon?: ReactNode;
|
|
6
|
+
label?: ReactNode;
|
|
7
|
+
children: ReactNode;
|
|
8
|
+
className?: string;
|
|
9
|
+
}): import("react").JSX.Element;
|
|
10
|
+
export declare function ColorSwatches({ value, onChange, allowNone, noneLabel, testIdPrefix, }: {
|
|
11
|
+
value: string | null | undefined;
|
|
12
|
+
onChange: (color: string | null) => void;
|
|
13
|
+
allowNone?: boolean;
|
|
14
|
+
noneLabel?: string;
|
|
15
|
+
testIdPrefix?: string;
|
|
16
|
+
}): import("react").JSX.Element;
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Zone math for the calendar. Every conversion between a wall time in a named IANA zone and a UTC
|
|
3
|
+
* instant goes through Temporal (the polyfill, imported as a module: nothing global is patched),
|
|
4
|
+
* so DST gaps/overlaps resolve the way RFC 5545 says (`compatible`: a skipped time moves forward,
|
|
5
|
+
* a repeated time takes the earlier instant). Nothing here reads the browser's local zone.
|
|
6
|
+
*/
|
|
7
|
+
import { Temporal } from 'temporal-polyfill';
|
|
8
|
+
/** True when `zone` is a time zone the runtime can resolve. */
|
|
9
|
+
export declare function isValidTimeZone(zone: string | null | undefined): zone is string;
|
|
10
|
+
/** `zone` when valid, else `fallback` (else UTC). */
|
|
11
|
+
export declare function safeZone(zone: string | null | undefined, fallback?: string): string;
|
|
12
|
+
/** The instant a wall time in `zone` names, as an ISO string ending in `Z` (no milliseconds unless set). */
|
|
13
|
+
export declare function wallToUtc(wall: string, zone: string): string;
|
|
14
|
+
/** Epoch milliseconds of a wall time in `zone`. */
|
|
15
|
+
export declare function wallToEpochMs(wall: string, zone: string): number;
|
|
16
|
+
/** The zoned date-time of an instant. */
|
|
17
|
+
export declare function zoned(utc: string | Date | number, zone: string): Temporal.ZonedDateTime;
|
|
18
|
+
/** `YYYY-MM-DDTHH:MM` wall time of an instant in `zone`. */
|
|
19
|
+
export declare function utcToWall(utc: string | Date | number, zone: string): string;
|
|
20
|
+
/** `YYYY-MM-DD` date of an instant in `zone`. */
|
|
21
|
+
export declare function utcToDate(utc: string | Date | number, zone: string): string;
|
|
22
|
+
/** `HH:MM` of an instant in `zone`. */
|
|
23
|
+
export declare function utcToTime(utc: string | Date | number, zone: string): string;
|
|
24
|
+
/** Convert a wall time from one zone to the same instant's wall time in another. */
|
|
25
|
+
export declare function convertWall(wall: string, fromZone: string, toZone: string): string;
|
|
26
|
+
/** Today's date in `zone`. */
|
|
27
|
+
export declare function todayInZone(zone: string, now?: Date | number): string;
|
|
28
|
+
/** Calendar arithmetic on a `YYYY-MM-DD` date. */
|
|
29
|
+
export declare function addDays(date: string, days: number): string;
|
|
30
|
+
export declare function addMonths(date: string, months: number): string;
|
|
31
|
+
/** Whole days from `a` to `b` (both `YYYY-MM-DD`). */
|
|
32
|
+
export declare function diffDays(a: string, b: string): number;
|
|
33
|
+
/** 0 = Sunday … 6 = Saturday, for a `YYYY-MM-DD` date. */
|
|
34
|
+
export declare function dayOfWeekSun0(date: string): number;
|
|
35
|
+
/** The first day of the week containing `date`, for a week starting on `weekStart` (0 = Sunday). */
|
|
36
|
+
export declare function startOfWeek(date: string, weekStart: number): string;
|
|
37
|
+
/** ISO-8601 week number of a `YYYY-MM-DD` date. */
|
|
38
|
+
export declare function isoWeekNumber(date: string): number;
|
|
39
|
+
/** Offset of `zone` at an instant, in minutes east of UTC. */
|
|
40
|
+
export declare function zoneOffsetMinutes(zone: string, at?: string | Date | number): number;
|
|
41
|
+
/** `GMT+5:30` / `GMT-4` / `GMT` label for `zone` at an instant. */
|
|
42
|
+
export declare function zoneOffsetLabel(zone: string, at?: string | Date | number): string;
|
|
43
|
+
/** Short city-ish label for a zone: `America/New_York` → `New York`. */
|
|
44
|
+
export declare function zoneCity(zone: string): string;
|
|
45
|
+
/** Every IANA zone the runtime knows (falls back to a short list on old engines). */
|
|
46
|
+
export declare function listTimeZones(): string[];
|
|
47
|
+
/** The viewer's zone (only as a default for a new user; rendering always uses an explicit zone). */
|
|
48
|
+
export declare function detectTimeZone(): string;
|
|
49
|
+
/** Format an instant in `zone` with Intl (never the browser zone). */
|
|
50
|
+
export declare function formatInZone(utc: string | Date | number, zone: string, options: Intl.DateTimeFormatOptions, locale?: string): string;
|
|
51
|
+
/** Format a `YYYY-MM-DD` date (zone-free: rendered at UTC noon so no zone can shift the day). */
|
|
52
|
+
export declare function formatPlainDate(date: string, options: Intl.DateTimeFormatOptions, locale?: string): string;
|
|
53
|
+
/** Wall-clock array FullCalendar's NamedTimeZoneImpl speaks: [y, m0, d, h, min, s, ms]. */
|
|
54
|
+
export declare function epochToWallArray(ms: number, zone: string): number[];
|
|
55
|
+
/** Offset (minutes east of UTC) for a wall-clock array in `zone`, resolving gaps `compatible`. */
|
|
56
|
+
export declare function wallArrayOffset(a: number[], zone: string): number;
|