@burdenoff/microfe-calendar 2026.1123.1 → 2026.1123.2
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/CalendarRoutes.d.ts +3 -0
- package/dist/CalendarRoutes.js +37 -32
- package/dist/CalendarRoutes.js.map +1 -1
- package/dist/generated/global-operations.d.ts +74 -0
- package/dist/generated/global-operations.js +20 -0
- package/dist/generated/global-operations.js.map +1 -0
- package/dist/generated/global-types.d.ts +8 -1
- package/dist/generated/wspace-operations.d.ts +298 -0
- package/dist/generated/wspace-operations.js +126 -1
- package/dist/generated/wspace-operations.js.map +1 -1
- package/dist/generated/wspace-types.d.ts +204825 -48049
- package/dist/providers/CalendarProvider.d.ts +2 -0
- package/dist/providers/CalendarProvider.js +12 -10
- package/dist/providers/CalendarProvider.js.map +1 -1
- package/dist/translations/en.d.ts +5 -0
- package/dist/types/index.d.ts +6 -0
- package/dist/v2/CalendarPageV2.d.ts +1 -0
- package/dist/v2/CalendarPageV2.js +19 -0
- package/dist/v2/CalendarPageV2.js.map +1 -0
- package/dist/v2/CalendarRoutesV2.d.ts +1 -0
- package/dist/v2/CalendarRoutesV2.js +117 -0
- package/dist/v2/CalendarRoutesV2.js.map +1 -0
- package/dist/v2/data/invalidation.d.ts +4 -0
- package/dist/v2/data/normalize.d.ts +26 -0
- package/dist/v2/data/normalize.js +87 -0
- package/dist/v2/data/normalize.js.map +1 -0
- package/dist/v2/data/useCalendarsV2.d.ts +16 -0
- package/dist/v2/data/useCalendarsV2.js +25 -0
- package/dist/v2/data/useCalendarsV2.js.map +1 -0
- package/dist/v2/data/useEventsInRangeV2.d.ts +18 -0
- package/dist/v2/data/useFreeBusy.d.ts +22 -0
- package/dist/v2/data/useKeyedLoad.d.ts +17 -0
- package/dist/v2/prefs/CalendarPrefsProvider.d.ts +25 -0
- package/dist/v2/prefs/CalendarPrefsProvider.js +52 -0
- package/dist/v2/prefs/CalendarPrefsProvider.js.map +1 -0
- package/dist/v2/prefs/calendarPrefs.d.ts +73 -0
- package/dist/v2/prefs/calendarPrefs.js +71 -0
- package/dist/v2/prefs/calendarPrefs.js.map +1 -0
- package/dist/v2/prefs/prefsApi.d.ts +16 -0
- package/dist/v2/prefs/prefsApi.js +46 -0
- package/dist/v2/prefs/prefsApi.js.map +1 -0
- package/dist/v2/prefs/prefsSession.d.ts +55 -0
- package/dist/v2/prefs/prefsSession.js +94 -0
- package/dist/v2/prefs/prefsSession.js.map +1 -0
- package/dist/v2/prefs/prefsStorage.d.ts +17 -0
- package/dist/v2/prefs/prefsStorage.js +56 -0
- package/dist/v2/prefs/prefsStorage.js.map +1 -0
- package/dist/v2/routes.d.ts +43 -0
- package/dist/v2/routes.js +60 -0
- package/dist/v2/routes.js.map +1 -0
- package/dist/v2/state/calendarV2Store.d.ts +54 -0
- package/dist/v2/state/calendarV2Store.js +78 -0
- package/dist/v2/state/calendarV2Store.js.map +1 -0
- package/dist/v2/state/useCalendarV2Navigation.d.ts +25 -0
- package/dist/v2/state/useCalendarV2Navigation.js +52 -0
- package/dist/v2/state/useCalendarV2Navigation.js.map +1 -0
- package/dist/v2/state/useCalendarV2PrefsBridge.d.ts +1 -0
- package/dist/v2/state/useCalendarV2PrefsBridge.js +28 -0
- package/dist/v2/state/useCalendarV2PrefsBridge.js.map +1 -0
- package/dist/v2/time/calendarTime.d.ts +115 -0
- package/dist/v2/time/calendarTime.js +59 -0
- package/dist/v2/time/calendarTime.js.map +1 -0
- package/dist/v2/types.d.ts +202 -0
- package/package.json +12 -5
|
@@ -0,0 +1,202 @@
|
|
|
1
|
+
import { DateValue } from '@burdenoff/fe-libs/ui';
|
|
2
|
+
/** The views of the redesigned calendar. Phones show the week view as 3 days. */
|
|
3
|
+
export type CalendarV2View = 'day' | 'week' | 'month' | 'list';
|
|
4
|
+
/** The dialogs an address can open (`?dialog=`), where today's pages went (§2). */
|
|
5
|
+
export type CalendarV2Dialog = 'rooms' | 'share' | 'settings';
|
|
6
|
+
export type CalendarKindV2 = 'WORKSPACE' | 'GROUP' | 'PROJECT' | 'PERSONAL';
|
|
7
|
+
/** Where a calendar's events come from. `ICS_URL`: subscribed by link (read-only). */
|
|
8
|
+
export type CalendarSourceV2 = 'LOCAL' | 'ICS_URL' | 'GOOGLE_CALENDAR' | 'OUTLOOK_CALENDAR';
|
|
9
|
+
export type SyncProviderV2 = 'ICS_URL' | 'GOOGLE_CALENDAR' | 'OUTLOOK_CALENDAR' | 'CALDAV' | 'APPLE_ICAL';
|
|
10
|
+
export type SyncStatusV2 = 'ACTIVE' | 'PAUSED' | 'ERROR' | 'DISCONNECTED';
|
|
11
|
+
/** How an outside calendar is kept in step: what the rail says about it. */
|
|
12
|
+
export interface CalendarSyncV2 {
|
|
13
|
+
id: string;
|
|
14
|
+
provider: SyncProviderV2;
|
|
15
|
+
status: SyncStatusV2;
|
|
16
|
+
enabled: boolean;
|
|
17
|
+
lastSyncAt: Date | null;
|
|
18
|
+
lastSuccessAt: Date | null;
|
|
19
|
+
/**
|
|
20
|
+
* Why the last refresh failed (the API's `CalendarSyncProblem`, e.g. `NEEDS_SIGN_IN`,
|
|
21
|
+
* `LINK_GONE`); null after a good one.
|
|
22
|
+
*/
|
|
23
|
+
lastProblem: string | null;
|
|
24
|
+
/** Failed refreshes in a row; three or more stop the sync (status ERROR). */
|
|
25
|
+
consecutiveFailures: number;
|
|
26
|
+
/** The last refresh took longer than 5 seconds. */
|
|
27
|
+
slow: boolean;
|
|
28
|
+
/** Link subscriptions only: how often the link is re-read. */
|
|
29
|
+
refresh: 'HOURLY' | 'DAILY' | null;
|
|
30
|
+
/** Link subscriptions only: yours, or the whole workspace's. */
|
|
31
|
+
scope: 'PERSONAL' | 'WORKSPACE' | null;
|
|
32
|
+
}
|
|
33
|
+
/** A calendar as the redesigned pages show it. */
|
|
34
|
+
export interface CalendarV2 {
|
|
35
|
+
id: string;
|
|
36
|
+
name: string;
|
|
37
|
+
description: string | null;
|
|
38
|
+
/** The colour as stored; the views map it to a palette token, never use it raw. */
|
|
39
|
+
color: string | null;
|
|
40
|
+
kind: CalendarKindV2;
|
|
41
|
+
source: CalendarSourceV2;
|
|
42
|
+
isDefault: boolean;
|
|
43
|
+
isPublic: boolean;
|
|
44
|
+
/** Events can't be created, changed or deleted here (a calendar subscribed by link). */
|
|
45
|
+
isReadOnly: boolean;
|
|
46
|
+
createdBy: string;
|
|
47
|
+
ownerUserId: string | null;
|
|
48
|
+
ownerWorkspaceId: string | null;
|
|
49
|
+
ownerGroupId: string | null;
|
|
50
|
+
ownerProjectId: string | null;
|
|
51
|
+
timeZone: string | null;
|
|
52
|
+
/** The rail's section: "My calendars" or "Other calendars" (shared with you, followed). */
|
|
53
|
+
section: 'mine' | 'other';
|
|
54
|
+
/** The outside calendar it is kept in step with, if any. */
|
|
55
|
+
sync: CalendarSyncV2 | null;
|
|
56
|
+
}
|
|
57
|
+
export type EventStatusV2 = 'CONFIRMED' | 'TENTATIVE' | 'CANCELLED' | 'DRAFT';
|
|
58
|
+
export type EventVisibilityV2 = 'PUBLIC' | 'PRIVATE' | 'CONFIDENTIAL';
|
|
59
|
+
export type EventTypeV2 = 'MEETING' | 'TASK' | 'MILESTONE' | 'PROMPT';
|
|
60
|
+
/** A guest's answer. `NO_RESPONSE`: waiting for a reply. */
|
|
61
|
+
export type EventResponseV2 = 'ACCEPTED' | 'TENTATIVE' | 'DECLINED' | 'NO_RESPONSE';
|
|
62
|
+
export type LocationTypeV2 = 'PHYSICAL' | 'ONLINE' | 'HYBRID' | 'TBD';
|
|
63
|
+
export type MeetingProviderV2 = 'ZOOM' | 'GOOGLE_MEET' | 'MICROSOFT_TEAMS' | 'WEBEX' | 'CUSTOM';
|
|
64
|
+
export interface EventGuestV2 {
|
|
65
|
+
id: string;
|
|
66
|
+
userId: string | null;
|
|
67
|
+
email: string | null;
|
|
68
|
+
name: string | null;
|
|
69
|
+
response: EventResponseV2;
|
|
70
|
+
optional: boolean;
|
|
71
|
+
organizer: boolean;
|
|
72
|
+
}
|
|
73
|
+
export interface EventReminderV2 {
|
|
74
|
+
id: string;
|
|
75
|
+
minutesBefore: number;
|
|
76
|
+
channel: 'IN_APP' | 'EMAIL' | 'SMS';
|
|
77
|
+
}
|
|
78
|
+
/** A room or a thing booked for an event (`CalendarResourceBooking`). */
|
|
79
|
+
export interface EventBookingV2 {
|
|
80
|
+
id: string;
|
|
81
|
+
resourceId: string;
|
|
82
|
+
name: string | null;
|
|
83
|
+
resourceType: string | null;
|
|
84
|
+
location: string | null;
|
|
85
|
+
capacity: number | null;
|
|
86
|
+
status: 'PENDING' | 'APPROVED' | 'REJECTED' | 'CANCELLED' | 'COMPLETED';
|
|
87
|
+
start: Date;
|
|
88
|
+
end: Date;
|
|
89
|
+
}
|
|
90
|
+
/** An event as the redesigned views show it. */
|
|
91
|
+
export interface CalendarEventV2 {
|
|
92
|
+
id: string;
|
|
93
|
+
calendarId: string;
|
|
94
|
+
title: string;
|
|
95
|
+
description: string | null;
|
|
96
|
+
start: Date;
|
|
97
|
+
end: Date;
|
|
98
|
+
/** Whole days: place it with `allDayDays`, not by `start` and `end`. */
|
|
99
|
+
allDay: boolean;
|
|
100
|
+
/** The IANA zone the event was written in, when it names a real one. */
|
|
101
|
+
timeZone: string | null;
|
|
102
|
+
status: EventStatusV2;
|
|
103
|
+
visibility: EventVisibilityV2;
|
|
104
|
+
type: EventTypeV2;
|
|
105
|
+
isRecurring: boolean;
|
|
106
|
+
rrule: string | null;
|
|
107
|
+
/** Who made the event (the organiser). */
|
|
108
|
+
organizerId: string;
|
|
109
|
+
guests: EventGuestV2[];
|
|
110
|
+
/** The signed-in person's answer when they are a guest; null when they aren't one. */
|
|
111
|
+
myResponse: EventResponseV2 | null;
|
|
112
|
+
location: string | null;
|
|
113
|
+
locationAddress: string | null;
|
|
114
|
+
locationType: LocationTypeV2 | null;
|
|
115
|
+
locationUrl: string | null;
|
|
116
|
+
meeting: {
|
|
117
|
+
provider: MeetingProviderV2 | null;
|
|
118
|
+
url: string;
|
|
119
|
+
} | null;
|
|
120
|
+
reminders: EventReminderV2[];
|
|
121
|
+
bookings: EventBookingV2[];
|
|
122
|
+
tags: string[];
|
|
123
|
+
metadata: Record<string, unknown> | null;
|
|
124
|
+
createdAt: Date;
|
|
125
|
+
updatedAt: Date;
|
|
126
|
+
}
|
|
127
|
+
/**
|
|
128
|
+
* A timed event's piece on one day, on the clock of the calendar's time zone
|
|
129
|
+
* (`timedSegments`). Minutes run from the day's midnight on the clock, 0 to 1440: on the day
|
|
130
|
+
* the clocks change, the grid is still a 24-hour clock face.
|
|
131
|
+
*/
|
|
132
|
+
export interface TimedSegment {
|
|
133
|
+
date: DateValue;
|
|
134
|
+
startMinute: number;
|
|
135
|
+
endMinute: number;
|
|
136
|
+
/** The event began on an earlier day. */
|
|
137
|
+
continuesBefore: boolean;
|
|
138
|
+
/** The event goes on past this day. */
|
|
139
|
+
continuesAfter: boolean;
|
|
140
|
+
}
|
|
141
|
+
/** A segment placed by the overlap layout: cluster → columns → widen into free columns. */
|
|
142
|
+
export interface PlacedSegment<T = CalendarEventV2> extends TimedSegment {
|
|
143
|
+
event: T;
|
|
144
|
+
/** Its column, from 0. */
|
|
145
|
+
column: number;
|
|
146
|
+
/** The columns its cluster of overlapping events needs. */
|
|
147
|
+
columns: number;
|
|
148
|
+
/** The columns it spans once widened into the free ones beside it (at least 1). */
|
|
149
|
+
span: number;
|
|
150
|
+
}
|
|
151
|
+
/** An all-day (or many-day) bar in one week row: a lane, and the row's days it covers. */
|
|
152
|
+
export interface AllDayBar<T = CalendarEventV2> {
|
|
153
|
+
event: T;
|
|
154
|
+
/** The row's days it covers: indexes into the row's days, both included. */
|
|
155
|
+
firstIndex: number;
|
|
156
|
+
lastIndex: number;
|
|
157
|
+
/** Its lane, from 0 (the top). */
|
|
158
|
+
lane: number;
|
|
159
|
+
/** The event began before the row's first day. */
|
|
160
|
+
continuesBefore: boolean;
|
|
161
|
+
/** The event goes on past the row's last day. */
|
|
162
|
+
continuesAfter: boolean;
|
|
163
|
+
}
|
|
164
|
+
/** One week row's all-day lanes: the bars shown, and per day the ones that did not fit. */
|
|
165
|
+
export interface AllDayLanes<T = CalendarEventV2> {
|
|
166
|
+
bars: AllDayBar<T>[];
|
|
167
|
+
/** Lanes in use (at most the row's limit; the rest become "+N more"). */
|
|
168
|
+
laneCount: number;
|
|
169
|
+
/** Per day of the row: the events past the lane limit ("+N more"). */
|
|
170
|
+
hiddenPerDay: number[];
|
|
171
|
+
}
|
|
172
|
+
export type FreeBusyKindV2 = 'BUSY' | 'TENTATIVE' | 'OUT_OF_OFFICE';
|
|
173
|
+
/**
|
|
174
|
+
* A block of a person's time: when, never what, where or with whom. An all-day block
|
|
175
|
+
* (`allDay`) covers whole days: place it with `allDayDays`, not by its instants.
|
|
176
|
+
*/
|
|
177
|
+
export interface BusyBlockV2 {
|
|
178
|
+
start: Date;
|
|
179
|
+
end: Date;
|
|
180
|
+
kind: FreeBusyKindV2;
|
|
181
|
+
allDay: boolean;
|
|
182
|
+
}
|
|
183
|
+
/**
|
|
184
|
+
* A person's working hours on one day of the week, on the clock of `timeZone`, in minutes
|
|
185
|
+
* after midnight (`end` may be 1440, "24:00"; an `end` before `start` runs past midnight).
|
|
186
|
+
*/
|
|
187
|
+
export interface WorkingHoursV2 {
|
|
188
|
+
/** 0 Sunday to 6 Saturday. */
|
|
189
|
+
weekday: number;
|
|
190
|
+
start: number;
|
|
191
|
+
end: number;
|
|
192
|
+
timeZone: string;
|
|
193
|
+
}
|
|
194
|
+
/** One workspace member's free/busy over the asked range. */
|
|
195
|
+
export interface PersonFreeBusyV2 {
|
|
196
|
+
userId: string;
|
|
197
|
+
/** Sorted by start. Timed blocks never overlap each other, nor all-day blocks each other. */
|
|
198
|
+
blocks: BusyBlockV2[];
|
|
199
|
+
workingHours: WorkingHoursV2[];
|
|
200
|
+
/** Some busy time may be missing: the service reached a limit on the work. */
|
|
201
|
+
truncated: boolean;
|
|
202
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@burdenoff/microfe-calendar",
|
|
3
|
-
"version": "2026.1123.
|
|
3
|
+
"version": "2026.1123.2",
|
|
4
4
|
"description": "Calendar microfrontend for Burdenoff products",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"files": [
|
|
@@ -30,9 +30,9 @@
|
|
|
30
30
|
"format": "bun fmt src",
|
|
31
31
|
"format:check": "bun fmt --check src",
|
|
32
32
|
"type:check": "boff gate -- bun check --no-pretty -b",
|
|
33
|
-
"test": "bun test",
|
|
34
|
-
"test:watch": "bun test --watch",
|
|
35
|
-
"test:coverage": "bun test --coverage",
|
|
33
|
+
"test": "bun test --isolate",
|
|
34
|
+
"test:watch": "bun test --isolate --watch",
|
|
35
|
+
"test:coverage": "bun test --isolate --coverage",
|
|
36
36
|
"sanity": "boff sanity",
|
|
37
37
|
"sanity:force": "boff sanity --force",
|
|
38
38
|
"audit": "bun audit --audit-level=high",
|
|
@@ -44,7 +44,7 @@
|
|
|
44
44
|
},
|
|
45
45
|
"dependencies": {
|
|
46
46
|
"@apollo/client": "^4.3.6",
|
|
47
|
-
"@burdenoff/fe-libs": "2026.
|
|
47
|
+
"@burdenoff/fe-libs": "2026.1123.3",
|
|
48
48
|
"@tanstack/react-query": "^5.105.3",
|
|
49
49
|
"graphql": "^17.0.2",
|
|
50
50
|
"graphql-ws": "^5.16.2",
|
|
@@ -64,6 +64,8 @@
|
|
|
64
64
|
"@graphql-codegen/typescript": "^7.0.1",
|
|
65
65
|
"@graphql-codegen/typescript-operations": "^7.0.1",
|
|
66
66
|
"@graphql-codegen/typescript-react-apollo": "^6.0.1",
|
|
67
|
+
"@happy-dom/global-registrator": "^21.0.4",
|
|
68
|
+
"@testing-library/react": "^16.3.3",
|
|
67
69
|
"@types/bun": "^1.4.4",
|
|
68
70
|
"@types/node": "^24.19.2",
|
|
69
71
|
"@types/react": "^19.3.0",
|
|
@@ -112,6 +114,11 @@
|
|
|
112
114
|
"formatPaths": [
|
|
113
115
|
"src"
|
|
114
116
|
]
|
|
117
|
+
},
|
|
118
|
+
"scripts": {
|
|
119
|
+
"unmanaged": [
|
|
120
|
+
"test"
|
|
121
|
+
]
|
|
115
122
|
}
|
|
116
123
|
}
|
|
117
124
|
}
|