@burdenoff/microfe-calendar 2026.610.1 → 2026.625.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/components/AgendaView.js +47 -36
- package/dist/components/AgendaView.js.map +1 -1
- package/dist/pages/CalendarPage.js +199 -155
- package/dist/pages/CalendarPage.js.map +1 -1
- package/dist/pages/EventDetailsPage.js +495 -459
- package/dist/pages/EventDetailsPage.js.map +1 -1
- package/dist/pages/ResourcesPage.js +201 -187
- package/dist/pages/ResourcesPage.js.map +1 -1
- package/dist/pages/SettingsPage.js +413 -351
- package/dist/pages/SettingsPage.js.map +1 -1
- package/dist/pages/SubscriptionsPage.js +55 -52
- package/dist/pages/SubscriptionsPage.js.map +1 -1
- package/package.json +3 -2
|
@@ -1,256 +1,300 @@
|
|
|
1
1
|
import { useCalendar as e } from "../providers/CalendarProvider.js";
|
|
2
2
|
import { useGetCalendarsQuery as t } from "../generated/wspace-operations.js";
|
|
3
3
|
import { useCalendarStore as n } from "../store/calendarStore.js";
|
|
4
|
-
import { useSafePermissions as
|
|
5
|
-
import { formatDate as
|
|
6
|
-
import { WeekView as
|
|
7
|
-
import { MonthView as
|
|
8
|
-
import { DayView as
|
|
9
|
-
import { AgendaView as
|
|
10
|
-
import { YearView as
|
|
11
|
-
import { TimelineView as
|
|
12
|
-
import { ViewSwitcher as
|
|
13
|
-
import { MiniCalendar as
|
|
14
|
-
import { EventFormModal as
|
|
15
|
-
import { CALENDAR_PERMISSIONS as
|
|
16
|
-
import { useEffect as
|
|
17
|
-
import { AccessDenied as
|
|
18
|
-
import { useI18n as
|
|
19
|
-
import { ChevronLeft as
|
|
20
|
-
import { useParams as
|
|
21
|
-
import { jsx as
|
|
4
|
+
import { useSafePermissions as ee } from "../hooks/useSafePermissions.js";
|
|
5
|
+
import { formatDate as r } from "../utils/dateHelpers.js";
|
|
6
|
+
import { WeekView as i } from "../components/WeekView.js";
|
|
7
|
+
import { MonthView as a } from "../components/MonthView.js";
|
|
8
|
+
import { DayView as o } from "../components/DayView.js";
|
|
9
|
+
import { AgendaView as s } from "../components/AgendaView.js";
|
|
10
|
+
import { YearView as c } from "../components/YearView.js";
|
|
11
|
+
import { TimelineView as l } from "../components/TimelineView.js";
|
|
12
|
+
import { ViewSwitcher as u } from "../components/ViewSwitcher.js";
|
|
13
|
+
import { MiniCalendar as d } from "../components/MiniCalendar.js";
|
|
14
|
+
import { EventFormModal as te } from "../components/EventFormModal.js";
|
|
15
|
+
import { CALENDAR_PERMISSIONS as f } from "../constants/permissions.js";
|
|
16
|
+
import { useEffect as ne, useState as p } from "react";
|
|
17
|
+
import { AccessDenied as m } from "@burdenoff/fe-libs/shared/components";
|
|
18
|
+
import { useI18n as re } from "@burdenoff/fe-libs/shared/providers/shell/I18nProvider";
|
|
19
|
+
import { CalendarPlus as h, ChevronLeft as g, ChevronRight as _, DoorOpen as v, PanelLeft as y, Plus as b, Rss as x, Search as ie, Settings2 as S } from "lucide-react";
|
|
20
|
+
import { useParams as ae } from "react-router-dom";
|
|
21
|
+
import { jsx as C, jsxs as w } from "react/jsx-runtime";
|
|
22
|
+
import { AuroraBackground as T, GradientText as E, NextSteps as D, PagePurpose as O } from "@burdenoff/fe-libs/ui";
|
|
22
23
|
//#region src/pages/CalendarPage.tsx
|
|
23
|
-
function
|
|
24
|
-
let { viewType:
|
|
25
|
-
let n =
|
|
24
|
+
function k() {
|
|
25
|
+
let { viewType: k } = ae(), { hasPermission: A, isLoading: j } = ee(), { navigate: M, basePath: N } = e(), P = n((e) => e.currentView), F = n((e) => e.currentDate), I = n((e) => e.setView), L = n((e) => e.navigateDate), R = n((e) => e.miniCalendarVisible), z = n((e) => e.toggleMiniCalendar), B = n((e) => e.visibleCalendars), V = n((e) => e.setVisibleCalendars), H = n((e) => e.eventFilter), U = n((e) => e.updateEventFilter), { t: W } = re(), G = (e, t) => {
|
|
26
|
+
let n = W(e);
|
|
26
27
|
return n === e ? t : n;
|
|
27
|
-
}, [
|
|
28
|
-
|
|
28
|
+
}, [K, q] = p(!1), [J, Y] = p(null), X = A(f.CALENDAR_EVENT_CREATE), Z = X ? (e, t) => {
|
|
29
|
+
Y({
|
|
29
30
|
date: e,
|
|
30
31
|
hour: t ?? 9
|
|
31
|
-
}),
|
|
32
|
-
} : void 0, { data:
|
|
32
|
+
}), q(!0);
|
|
33
|
+
} : void 0, { data: oe } = t({
|
|
33
34
|
variables: { pagination: { limit: 50 } },
|
|
34
|
-
skip:
|
|
35
|
-
}), Q =
|
|
35
|
+
skip: j
|
|
36
|
+
}), Q = oe?.calendars?.calendars ?? [], $ = B.size > 0 ? B : new Set(Q.map((e) => e.id)), se = (e) => {
|
|
36
37
|
let t = new Set($);
|
|
37
|
-
t.has(e) ? t.delete(e) : t.add(e),
|
|
38
|
+
t.has(e) ? t.delete(e) : t.add(e), V(Array.from(t));
|
|
38
39
|
};
|
|
39
|
-
return
|
|
40
|
-
|
|
40
|
+
return ne(() => {
|
|
41
|
+
k && k !== P && I(k);
|
|
41
42
|
}, [
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
]),
|
|
43
|
+
k,
|
|
44
|
+
P,
|
|
45
|
+
I
|
|
46
|
+
]), j ? /* @__PURE__ */ C("div", {
|
|
46
47
|
className: "@container min-h-screen bg-bg-canvas flex items-center justify-center",
|
|
47
|
-
children: /* @__PURE__ */
|
|
48
|
+
children: /* @__PURE__ */ C("p", {
|
|
48
49
|
className: "font-text-md text-text-secondary",
|
|
49
|
-
children:
|
|
50
|
+
children: G("calendar.loading", "Loading...")
|
|
50
51
|
})
|
|
51
|
-
}) :
|
|
52
|
+
}) : A(f.CALENDAR_READ) ? /* @__PURE__ */ w("div", {
|
|
52
53
|
className: "@container min-h-screen bg-bg-canvas",
|
|
53
54
|
children: [
|
|
54
|
-
/* @__PURE__ */
|
|
55
|
-
className: "border-b border-border-
|
|
56
|
-
children:
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
className: "flex items-center gap-
|
|
60
|
-
children: [
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
className: "size-9 inline-flex items-center justify-center rounded-radius-md border border-border-default bg-bg-surface hover:bg-bg-elevated text-text-primary transition-colors",
|
|
65
|
-
"aria-label": W("calendar.toggleSidebar", "Toggle sidebar"),
|
|
66
|
-
children: /* @__PURE__ */ E(x, { className: "size-4" })
|
|
67
|
-
}),
|
|
68
|
-
/* @__PURE__ */ E("button", {
|
|
69
|
-
type: "button",
|
|
70
|
-
onClick: () => I("today"),
|
|
71
|
-
className: "px-element-padding py-element-padding-sm rounded-radius-md border border-border-default bg-bg-surface hover:bg-bg-elevated font-text-sm font-weight-medium text-text-primary transition-colors",
|
|
72
|
-
children: W("calendar.today", "Today")
|
|
73
|
-
}),
|
|
74
|
-
/* @__PURE__ */ D("div", {
|
|
75
|
-
className: "flex items-center gap-inline-gap-sm",
|
|
76
|
-
children: [/* @__PURE__ */ E("button", {
|
|
55
|
+
/* @__PURE__ */ w("header", {
|
|
56
|
+
className: "relative overflow-hidden border-b border-border-seam bg-bg-surface px-page-padding py-element-padding",
|
|
57
|
+
children: [
|
|
58
|
+
/* @__PURE__ */ C(T, { intensity: "subtle" }),
|
|
59
|
+
/* @__PURE__ */ w("div", {
|
|
60
|
+
className: "flex flex-col @lg:flex-row @lg:items-center @lg:justify-between gap-stack-gap",
|
|
61
|
+
children: [/* @__PURE__ */ w("div", {
|
|
62
|
+
className: "flex items-center gap-inline-gap",
|
|
63
|
+
children: [
|
|
64
|
+
/* @__PURE__ */ C("button", {
|
|
77
65
|
type: "button",
|
|
78
|
-
onClick:
|
|
66
|
+
onClick: z,
|
|
79
67
|
className: "size-9 inline-flex items-center justify-center rounded-radius-md border border-border-default bg-bg-surface hover:bg-bg-elevated text-text-primary transition-colors",
|
|
80
|
-
"aria-label":
|
|
81
|
-
children: /* @__PURE__ */
|
|
82
|
-
}),
|
|
68
|
+
"aria-label": G("calendar.toggleSidebar", "Toggle sidebar"),
|
|
69
|
+
children: /* @__PURE__ */ C(y, { className: "size-4" })
|
|
70
|
+
}),
|
|
71
|
+
/* @__PURE__ */ C("button", {
|
|
83
72
|
type: "button",
|
|
84
|
-
onClick: () =>
|
|
85
|
-
className: "
|
|
86
|
-
|
|
87
|
-
|
|
73
|
+
onClick: () => L("today"),
|
|
74
|
+
className: "px-element-padding py-element-padding-sm rounded-radius-md border border-border-default bg-bg-surface hover:bg-bg-elevated font-text-sm font-weight-medium text-text-primary transition-colors",
|
|
75
|
+
children: G("calendar.today", "Today")
|
|
76
|
+
}),
|
|
77
|
+
/* @__PURE__ */ w("div", {
|
|
78
|
+
className: "flex items-center gap-inline-gap-sm",
|
|
79
|
+
children: [/* @__PURE__ */ C("button", {
|
|
80
|
+
type: "button",
|
|
81
|
+
onClick: () => L("prev"),
|
|
82
|
+
className: "size-9 inline-flex items-center justify-center rounded-radius-md border border-border-default bg-bg-surface hover:bg-bg-elevated text-text-primary transition-colors",
|
|
83
|
+
"aria-label": G("calendar.previous", "Previous"),
|
|
84
|
+
children: /* @__PURE__ */ C(g, { className: "size-4" })
|
|
85
|
+
}), /* @__PURE__ */ C("button", {
|
|
86
|
+
type: "button",
|
|
87
|
+
onClick: () => L("next"),
|
|
88
|
+
className: "size-9 inline-flex items-center justify-center rounded-radius-md border border-border-default bg-bg-surface hover:bg-bg-elevated text-text-primary transition-colors",
|
|
89
|
+
"aria-label": G("calendar.next", "Next"),
|
|
90
|
+
children: /* @__PURE__ */ C(_, { className: "size-4" })
|
|
91
|
+
})]
|
|
92
|
+
}),
|
|
93
|
+
/* @__PURE__ */ C("h2", {
|
|
94
|
+
className: "font-heading-md text-text-primary tabular-nums",
|
|
95
|
+
children: /* @__PURE__ */ C(E, { children: r(F) })
|
|
96
|
+
})
|
|
97
|
+
]
|
|
98
|
+
}), /* @__PURE__ */ w("div", {
|
|
99
|
+
className: "flex items-center gap-inline-gap",
|
|
100
|
+
children: [/* @__PURE__ */ C(u, {}), X ? /* @__PURE__ */ w("button", {
|
|
101
|
+
type: "button",
|
|
102
|
+
onClick: () => {
|
|
103
|
+
Y(null), q(!0);
|
|
104
|
+
},
|
|
105
|
+
className: "inline-flex items-center gap-inline-gap-sm px-element-padding py-element-padding-sm rounded-radius-md bg-action-primary-bg text-action-primary-fg font-text-sm font-weight-medium hover:bg-action-primary-bg-hover transition-colors",
|
|
106
|
+
children: [/* @__PURE__ */ C(b, { className: "size-4" }), /* @__PURE__ */ C("span", {
|
|
107
|
+
className: "hidden @sm:inline",
|
|
108
|
+
children: G("calendar.createEvent", "Create Event")
|
|
88
109
|
})]
|
|
89
|
-
})
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
})
|
|
96
|
-
|
|
97
|
-
children: [/* @__PURE__ */ E(d, {}), Y ? /* @__PURE__ */ D("button", {
|
|
98
|
-
type: "button",
|
|
99
|
-
onClick: () => {
|
|
100
|
-
J(null), K(!0);
|
|
101
|
-
},
|
|
102
|
-
className: "inline-flex items-center gap-inline-gap-sm px-element-padding py-element-padding-sm rounded-radius-md bg-action-primary-bg text-action-primary-fg font-text-sm font-weight-medium hover:bg-action-primary-bg-hover transition-colors",
|
|
103
|
-
children: [/* @__PURE__ */ E(S, { className: "size-4" }), /* @__PURE__ */ E("span", {
|
|
104
|
-
className: "hidden @sm:inline",
|
|
105
|
-
children: W("calendar.createEvent", "Create Event")
|
|
106
|
-
})]
|
|
107
|
-
}) : null]
|
|
108
|
-
})]
|
|
109
|
-
})
|
|
110
|
+
}) : null]
|
|
111
|
+
})]
|
|
112
|
+
}),
|
|
113
|
+
/* @__PURE__ */ C(O, {
|
|
114
|
+
className: "relative mt-element-padding max-w-3xl",
|
|
115
|
+
children: G("calendar.pagePurpose", "Your shared schedule. See, create, and manage events across day, week, month, agenda, and timeline views — then toggle calendars, search, and overlay scheduled jobs from the sidebar so the whole team stays in sync.")
|
|
116
|
+
})
|
|
117
|
+
]
|
|
110
118
|
}),
|
|
111
|
-
/* @__PURE__ */
|
|
119
|
+
/* @__PURE__ */ w("div", {
|
|
112
120
|
className: "flex min-h-0 flex-1",
|
|
113
|
-
children: [
|
|
114
|
-
className: "hidden @lg:block w-72 border-r border-border-
|
|
121
|
+
children: [R && /* @__PURE__ */ w("aside", {
|
|
122
|
+
className: "hidden @lg:block w-72 border-r border-border-seam bg-bg-surface p-section-padding space-y-5",
|
|
115
123
|
children: [
|
|
116
|
-
/* @__PURE__ */
|
|
117
|
-
/* @__PURE__ */
|
|
124
|
+
/* @__PURE__ */ C(d, {}),
|
|
125
|
+
/* @__PURE__ */ w("div", {
|
|
118
126
|
className: "space-y-3",
|
|
119
|
-
children: [/* @__PURE__ */
|
|
127
|
+
children: [/* @__PURE__ */ w("div", {
|
|
120
128
|
className: "flex items-center gap-2",
|
|
121
|
-
children: [/* @__PURE__ */
|
|
129
|
+
children: [/* @__PURE__ */ C(ie, { className: "size-4 text-text-secondary" }), /* @__PURE__ */ C("input", {
|
|
122
130
|
type: "search",
|
|
123
|
-
value:
|
|
124
|
-
onChange: (e) =>
|
|
125
|
-
placeholder:
|
|
126
|
-
"aria-label":
|
|
131
|
+
value: H.search ?? "",
|
|
132
|
+
onChange: (e) => U({ search: e.target.value.trim() || void 0 }),
|
|
133
|
+
placeholder: G("calendar.searchEvents", "Search events, tags, or calendars"),
|
|
134
|
+
"aria-label": G("calendar.searchEvents", "Search events, tags, or calendars"),
|
|
127
135
|
className: "w-full px-3 py-2 rounded-radius-md border border-border-default bg-bg-canvas text-text-primary font-text-sm placeholder:text-text-tertiary focus:outline-none focus:ring-2 focus:ring-action-primary-border"
|
|
128
136
|
})]
|
|
129
|
-
}), /* @__PURE__ */
|
|
130
|
-
value:
|
|
131
|
-
onChange: (e) =>
|
|
137
|
+
}), /* @__PURE__ */ w("select", {
|
|
138
|
+
value: H.status?.[0] ?? "",
|
|
139
|
+
onChange: (e) => U({ status: e.target.value ? [e.target.value] : void 0 }),
|
|
132
140
|
className: "w-full px-3 py-2 rounded-radius-md border border-border-default bg-bg-canvas text-text-primary font-text-sm focus:outline-none focus:ring-2 focus:ring-action-primary-border",
|
|
133
141
|
children: [
|
|
134
|
-
/* @__PURE__ */
|
|
142
|
+
/* @__PURE__ */ C("option", {
|
|
135
143
|
value: "",
|
|
136
|
-
children:
|
|
144
|
+
children: G("calendar.allStatuses", "All statuses")
|
|
137
145
|
}),
|
|
138
|
-
/* @__PURE__ */
|
|
146
|
+
/* @__PURE__ */ C("option", {
|
|
139
147
|
value: "CONFIRMED",
|
|
140
|
-
children:
|
|
148
|
+
children: G("calendar.eventStatusConfirmed", "Confirmed")
|
|
141
149
|
}),
|
|
142
|
-
/* @__PURE__ */
|
|
150
|
+
/* @__PURE__ */ C("option", {
|
|
143
151
|
value: "TENTATIVE",
|
|
144
|
-
children:
|
|
152
|
+
children: G("calendar.eventStatusTentative", "Tentative")
|
|
145
153
|
}),
|
|
146
|
-
/* @__PURE__ */
|
|
154
|
+
/* @__PURE__ */ C("option", {
|
|
147
155
|
value: "CANCELLED",
|
|
148
|
-
children:
|
|
156
|
+
children: G("calendar.eventStatusCancelled", "Cancelled")
|
|
149
157
|
})
|
|
150
158
|
]
|
|
151
159
|
})]
|
|
152
160
|
}),
|
|
153
|
-
/* @__PURE__ */
|
|
161
|
+
/* @__PURE__ */ w("div", {
|
|
154
162
|
className: "space-y-3",
|
|
155
163
|
children: [
|
|
156
|
-
/* @__PURE__ */
|
|
164
|
+
/* @__PURE__ */ w("div", {
|
|
157
165
|
className: "flex items-center justify-between",
|
|
158
|
-
children: [/* @__PURE__ */
|
|
166
|
+
children: [/* @__PURE__ */ C("h3", {
|
|
159
167
|
className: "font-text-sm font-weight-semibold text-text-primary",
|
|
160
|
-
children:
|
|
161
|
-
}), /* @__PURE__ */
|
|
168
|
+
children: G("calendar.visibleCalendars", "Visible calendars")
|
|
169
|
+
}), /* @__PURE__ */ C("button", {
|
|
162
170
|
type: "button",
|
|
163
|
-
onClick: () =>
|
|
171
|
+
onClick: () => V([]),
|
|
164
172
|
className: "font-text-xs text-action-primary-bg hover:underline",
|
|
165
|
-
children:
|
|
173
|
+
children: G("calendar.showAll", "Show all")
|
|
166
174
|
})]
|
|
167
175
|
}),
|
|
168
|
-
/* @__PURE__ */
|
|
176
|
+
/* @__PURE__ */ C("div", {
|
|
169
177
|
className: "space-y-2 max-h-[280px] overflow-auto pr-1",
|
|
170
|
-
children: Q.map((e) => /* @__PURE__ */
|
|
178
|
+
children: Q.map((e) => /* @__PURE__ */ w("label", {
|
|
171
179
|
className: "flex items-center gap-3 rounded-radius-md border border-border-subtle px-3 py-2 hover:bg-bg-canvas",
|
|
172
180
|
children: [
|
|
173
|
-
/* @__PURE__ */
|
|
181
|
+
/* @__PURE__ */ C("input", {
|
|
174
182
|
type: "checkbox",
|
|
175
183
|
checked: $.has(e.id),
|
|
176
|
-
onChange: () =>
|
|
184
|
+
onChange: () => se(e.id),
|
|
177
185
|
className: "size-4 rounded border-border-default",
|
|
178
186
|
"aria-label": e.name
|
|
179
187
|
}),
|
|
180
|
-
/* @__PURE__ */
|
|
188
|
+
/* @__PURE__ */ C("span", {
|
|
181
189
|
className: "size-3 rounded-full shrink-0",
|
|
182
190
|
style: { backgroundColor: e.color ?? "var(--color-action-primary-bg)" }
|
|
183
191
|
}),
|
|
184
|
-
/* @__PURE__ */
|
|
192
|
+
/* @__PURE__ */ C("span", {
|
|
185
193
|
className: "min-w-0 flex-1 truncate font-text-sm text-text-primary",
|
|
186
194
|
children: e.name
|
|
187
195
|
})
|
|
188
196
|
]
|
|
189
197
|
}, e.id))
|
|
190
198
|
}),
|
|
191
|
-
/* @__PURE__ */
|
|
199
|
+
/* @__PURE__ */ w("div", {
|
|
192
200
|
className: "rounded-radius-md border border-border-subtle bg-bg-canvas px-3 py-2",
|
|
193
|
-
children: [/* @__PURE__ */
|
|
201
|
+
children: [/* @__PURE__ */ C("p", {
|
|
194
202
|
className: "font-text-xs font-weight-semibold text-text-primary mb-1",
|
|
195
|
-
children:
|
|
196
|
-
}), /* @__PURE__ */
|
|
203
|
+
children: G("calendar.schedulerOverlay", "Scheduler overlay")
|
|
204
|
+
}), /* @__PURE__ */ C("p", {
|
|
197
205
|
className: "font-text-xs text-text-secondary",
|
|
198
|
-
children:
|
|
206
|
+
children: G("calendar.schedulerOverlayDescription", "Scheduled jobs from scheduler are shown in calendar views and deep-link to /scheduler.")
|
|
199
207
|
})]
|
|
200
208
|
})
|
|
201
209
|
]
|
|
202
210
|
}),
|
|
203
|
-
/* @__PURE__ */
|
|
211
|
+
/* @__PURE__ */ w("div", {
|
|
204
212
|
className: "space-y-2 pt-2 border-t border-border-subtle",
|
|
205
213
|
children: [
|
|
206
|
-
/* @__PURE__ */
|
|
214
|
+
/* @__PURE__ */ w("button", {
|
|
207
215
|
type: "button",
|
|
208
|
-
onClick: () =>
|
|
216
|
+
onClick: () => M(`${N}/settings`),
|
|
209
217
|
className: "w-full inline-flex items-center gap-2 px-3 py-2 rounded-radius-md border border-border-default bg-bg-canvas hover:bg-bg-elevated text-text-primary font-text-sm",
|
|
210
|
-
children: [/* @__PURE__ */
|
|
218
|
+
children: [/* @__PURE__ */ C(S, { className: "size-4" }), G("calendar.manageCalendarSettings", "Manage calendar settings")]
|
|
211
219
|
}),
|
|
212
|
-
/* @__PURE__ */
|
|
220
|
+
/* @__PURE__ */ C("button", {
|
|
213
221
|
type: "button",
|
|
214
|
-
onClick: () =>
|
|
222
|
+
onClick: () => M(`${N}/resources`),
|
|
215
223
|
className: "w-full inline-flex items-center gap-2 px-3 py-2 rounded-radius-md border border-border-default bg-bg-canvas hover:bg-bg-elevated text-text-primary font-text-sm",
|
|
216
|
-
children:
|
|
224
|
+
children: G("calendar.openResources", "Open resources")
|
|
217
225
|
}),
|
|
218
|
-
/* @__PURE__ */
|
|
226
|
+
/* @__PURE__ */ C("button", {
|
|
219
227
|
type: "button",
|
|
220
|
-
onClick: () =>
|
|
228
|
+
onClick: () => M(`${N}/subscriptions`),
|
|
221
229
|
className: "w-full inline-flex items-center gap-2 px-3 py-2 rounded-radius-md border border-border-default bg-bg-canvas hover:bg-bg-elevated text-text-primary font-text-sm",
|
|
222
|
-
children:
|
|
230
|
+
children: G("calendar.exportAndSubscriptions", "Export and subscriptions")
|
|
223
231
|
})
|
|
224
232
|
]
|
|
225
233
|
})
|
|
226
234
|
]
|
|
227
|
-
}), /* @__PURE__ */
|
|
235
|
+
}), /* @__PURE__ */ w("div", {
|
|
228
236
|
className: "min-w-0 flex-1 p-page-padding",
|
|
229
237
|
children: [
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
238
|
+
/* @__PURE__ */ C(D, {
|
|
239
|
+
storageKey: "calendar-overview",
|
|
240
|
+
className: "mb-stack-gap",
|
|
241
|
+
steps: [
|
|
242
|
+
...X ? [{
|
|
243
|
+
id: "create-event",
|
|
244
|
+
label: G("calendar.nextStepCreateEvent", "Create your first event"),
|
|
245
|
+
description: G("calendar.nextStepCreateEventDesc", "Add a meeting, reminder, or all-day event to this calendar."),
|
|
246
|
+
icon: /* @__PURE__ */ C(h, { className: "size-4" }),
|
|
247
|
+
onClick: () => {
|
|
248
|
+
Y(null), q(!0);
|
|
249
|
+
}
|
|
250
|
+
}] : [],
|
|
251
|
+
{
|
|
252
|
+
id: "book-resources",
|
|
253
|
+
label: G("calendar.nextStepResources", "Book rooms and resources"),
|
|
254
|
+
description: G("calendar.nextStepResourcesDesc", "Reserve conference rooms, equipment, and desks for your events."),
|
|
255
|
+
icon: /* @__PURE__ */ C(v, { className: "size-4" }),
|
|
256
|
+
onClick: () => M(`${N}/resources`)
|
|
257
|
+
},
|
|
258
|
+
{
|
|
259
|
+
id: "export-subscribe",
|
|
260
|
+
label: G("calendar.nextStepSubscriptions", "Export or subscribe"),
|
|
261
|
+
description: G("calendar.nextStepSubscriptionsDesc", "Download ICS files to sync with Google, Apple, or Outlook calendars."),
|
|
262
|
+
icon: /* @__PURE__ */ C(x, { className: "size-4" }),
|
|
263
|
+
onClick: () => M(`${N}/subscriptions`)
|
|
264
|
+
},
|
|
265
|
+
{
|
|
266
|
+
id: "tune-settings",
|
|
267
|
+
label: G("calendar.nextStepSettings", "Tune your calendar settings"),
|
|
268
|
+
description: G("calendar.nextStepSettingsDesc", "Set availability, sharing, booking pages, and default view."),
|
|
269
|
+
icon: /* @__PURE__ */ C(S, { className: "size-4" }),
|
|
270
|
+
onClick: () => M(`${N}/settings`)
|
|
271
|
+
}
|
|
272
|
+
]
|
|
273
|
+
}),
|
|
274
|
+
P === "day" && /* @__PURE__ */ C(o, { onCreateSlot: Z }),
|
|
275
|
+
P === "week" && /* @__PURE__ */ C(i, { onCreateSlot: Z }),
|
|
276
|
+
P === "month" && /* @__PURE__ */ C(a, { onCreateSlot: Z }),
|
|
277
|
+
P === "year" && /* @__PURE__ */ C(c, {}),
|
|
278
|
+
P === "agenda" && /* @__PURE__ */ C(s, {}),
|
|
279
|
+
P === "timeline" && /* @__PURE__ */ C(l, {})
|
|
236
280
|
]
|
|
237
281
|
})]
|
|
238
282
|
}),
|
|
239
|
-
/* @__PURE__ */
|
|
240
|
-
open:
|
|
241
|
-
defaultDate:
|
|
242
|
-
defaultStartHour:
|
|
283
|
+
/* @__PURE__ */ C(te, {
|
|
284
|
+
open: K,
|
|
285
|
+
defaultDate: J?.date ?? F,
|
|
286
|
+
defaultStartHour: J?.hour,
|
|
243
287
|
onClose: () => {
|
|
244
|
-
|
|
288
|
+
q(!1), Y(null);
|
|
245
289
|
}
|
|
246
290
|
})
|
|
247
291
|
]
|
|
248
|
-
}) : /* @__PURE__ */
|
|
249
|
-
title:
|
|
250
|
-
description:
|
|
292
|
+
}) : /* @__PURE__ */ C(m, {
|
|
293
|
+
title: G("calendar.accessDenied", "Access Denied"),
|
|
294
|
+
description: G("calendar.noPermissionViewCalendar", "You don't have permission to view the calendar.")
|
|
251
295
|
});
|
|
252
296
|
}
|
|
253
297
|
//#endregion
|
|
254
|
-
export {
|
|
298
|
+
export { k as CalendarPage };
|
|
255
299
|
|
|
256
300
|
//# sourceMappingURL=CalendarPage.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CalendarPage.js","names":[],"sources":["../../src/pages/CalendarPage.tsx"],"sourcesContent":["import { useParams } from 'react-router-dom';\nimport { useEffect, useState } from 'react';\nimport { ChevronLeft, ChevronRight, Plus, PanelLeft, Search, Settings2 } from 'lucide-react';\nimport { useI18n } from '@burdenoff/fe-libs/shared/providers/shell/I18nProvider';\nimport { AccessDenied } from '@burdenoff/fe-libs/shared/components';\nimport { useGetCalendarsQuery } from '../generated/wspace-operations';\nimport { useCalendar } from '../providers/CalendarProvider';\nimport { useCalendarStore } from '../store/calendarStore';\nimport { useSafePermissions } from '../hooks/useSafePermissions';\nimport type { CalendarViewType } from '../types';\nimport { formatDate } from '../utils/dateHelpers';\nimport { WeekView } from '../components/WeekView';\nimport { MonthView } from '../components/MonthView';\nimport { DayView } from '../components/DayView';\nimport { AgendaView } from '../components/AgendaView';\nimport { YearView } from '../components/YearView';\nimport { TimelineView } from '../components/TimelineView';\nimport { ViewSwitcher } from '../components/ViewSwitcher';\nimport { MiniCalendar } from '../components/MiniCalendar';\nimport { EventFormModal } from '../components/EventFormModal';\nimport { CALENDAR_PERMISSIONS } from '../constants/permissions';\n\n/**\n * Main calendar page with multiple view types and event creation\n */\nexport function CalendarPage() {\n const { viewType } = useParams<{ viewType: string }>();\n const { hasPermission, isLoading: permissionsLoading } = useSafePermissions();\n const { navigate, basePath } = useCalendar();\n const currentView = useCalendarStore((state) => state.currentView);\n const currentDate = useCalendarStore((state) => state.currentDate);\n const setView = useCalendarStore((state) => state.setView);\n const navigateDate = useCalendarStore((state) => state.navigateDate);\n const miniCalendarVisible = useCalendarStore((state) => state.miniCalendarVisible);\n const toggleMiniCalendar = useCalendarStore((state) => state.toggleMiniCalendar);\n const visibleCalendars = useCalendarStore((state) => state.visibleCalendars);\n const setVisibleCalendars = useCalendarStore((state) => state.setVisibleCalendars);\n const eventFilter = useCalendarStore((state) => state.eventFilter);\n const updateEventFilter = useCalendarStore((state) => state.updateEventFilter);\n const { t } = useI18n();\n const tr = (key: string, fallback: string): string => {\n const value = t(key);\n return value === key ? fallback : value;\n };\n\n const [showCreateModal, setShowCreateModal] = useState(false);\n const [createSlot, setCreateSlot] = useState<{ date: Date; hour?: number } | null>(null);\n const canCreateEvents = hasPermission(CALENDAR_PERMISSIONS.CALENDAR_EVENT_CREATE);\n // Clicking an empty grid cell opens the create modal pre-filled with that\n // slot. Left undefined (so cells stay non-interactive) when the user can't\n // create events. Day-level cells (month view) pass no hour — default to 9am\n // so the event isn't created at 1am (midnight + 1) by accident.\n const DEFAULT_CREATE_HOUR = 9;\n const handleCreateSlot = canCreateEvents\n ? (date: Date, hour?: number) => {\n setCreateSlot({ date, hour: hour ?? DEFAULT_CREATE_HOUR });\n setShowCreateModal(true);\n }\n : undefined;\n const { data: calendarsData } = useGetCalendarsQuery({\n variables: { pagination: { limit: 50 } },\n skip: permissionsLoading,\n });\n const calendars =\n (calendarsData?.calendars?.calendars as Array<{\n id: string;\n name: string;\n color?: string | null;\n isDefault: boolean;\n }>) ?? [];\n const effectiveVisibleCalendars =\n visibleCalendars.size > 0\n ? visibleCalendars\n : new Set<string>(calendars.map((calendar) => calendar.id));\n\n const handleToggleCalendar = (calendarId: string) => {\n const nextVisibleCalendars = new Set<string>(effectiveVisibleCalendars);\n if (nextVisibleCalendars.has(calendarId)) {\n nextVisibleCalendars.delete(calendarId);\n } else {\n nextVisibleCalendars.add(calendarId);\n }\n setVisibleCalendars(Array.from(nextVisibleCalendars));\n };\n\n // Sync view type from URL params\n useEffect(() => {\n if (viewType && viewType !== currentView) {\n setView(viewType as CalendarViewType);\n }\n }, [viewType, currentView, setView]);\n\n if (permissionsLoading) {\n return (\n <div className=\"@container min-h-screen bg-bg-canvas flex items-center justify-center\">\n <p className=\"font-text-md text-text-secondary\">{tr('calendar.loading', 'Loading...')}</p>\n </div>\n );\n }\n\n if (!hasPermission(CALENDAR_PERMISSIONS.CALENDAR_READ)) {\n return (\n <AccessDenied\n title={tr('calendar.accessDenied', 'Access Denied')}\n description={tr(\n 'calendar.noPermissionViewCalendar',\n \"You don't have permission to view the calendar.\"\n )}\n />\n );\n }\n\n return (\n <div className=\"@container min-h-screen bg-bg-canvas\">\n {/* Header */}\n <header className=\"border-b border-border-default bg-bg-surface px-page-padding py-element-padding\">\n <div className=\"flex flex-col @lg:flex-row @lg:items-center @lg:justify-between gap-stack-gap\">\n {/* Date navigation */}\n <div className=\"flex items-center gap-inline-gap\">\n <button\n type=\"button\"\n onClick={toggleMiniCalendar}\n className=\"size-9 inline-flex items-center justify-center rounded-radius-md border border-border-default bg-bg-surface hover:bg-bg-elevated text-text-primary transition-colors\"\n aria-label={tr('calendar.toggleSidebar', 'Toggle sidebar')}\n >\n <PanelLeft className=\"size-4\" />\n </button>\n\n <button\n type=\"button\"\n onClick={() => navigateDate('today')}\n className=\"px-element-padding py-element-padding-sm rounded-radius-md border border-border-default bg-bg-surface hover:bg-bg-elevated font-text-sm font-weight-medium text-text-primary transition-colors\"\n >\n {tr('calendar.today', 'Today')}\n </button>\n\n <div className=\"flex items-center gap-inline-gap-sm\">\n <button\n type=\"button\"\n onClick={() => navigateDate('prev')}\n className=\"size-9 inline-flex items-center justify-center rounded-radius-md border border-border-default bg-bg-surface hover:bg-bg-elevated text-text-primary transition-colors\"\n aria-label={tr('calendar.previous', 'Previous')}\n >\n <ChevronLeft className=\"size-4\" />\n </button>\n\n <button\n type=\"button\"\n onClick={() => navigateDate('next')}\n className=\"size-9 inline-flex items-center justify-center rounded-radius-md border border-border-default bg-bg-surface hover:bg-bg-elevated text-text-primary transition-colors\"\n aria-label={tr('calendar.next', 'Next')}\n >\n <ChevronRight className=\"size-4\" />\n </button>\n </div>\n\n <h2 className=\"font-heading-md text-text-primary\">{formatDate(currentDate)}</h2>\n </div>\n\n {/* Right side: view switcher + create button */}\n <div className=\"flex items-center gap-inline-gap\">\n <ViewSwitcher />\n\n {canCreateEvents ? (\n <button\n type=\"button\"\n onClick={() => {\n setCreateSlot(null);\n setShowCreateModal(true);\n }}\n className=\"inline-flex items-center gap-inline-gap-sm px-element-padding py-element-padding-sm rounded-radius-md bg-action-primary-bg text-action-primary-fg font-text-sm font-weight-medium hover:bg-action-primary-bg-hover transition-colors\"\n >\n <Plus className=\"size-4\" />\n <span className=\"hidden @sm:inline\">\n {tr('calendar.createEvent', 'Create Event')}\n </span>\n </button>\n ) : null}\n </div>\n </div>\n </header>\n\n {/* Main content */}\n <div className=\"flex min-h-0 flex-1\">\n {/* Mini calendar sidebar (optional) */}\n {miniCalendarVisible && (\n <aside className=\"hidden @lg:block w-72 border-r border-border-default bg-bg-surface p-section-padding space-y-5\">\n <MiniCalendar />\n\n <div className=\"space-y-3\">\n <div className=\"flex items-center gap-2\">\n <Search className=\"size-4 text-text-secondary\" />\n <input\n type=\"search\"\n value={eventFilter.search ?? ''}\n onChange={(e) =>\n updateEventFilter({ search: e.target.value.trim() || undefined })\n }\n placeholder={tr('calendar.searchEvents', 'Search events, tags, or calendars')}\n aria-label={tr('calendar.searchEvents', 'Search events, tags, or calendars')}\n className=\"w-full px-3 py-2 rounded-radius-md border border-border-default bg-bg-canvas text-text-primary font-text-sm placeholder:text-text-tertiary focus:outline-none focus:ring-2 focus:ring-action-primary-border\"\n />\n </div>\n\n <select\n value={eventFilter.status?.[0] ?? ''}\n onChange={(e) =>\n updateEventFilter({\n status: e.target.value\n ? [e.target.value as 'CONFIRMED' | 'TENTATIVE' | 'CANCELLED']\n : undefined,\n })\n }\n className=\"w-full px-3 py-2 rounded-radius-md border border-border-default bg-bg-canvas text-text-primary font-text-sm focus:outline-none focus:ring-2 focus:ring-action-primary-border\"\n >\n <option value=\"\">{tr('calendar.allStatuses', 'All statuses')}</option>\n <option value=\"CONFIRMED\">\n {tr('calendar.eventStatusConfirmed', 'Confirmed')}\n </option>\n <option value=\"TENTATIVE\">\n {tr('calendar.eventStatusTentative', 'Tentative')}\n </option>\n <option value=\"CANCELLED\">\n {tr('calendar.eventStatusCancelled', 'Cancelled')}\n </option>\n </select>\n </div>\n\n <div className=\"space-y-3\">\n <div className=\"flex items-center justify-between\">\n <h3 className=\"font-text-sm font-weight-semibold text-text-primary\">\n {tr('calendar.visibleCalendars', 'Visible calendars')}\n </h3>\n <button\n type=\"button\"\n onClick={() => setVisibleCalendars([])}\n className=\"font-text-xs text-action-primary-bg hover:underline\"\n >\n {tr('calendar.showAll', 'Show all')}\n </button>\n </div>\n\n <div className=\"space-y-2 max-h-[280px] overflow-auto pr-1\">\n {calendars.map((calendar) => (\n <label\n key={calendar.id}\n className=\"flex items-center gap-3 rounded-radius-md border border-border-subtle px-3 py-2 hover:bg-bg-canvas\"\n >\n <input\n type=\"checkbox\"\n checked={effectiveVisibleCalendars.has(calendar.id)}\n onChange={() => handleToggleCalendar(calendar.id)}\n className=\"size-4 rounded border-border-default\"\n aria-label={calendar.name}\n />\n <span\n className=\"size-3 rounded-full shrink-0\"\n style={{\n backgroundColor: calendar.color ?? 'var(--color-action-primary-bg)',\n }}\n />\n <span className=\"min-w-0 flex-1 truncate font-text-sm text-text-primary\">\n {calendar.name}\n </span>\n </label>\n ))}\n </div>\n\n <div className=\"rounded-radius-md border border-border-subtle bg-bg-canvas px-3 py-2\">\n <p className=\"font-text-xs font-weight-semibold text-text-primary mb-1\">\n {tr('calendar.schedulerOverlay', 'Scheduler overlay')}\n </p>\n <p className=\"font-text-xs text-text-secondary\">\n {tr(\n 'calendar.schedulerOverlayDescription',\n 'Scheduled jobs from scheduler are shown in calendar views and deep-link to /scheduler.'\n )}\n </p>\n </div>\n </div>\n\n <div className=\"space-y-2 pt-2 border-t border-border-subtle\">\n <button\n type=\"button\"\n onClick={() => navigate(`${basePath}/settings`)}\n className=\"w-full inline-flex items-center gap-2 px-3 py-2 rounded-radius-md border border-border-default bg-bg-canvas hover:bg-bg-elevated text-text-primary font-text-sm\"\n >\n <Settings2 className=\"size-4\" />\n {tr('calendar.manageCalendarSettings', 'Manage calendar settings')}\n </button>\n <button\n type=\"button\"\n onClick={() => navigate(`${basePath}/resources`)}\n className=\"w-full inline-flex items-center gap-2 px-3 py-2 rounded-radius-md border border-border-default bg-bg-canvas hover:bg-bg-elevated text-text-primary font-text-sm\"\n >\n {tr('calendar.openResources', 'Open resources')}\n </button>\n <button\n type=\"button\"\n onClick={() => navigate(`${basePath}/subscriptions`)}\n className=\"w-full inline-flex items-center gap-2 px-3 py-2 rounded-radius-md border border-border-default bg-bg-canvas hover:bg-bg-elevated text-text-primary font-text-sm\"\n >\n {tr('calendar.exportAndSubscriptions', 'Export and subscriptions')}\n </button>\n </div>\n </aside>\n )}\n\n {/* Calendar view — host shell already renders <main>, use a plain div */}\n <div className=\"min-w-0 flex-1 p-page-padding\">\n {currentView === 'day' && <DayView onCreateSlot={handleCreateSlot} />}\n {currentView === 'week' && <WeekView onCreateSlot={handleCreateSlot} />}\n {currentView === 'month' && <MonthView onCreateSlot={handleCreateSlot} />}\n {currentView === 'year' && <YearView />}\n {currentView === 'agenda' && <AgendaView />}\n {currentView === 'timeline' && <TimelineView />}\n </div>\n </div>\n\n {/* Create Event Modal */}\n <EventFormModal\n open={showCreateModal}\n defaultDate={createSlot?.date ?? currentDate}\n defaultStartHour={createSlot?.hour}\n onClose={() => {\n setShowCreateModal(false);\n setCreateSlot(null);\n }}\n />\n </div>\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;AAyBA,SAAgB,IAAe;CAC7B,IAAM,EAAE,gBAAa,GAAiC,EAChD,EAAE,kBAAe,WAAW,MAAuB,GAAoB,EACvE,EAAE,aAAU,gBAAa,GAAa,EACtC,IAAc,GAAkB,MAAU,EAAM,YAAY,EAC5D,IAAc,GAAkB,MAAU,EAAM,YAAY,EAC5D,IAAU,GAAkB,MAAU,EAAM,QAAQ,EACpD,IAAe,GAAkB,MAAU,EAAM,aAAa,EAC9D,IAAsB,GAAkB,MAAU,EAAM,oBAAoB,EAC5E,IAAqB,GAAkB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MAC3C;OACF;;GAGN,kBAAC,GAAD;IACE,MAAM;IACN,aAAa,GAAY,QAAQ;IACjC,kBAAkB,GAAY;IAC9B,eAAe;AAEb,KADA,EAAmB,GAAM,EACzB,EAAc,KAAK;;IAErB,CAAA;GACE;MAnOJ,kBAAC,GAAD;EACE,OAAO,EAAG,yBAAyB,gBAAgB;EACnD,aAAa,EACX,qCACA,kDACD;EACD,CAAA"}
|
|
1
|
+
{"version":3,"file":"CalendarPage.js","names":[],"sources":["../../src/pages/CalendarPage.tsx"],"sourcesContent":["import { useParams } from 'react-router-dom';\nimport { useEffect, useState } from 'react';\nimport {\n ChevronLeft,\n ChevronRight,\n Plus,\n PanelLeft,\n Search,\n Settings2,\n CalendarPlus,\n DoorOpen,\n Rss,\n} from 'lucide-react';\nimport { useI18n } from '@burdenoff/fe-libs/shared/providers/shell/I18nProvider';\nimport { AccessDenied } from '@burdenoff/fe-libs/shared/components';\nimport { AuroraBackground, GradientText, NextSteps, PagePurpose } from '@burdenoff/fe-libs/ui';\nimport { useGetCalendarsQuery } from '../generated/wspace-operations';\nimport { useCalendar } from '../providers/CalendarProvider';\nimport { useCalendarStore } from '../store/calendarStore';\nimport { useSafePermissions } from '../hooks/useSafePermissions';\nimport type { CalendarViewType } from '../types';\nimport { formatDate } from '../utils/dateHelpers';\nimport { WeekView } from '../components/WeekView';\nimport { MonthView } from '../components/MonthView';\nimport { DayView } from '../components/DayView';\nimport { AgendaView } from '../components/AgendaView';\nimport { YearView } from '../components/YearView';\nimport { TimelineView } from '../components/TimelineView';\nimport { ViewSwitcher } from '../components/ViewSwitcher';\nimport { MiniCalendar } from '../components/MiniCalendar';\nimport { EventFormModal } from '../components/EventFormModal';\nimport { CALENDAR_PERMISSIONS } from '../constants/permissions';\n\n/**\n * Main calendar page with multiple view types and event creation\n */\nexport function CalendarPage() {\n const { viewType } = useParams<{ viewType: string }>();\n const { hasPermission, isLoading: permissionsLoading } = useSafePermissions();\n const { navigate, basePath } = useCalendar();\n const currentView = useCalendarStore((state) => state.currentView);\n const currentDate = useCalendarStore((state) => state.currentDate);\n const setView = useCalendarStore((state) => state.setView);\n const navigateDate = useCalendarStore((state) => state.navigateDate);\n const miniCalendarVisible = useCalendarStore((state) => state.miniCalendarVisible);\n const toggleMiniCalendar = useCalendarStore((state) => state.toggleMiniCalendar);\n const visibleCalendars = useCalendarStore((state) => state.visibleCalendars);\n const setVisibleCalendars = useCalendarStore((state) => state.setVisibleCalendars);\n const eventFilter = useCalendarStore((state) => state.eventFilter);\n const updateEventFilter = useCalendarStore((state) => state.updateEventFilter);\n const { t } = useI18n();\n const tr = (key: string, fallback: string): string => {\n const value = t(key);\n return value === key ? fallback : value;\n };\n\n const [showCreateModal, setShowCreateModal] = useState(false);\n const [createSlot, setCreateSlot] = useState<{ date: Date; hour?: number } | null>(null);\n const canCreateEvents = hasPermission(CALENDAR_PERMISSIONS.CALENDAR_EVENT_CREATE);\n // Clicking an empty grid cell opens the create modal pre-filled with that\n // slot. Left undefined (so cells stay non-interactive) when the user can't\n // create events. Day-level cells (month view) pass no hour — default to 9am\n // so the event isn't created at 1am (midnight + 1) by accident.\n const DEFAULT_CREATE_HOUR = 9;\n const handleCreateSlot = canCreateEvents\n ? (date: Date, hour?: number) => {\n setCreateSlot({ date, hour: hour ?? DEFAULT_CREATE_HOUR });\n setShowCreateModal(true);\n }\n : undefined;\n const { data: calendarsData } = useGetCalendarsQuery({\n variables: { pagination: { limit: 50 } },\n skip: permissionsLoading,\n });\n const calendars =\n (calendarsData?.calendars?.calendars as Array<{\n id: string;\n name: string;\n color?: string | null;\n isDefault: boolean;\n }>) ?? [];\n const effectiveVisibleCalendars =\n visibleCalendars.size > 0\n ? visibleCalendars\n : new Set<string>(calendars.map((calendar) => calendar.id));\n\n const handleToggleCalendar = (calendarId: string) => {\n const nextVisibleCalendars = new Set<string>(effectiveVisibleCalendars);\n if (nextVisibleCalendars.has(calendarId)) {\n nextVisibleCalendars.delete(calendarId);\n } else {\n nextVisibleCalendars.add(calendarId);\n }\n setVisibleCalendars(Array.from(nextVisibleCalendars));\n };\n\n // Sync view type from URL params\n useEffect(() => {\n if (viewType && viewType !== currentView) {\n setView(viewType as CalendarViewType);\n }\n }, [viewType, currentView, setView]);\n\n if (permissionsLoading) {\n return (\n <div className=\"@container min-h-screen bg-bg-canvas flex items-center justify-center\">\n <p className=\"font-text-md text-text-secondary\">{tr('calendar.loading', 'Loading...')}</p>\n </div>\n );\n }\n\n if (!hasPermission(CALENDAR_PERMISSIONS.CALENDAR_READ)) {\n return (\n <AccessDenied\n title={tr('calendar.accessDenied', 'Access Denied')}\n description={tr(\n 'calendar.noPermissionViewCalendar',\n \"You don't have permission to view the calendar.\"\n )}\n />\n );\n }\n\n return (\n <div className=\"@container min-h-screen bg-bg-canvas\">\n {/* Header — primary MFE hero with a living aurora backdrop */}\n <header className=\"relative overflow-hidden border-b border-border-seam bg-bg-surface px-page-padding py-element-padding\">\n <AuroraBackground intensity=\"subtle\" />\n <div className=\"flex flex-col @lg:flex-row @lg:items-center @lg:justify-between gap-stack-gap\">\n {/* Date navigation */}\n <div className=\"flex items-center gap-inline-gap\">\n <button\n type=\"button\"\n onClick={toggleMiniCalendar}\n className=\"size-9 inline-flex items-center justify-center rounded-radius-md border border-border-default bg-bg-surface hover:bg-bg-elevated text-text-primary transition-colors\"\n aria-label={tr('calendar.toggleSidebar', 'Toggle sidebar')}\n >\n <PanelLeft className=\"size-4\" />\n </button>\n\n <button\n type=\"button\"\n onClick={() => navigateDate('today')}\n className=\"px-element-padding py-element-padding-sm rounded-radius-md border border-border-default bg-bg-surface hover:bg-bg-elevated font-text-sm font-weight-medium text-text-primary transition-colors\"\n >\n {tr('calendar.today', 'Today')}\n </button>\n\n <div className=\"flex items-center gap-inline-gap-sm\">\n <button\n type=\"button\"\n onClick={() => navigateDate('prev')}\n className=\"size-9 inline-flex items-center justify-center rounded-radius-md border border-border-default bg-bg-surface hover:bg-bg-elevated text-text-primary transition-colors\"\n aria-label={tr('calendar.previous', 'Previous')}\n >\n <ChevronLeft className=\"size-4\" />\n </button>\n\n <button\n type=\"button\"\n onClick={() => navigateDate('next')}\n className=\"size-9 inline-flex items-center justify-center rounded-radius-md border border-border-default bg-bg-surface hover:bg-bg-elevated text-text-primary transition-colors\"\n aria-label={tr('calendar.next', 'Next')}\n >\n <ChevronRight className=\"size-4\" />\n </button>\n </div>\n\n <h2 className=\"font-heading-md text-text-primary tabular-nums\">\n <GradientText>{formatDate(currentDate)}</GradientText>\n </h2>\n </div>\n\n {/* Right side: view switcher + create button */}\n <div className=\"flex items-center gap-inline-gap\">\n <ViewSwitcher />\n\n {canCreateEvents ? (\n <button\n type=\"button\"\n onClick={() => {\n setCreateSlot(null);\n setShowCreateModal(true);\n }}\n className=\"inline-flex items-center gap-inline-gap-sm px-element-padding py-element-padding-sm rounded-radius-md bg-action-primary-bg text-action-primary-fg font-text-sm font-weight-medium hover:bg-action-primary-bg-hover transition-colors\"\n >\n <Plus className=\"size-4\" />\n <span className=\"hidden @sm:inline\">\n {tr('calendar.createEvent', 'Create Event')}\n </span>\n </button>\n ) : null}\n </div>\n </div>\n\n <PagePurpose className=\"relative mt-element-padding max-w-3xl\">\n {tr(\n 'calendar.pagePurpose',\n 'Your shared schedule. See, create, and manage events across day, week, month, agenda, and timeline views — then toggle calendars, search, and overlay scheduled jobs from the sidebar so the whole team stays in sync.'\n )}\n </PagePurpose>\n </header>\n\n {/* Main content */}\n <div className=\"flex min-h-0 flex-1\">\n {/* Mini calendar sidebar (optional) */}\n {miniCalendarVisible && (\n <aside className=\"hidden @lg:block w-72 border-r border-border-seam bg-bg-surface p-section-padding space-y-5\">\n <MiniCalendar />\n\n <div className=\"space-y-3\">\n <div className=\"flex items-center gap-2\">\n <Search className=\"size-4 text-text-secondary\" />\n <input\n type=\"search\"\n value={eventFilter.search ?? ''}\n onChange={(e) =>\n updateEventFilter({ search: e.target.value.trim() || undefined })\n }\n placeholder={tr('calendar.searchEvents', 'Search events, tags, or calendars')}\n aria-label={tr('calendar.searchEvents', 'Search events, tags, or calendars')}\n className=\"w-full px-3 py-2 rounded-radius-md border border-border-default bg-bg-canvas text-text-primary font-text-sm placeholder:text-text-tertiary focus:outline-none focus:ring-2 focus:ring-action-primary-border\"\n />\n </div>\n\n <select\n value={eventFilter.status?.[0] ?? ''}\n onChange={(e) =>\n updateEventFilter({\n status: e.target.value\n ? [e.target.value as 'CONFIRMED' | 'TENTATIVE' | 'CANCELLED']\n : undefined,\n })\n }\n className=\"w-full px-3 py-2 rounded-radius-md border border-border-default bg-bg-canvas text-text-primary font-text-sm focus:outline-none focus:ring-2 focus:ring-action-primary-border\"\n >\n <option value=\"\">{tr('calendar.allStatuses', 'All statuses')}</option>\n <option value=\"CONFIRMED\">\n {tr('calendar.eventStatusConfirmed', 'Confirmed')}\n </option>\n <option value=\"TENTATIVE\">\n {tr('calendar.eventStatusTentative', 'Tentative')}\n </option>\n <option value=\"CANCELLED\">\n {tr('calendar.eventStatusCancelled', 'Cancelled')}\n </option>\n </select>\n </div>\n\n <div className=\"space-y-3\">\n <div className=\"flex items-center justify-between\">\n <h3 className=\"font-text-sm font-weight-semibold text-text-primary\">\n {tr('calendar.visibleCalendars', 'Visible calendars')}\n </h3>\n <button\n type=\"button\"\n onClick={() => setVisibleCalendars([])}\n className=\"font-text-xs text-action-primary-bg hover:underline\"\n >\n {tr('calendar.showAll', 'Show all')}\n </button>\n </div>\n\n <div className=\"space-y-2 max-h-[280px] overflow-auto pr-1\">\n {calendars.map((calendar) => (\n <label\n key={calendar.id}\n className=\"flex items-center gap-3 rounded-radius-md border border-border-subtle px-3 py-2 hover:bg-bg-canvas\"\n >\n <input\n type=\"checkbox\"\n checked={effectiveVisibleCalendars.has(calendar.id)}\n onChange={() => handleToggleCalendar(calendar.id)}\n className=\"size-4 rounded border-border-default\"\n aria-label={calendar.name}\n />\n <span\n className=\"size-3 rounded-full shrink-0\"\n style={{\n backgroundColor: calendar.color ?? 'var(--color-action-primary-bg)',\n }}\n />\n <span className=\"min-w-0 flex-1 truncate font-text-sm text-text-primary\">\n {calendar.name}\n </span>\n </label>\n ))}\n </div>\n\n <div className=\"rounded-radius-md border border-border-subtle bg-bg-canvas px-3 py-2\">\n <p className=\"font-text-xs font-weight-semibold text-text-primary mb-1\">\n {tr('calendar.schedulerOverlay', 'Scheduler overlay')}\n </p>\n <p className=\"font-text-xs text-text-secondary\">\n {tr(\n 'calendar.schedulerOverlayDescription',\n 'Scheduled jobs from scheduler are shown in calendar views and deep-link to /scheduler.'\n )}\n </p>\n </div>\n </div>\n\n <div className=\"space-y-2 pt-2 border-t border-border-subtle\">\n <button\n type=\"button\"\n onClick={() => navigate(`${basePath}/settings`)}\n className=\"w-full inline-flex items-center gap-2 px-3 py-2 rounded-radius-md border border-border-default bg-bg-canvas hover:bg-bg-elevated text-text-primary font-text-sm\"\n >\n <Settings2 className=\"size-4\" />\n {tr('calendar.manageCalendarSettings', 'Manage calendar settings')}\n </button>\n <button\n type=\"button\"\n onClick={() => navigate(`${basePath}/resources`)}\n className=\"w-full inline-flex items-center gap-2 px-3 py-2 rounded-radius-md border border-border-default bg-bg-canvas hover:bg-bg-elevated text-text-primary font-text-sm\"\n >\n {tr('calendar.openResources', 'Open resources')}\n </button>\n <button\n type=\"button\"\n onClick={() => navigate(`${basePath}/subscriptions`)}\n className=\"w-full inline-flex items-center gap-2 px-3 py-2 rounded-radius-md border border-border-default bg-bg-canvas hover:bg-bg-elevated text-text-primary font-text-sm\"\n >\n {tr('calendar.exportAndSubscriptions', 'Export and subscriptions')}\n </button>\n </div>\n </aside>\n )}\n\n {/* Calendar view — host shell already renders <main>, use a plain div */}\n <div className=\"min-w-0 flex-1 p-page-padding\">\n <NextSteps\n storageKey=\"calendar-overview\"\n className=\"mb-stack-gap\"\n steps={[\n ...(canCreateEvents\n ? [\n {\n id: 'create-event',\n label: tr('calendar.nextStepCreateEvent', 'Create your first event'),\n description: tr(\n 'calendar.nextStepCreateEventDesc',\n 'Add a meeting, reminder, or all-day event to this calendar.'\n ),\n icon: <CalendarPlus className=\"size-4\" />,\n onClick: () => {\n setCreateSlot(null);\n setShowCreateModal(true);\n },\n },\n ]\n : []),\n {\n id: 'book-resources',\n label: tr('calendar.nextStepResources', 'Book rooms and resources'),\n description: tr(\n 'calendar.nextStepResourcesDesc',\n 'Reserve conference rooms, equipment, and desks for your events.'\n ),\n icon: <DoorOpen className=\"size-4\" />,\n onClick: () => navigate(`${basePath}/resources`),\n },\n {\n id: 'export-subscribe',\n label: tr('calendar.nextStepSubscriptions', 'Export or subscribe'),\n description: tr(\n 'calendar.nextStepSubscriptionsDesc',\n 'Download ICS files to sync with Google, Apple, or Outlook calendars.'\n ),\n icon: <Rss className=\"size-4\" />,\n onClick: () => navigate(`${basePath}/subscriptions`),\n },\n {\n id: 'tune-settings',\n label: tr('calendar.nextStepSettings', 'Tune your calendar settings'),\n description: tr(\n 'calendar.nextStepSettingsDesc',\n 'Set availability, sharing, booking pages, and default view.'\n ),\n icon: <Settings2 className=\"size-4\" />,\n onClick: () => navigate(`${basePath}/settings`),\n },\n ]}\n />\n {currentView === 'day' && <DayView onCreateSlot={handleCreateSlot} />}\n {currentView === 'week' && <WeekView onCreateSlot={handleCreateSlot} />}\n {currentView === 'month' && <MonthView onCreateSlot={handleCreateSlot} />}\n {currentView === 'year' && <YearView />}\n {currentView === 'agenda' && <AgendaView />}\n {currentView === 'timeline' && <TimelineView />}\n </div>\n </div>\n\n {/* Create Event Modal */}\n <EventFormModal\n open={showCreateModal}\n defaultDate={createSlot?.date ?? currentDate}\n defaultStartHour={createSlot?.hour}\n onClose={() => {\n setShowCreateModal(false);\n setCreateSlot(null);\n }}\n />\n </div>\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AAoCA,SAAgB,IAAe;CAC7B,IAAM,EAAE,gBAAa,IAAiC,EAChD,EAAE,kBAAe,WAAW,MAAuB,IAAoB,EACvE,EAAE,aAAU,gBAAa,GAAa,EACtC,IAAc,GAAkB,MAAU,EAAM,YAAY,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