@burdenoff/microfe-calendar 2026.625.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/pages/CalendarPage.js +189 -146
- package/dist/pages/CalendarPage.js.map +1 -1
- package/dist/pages/EventDetailsPage.js +486 -445
- package/dist/pages/EventDetailsPage.js.map +1 -1
- package/dist/pages/ResourcesPage.js +194 -177
- package/dist/pages/ResourcesPage.js.map +1 -1
- package/dist/pages/SettingsPage.js +320 -263
- package/dist/pages/SettingsPage.js.map +1 -1
- package/dist/pages/SubscriptionsPage.js +39 -36
- package/dist/pages/SubscriptionsPage.js.map +1 -1
- package/package.json +2 -2
|
@@ -1,8 +1,8 @@
|
|
|
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
|
|
4
|
+
import { useSafePermissions as ee } from "../hooks/useSafePermissions.js";
|
|
5
|
+
import { formatDate as r } from "../utils/dateHelpers.js";
|
|
6
6
|
import { WeekView as i } from "../components/WeekView.js";
|
|
7
7
|
import { MonthView as a } from "../components/MonthView.js";
|
|
8
8
|
import { DayView as o } from "../components/DayView.js";
|
|
@@ -11,247 +11,290 @@ import { YearView as c } from "../components/YearView.js";
|
|
|
11
11
|
import { TimelineView as l } from "../components/TimelineView.js";
|
|
12
12
|
import { ViewSwitcher as u } from "../components/ViewSwitcher.js";
|
|
13
13
|
import { MiniCalendar as d } from "../components/MiniCalendar.js";
|
|
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
|
|
22
|
-
import { AuroraBackground as
|
|
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";
|
|
23
23
|
//#region src/pages/CalendarPage.tsx
|
|
24
|
-
function
|
|
25
|
-
let { viewType:
|
|
26
|
-
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);
|
|
27
27
|
return n === e ? t : n;
|
|
28
|
-
}, [
|
|
29
|
-
|
|
28
|
+
}, [K, q] = p(!1), [J, Y] = p(null), X = A(f.CALENDAR_EVENT_CREATE), Z = X ? (e, t) => {
|
|
29
|
+
Y({
|
|
30
30
|
date: e,
|
|
31
31
|
hour: t ?? 9
|
|
32
|
-
}),
|
|
33
|
-
} : void 0, { data:
|
|
32
|
+
}), q(!0);
|
|
33
|
+
} : void 0, { data: oe } = t({
|
|
34
34
|
variables: { pagination: { limit: 50 } },
|
|
35
|
-
skip:
|
|
36
|
-
}), Q =
|
|
35
|
+
skip: j
|
|
36
|
+
}), Q = oe?.calendars?.calendars ?? [], $ = B.size > 0 ? B : new Set(Q.map((e) => e.id)), se = (e) => {
|
|
37
37
|
let t = new Set($);
|
|
38
|
-
t.has(e) ? t.delete(e) : t.add(e),
|
|
38
|
+
t.has(e) ? t.delete(e) : t.add(e), V(Array.from(t));
|
|
39
39
|
};
|
|
40
|
-
return
|
|
41
|
-
|
|
40
|
+
return ne(() => {
|
|
41
|
+
k && k !== P && I(k);
|
|
42
42
|
}, [
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
]),
|
|
43
|
+
k,
|
|
44
|
+
P,
|
|
45
|
+
I
|
|
46
|
+
]), j ? /* @__PURE__ */ C("div", {
|
|
47
47
|
className: "@container min-h-screen bg-bg-canvas flex items-center justify-center",
|
|
48
|
-
children: /* @__PURE__ */
|
|
48
|
+
children: /* @__PURE__ */ C("p", {
|
|
49
49
|
className: "font-text-md text-text-secondary",
|
|
50
|
-
children:
|
|
50
|
+
children: G("calendar.loading", "Loading...")
|
|
51
51
|
})
|
|
52
|
-
}) :
|
|
52
|
+
}) : A(f.CALENDAR_READ) ? /* @__PURE__ */ w("div", {
|
|
53
53
|
className: "@container min-h-screen bg-bg-canvas",
|
|
54
54
|
children: [
|
|
55
|
-
/* @__PURE__ */
|
|
55
|
+
/* @__PURE__ */ w("header", {
|
|
56
56
|
className: "relative overflow-hidden border-b border-border-seam bg-bg-surface px-page-padding py-element-padding",
|
|
57
|
-
children: [
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
className: "flex items-center gap-
|
|
61
|
-
children: [
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
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",
|
|
66
|
-
"aria-label": W("calendar.toggleSidebar", "Toggle sidebar"),
|
|
67
|
-
children: /* @__PURE__ */ T(b, { className: "size-4" })
|
|
68
|
-
}),
|
|
69
|
-
/* @__PURE__ */ T("button", {
|
|
70
|
-
type: "button",
|
|
71
|
-
onClick: () => I("today"),
|
|
72
|
-
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",
|
|
73
|
-
children: W("calendar.today", "Today")
|
|
74
|
-
}),
|
|
75
|
-
/* @__PURE__ */ E("div", {
|
|
76
|
-
className: "flex items-center gap-inline-gap-sm",
|
|
77
|
-
children: [/* @__PURE__ */ T("button", {
|
|
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", {
|
|
78
65
|
type: "button",
|
|
79
|
-
onClick:
|
|
66
|
+
onClick: z,
|
|
80
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",
|
|
81
|
-
"aria-label":
|
|
82
|
-
children: /* @__PURE__ */
|
|
83
|
-
}),
|
|
68
|
+
"aria-label": G("calendar.toggleSidebar", "Toggle sidebar"),
|
|
69
|
+
children: /* @__PURE__ */ C(y, { className: "size-4" })
|
|
70
|
+
}),
|
|
71
|
+
/* @__PURE__ */ C("button", {
|
|
84
72
|
type: "button",
|
|
85
|
-
onClick: () =>
|
|
86
|
-
className: "
|
|
87
|
-
|
|
88
|
-
|
|
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")
|
|
89
109
|
})]
|
|
90
|
-
})
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
})
|
|
97
|
-
|
|
98
|
-
children: [/* @__PURE__ */ T(u, {}), Y ? /* @__PURE__ */ E("button", {
|
|
99
|
-
type: "button",
|
|
100
|
-
onClick: () => {
|
|
101
|
-
J(null), K(!0);
|
|
102
|
-
},
|
|
103
|
-
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",
|
|
104
|
-
children: [/* @__PURE__ */ T(x, { className: "size-4" }), /* @__PURE__ */ T("span", {
|
|
105
|
-
className: "hidden @sm:inline",
|
|
106
|
-
children: W("calendar.createEvent", "Create Event")
|
|
107
|
-
})]
|
|
108
|
-
}) : null]
|
|
109
|
-
})]
|
|
110
|
-
})]
|
|
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
|
+
]
|
|
111
118
|
}),
|
|
112
|
-
/* @__PURE__ */
|
|
119
|
+
/* @__PURE__ */ w("div", {
|
|
113
120
|
className: "flex min-h-0 flex-1",
|
|
114
|
-
children: [
|
|
121
|
+
children: [R && /* @__PURE__ */ w("aside", {
|
|
115
122
|
className: "hidden @lg:block w-72 border-r border-border-seam bg-bg-surface p-section-padding space-y-5",
|
|
116
123
|
children: [
|
|
117
|
-
/* @__PURE__ */
|
|
118
|
-
/* @__PURE__ */
|
|
124
|
+
/* @__PURE__ */ C(d, {}),
|
|
125
|
+
/* @__PURE__ */ w("div", {
|
|
119
126
|
className: "space-y-3",
|
|
120
|
-
children: [/* @__PURE__ */
|
|
127
|
+
children: [/* @__PURE__ */ w("div", {
|
|
121
128
|
className: "flex items-center gap-2",
|
|
122
|
-
children: [/* @__PURE__ */
|
|
129
|
+
children: [/* @__PURE__ */ C(ie, { className: "size-4 text-text-secondary" }), /* @__PURE__ */ C("input", {
|
|
123
130
|
type: "search",
|
|
124
|
-
value:
|
|
125
|
-
onChange: (e) =>
|
|
126
|
-
placeholder:
|
|
127
|
-
"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"),
|
|
128
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"
|
|
129
136
|
})]
|
|
130
|
-
}), /* @__PURE__ */
|
|
131
|
-
value:
|
|
132
|
-
onChange: (e) =>
|
|
137
|
+
}), /* @__PURE__ */ w("select", {
|
|
138
|
+
value: H.status?.[0] ?? "",
|
|
139
|
+
onChange: (e) => U({ status: e.target.value ? [e.target.value] : void 0 }),
|
|
133
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",
|
|
134
141
|
children: [
|
|
135
|
-
/* @__PURE__ */
|
|
142
|
+
/* @__PURE__ */ C("option", {
|
|
136
143
|
value: "",
|
|
137
|
-
children:
|
|
144
|
+
children: G("calendar.allStatuses", "All statuses")
|
|
138
145
|
}),
|
|
139
|
-
/* @__PURE__ */
|
|
146
|
+
/* @__PURE__ */ C("option", {
|
|
140
147
|
value: "CONFIRMED",
|
|
141
|
-
children:
|
|
148
|
+
children: G("calendar.eventStatusConfirmed", "Confirmed")
|
|
142
149
|
}),
|
|
143
|
-
/* @__PURE__ */
|
|
150
|
+
/* @__PURE__ */ C("option", {
|
|
144
151
|
value: "TENTATIVE",
|
|
145
|
-
children:
|
|
152
|
+
children: G("calendar.eventStatusTentative", "Tentative")
|
|
146
153
|
}),
|
|
147
|
-
/* @__PURE__ */
|
|
154
|
+
/* @__PURE__ */ C("option", {
|
|
148
155
|
value: "CANCELLED",
|
|
149
|
-
children:
|
|
156
|
+
children: G("calendar.eventStatusCancelled", "Cancelled")
|
|
150
157
|
})
|
|
151
158
|
]
|
|
152
159
|
})]
|
|
153
160
|
}),
|
|
154
|
-
/* @__PURE__ */
|
|
161
|
+
/* @__PURE__ */ w("div", {
|
|
155
162
|
className: "space-y-3",
|
|
156
163
|
children: [
|
|
157
|
-
/* @__PURE__ */
|
|
164
|
+
/* @__PURE__ */ w("div", {
|
|
158
165
|
className: "flex items-center justify-between",
|
|
159
|
-
children: [/* @__PURE__ */
|
|
166
|
+
children: [/* @__PURE__ */ C("h3", {
|
|
160
167
|
className: "font-text-sm font-weight-semibold text-text-primary",
|
|
161
|
-
children:
|
|
162
|
-
}), /* @__PURE__ */
|
|
168
|
+
children: G("calendar.visibleCalendars", "Visible calendars")
|
|
169
|
+
}), /* @__PURE__ */ C("button", {
|
|
163
170
|
type: "button",
|
|
164
|
-
onClick: () =>
|
|
171
|
+
onClick: () => V([]),
|
|
165
172
|
className: "font-text-xs text-action-primary-bg hover:underline",
|
|
166
|
-
children:
|
|
173
|
+
children: G("calendar.showAll", "Show all")
|
|
167
174
|
})]
|
|
168
175
|
}),
|
|
169
|
-
/* @__PURE__ */
|
|
176
|
+
/* @__PURE__ */ C("div", {
|
|
170
177
|
className: "space-y-2 max-h-[280px] overflow-auto pr-1",
|
|
171
|
-
children: Q.map((e) => /* @__PURE__ */
|
|
178
|
+
children: Q.map((e) => /* @__PURE__ */ w("label", {
|
|
172
179
|
className: "flex items-center gap-3 rounded-radius-md border border-border-subtle px-3 py-2 hover:bg-bg-canvas",
|
|
173
180
|
children: [
|
|
174
|
-
/* @__PURE__ */
|
|
181
|
+
/* @__PURE__ */ C("input", {
|
|
175
182
|
type: "checkbox",
|
|
176
183
|
checked: $.has(e.id),
|
|
177
|
-
onChange: () =>
|
|
184
|
+
onChange: () => se(e.id),
|
|
178
185
|
className: "size-4 rounded border-border-default",
|
|
179
186
|
"aria-label": e.name
|
|
180
187
|
}),
|
|
181
|
-
/* @__PURE__ */
|
|
188
|
+
/* @__PURE__ */ C("span", {
|
|
182
189
|
className: "size-3 rounded-full shrink-0",
|
|
183
190
|
style: { backgroundColor: e.color ?? "var(--color-action-primary-bg)" }
|
|
184
191
|
}),
|
|
185
|
-
/* @__PURE__ */
|
|
192
|
+
/* @__PURE__ */ C("span", {
|
|
186
193
|
className: "min-w-0 flex-1 truncate font-text-sm text-text-primary",
|
|
187
194
|
children: e.name
|
|
188
195
|
})
|
|
189
196
|
]
|
|
190
197
|
}, e.id))
|
|
191
198
|
}),
|
|
192
|
-
/* @__PURE__ */
|
|
199
|
+
/* @__PURE__ */ w("div", {
|
|
193
200
|
className: "rounded-radius-md border border-border-subtle bg-bg-canvas px-3 py-2",
|
|
194
|
-
children: [/* @__PURE__ */
|
|
201
|
+
children: [/* @__PURE__ */ C("p", {
|
|
195
202
|
className: "font-text-xs font-weight-semibold text-text-primary mb-1",
|
|
196
|
-
children:
|
|
197
|
-
}), /* @__PURE__ */
|
|
203
|
+
children: G("calendar.schedulerOverlay", "Scheduler overlay")
|
|
204
|
+
}), /* @__PURE__ */ C("p", {
|
|
198
205
|
className: "font-text-xs text-text-secondary",
|
|
199
|
-
children:
|
|
206
|
+
children: G("calendar.schedulerOverlayDescription", "Scheduled jobs from scheduler are shown in calendar views and deep-link to /scheduler.")
|
|
200
207
|
})]
|
|
201
208
|
})
|
|
202
209
|
]
|
|
203
210
|
}),
|
|
204
|
-
/* @__PURE__ */
|
|
211
|
+
/* @__PURE__ */ w("div", {
|
|
205
212
|
className: "space-y-2 pt-2 border-t border-border-subtle",
|
|
206
213
|
children: [
|
|
207
|
-
/* @__PURE__ */
|
|
214
|
+
/* @__PURE__ */ w("button", {
|
|
208
215
|
type: "button",
|
|
209
|
-
onClick: () =>
|
|
216
|
+
onClick: () => M(`${N}/settings`),
|
|
210
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",
|
|
211
|
-
children: [/* @__PURE__ */
|
|
218
|
+
children: [/* @__PURE__ */ C(S, { className: "size-4" }), G("calendar.manageCalendarSettings", "Manage calendar settings")]
|
|
212
219
|
}),
|
|
213
|
-
/* @__PURE__ */
|
|
220
|
+
/* @__PURE__ */ C("button", {
|
|
214
221
|
type: "button",
|
|
215
|
-
onClick: () =>
|
|
222
|
+
onClick: () => M(`${N}/resources`),
|
|
216
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",
|
|
217
|
-
children:
|
|
224
|
+
children: G("calendar.openResources", "Open resources")
|
|
218
225
|
}),
|
|
219
|
-
/* @__PURE__ */
|
|
226
|
+
/* @__PURE__ */ C("button", {
|
|
220
227
|
type: "button",
|
|
221
|
-
onClick: () =>
|
|
228
|
+
onClick: () => M(`${N}/subscriptions`),
|
|
222
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",
|
|
223
|
-
children:
|
|
230
|
+
children: G("calendar.exportAndSubscriptions", "Export and subscriptions")
|
|
224
231
|
})
|
|
225
232
|
]
|
|
226
233
|
})
|
|
227
234
|
]
|
|
228
|
-
}), /* @__PURE__ */
|
|
235
|
+
}), /* @__PURE__ */ w("div", {
|
|
229
236
|
className: "min-w-0 flex-1 p-page-padding",
|
|
230
237
|
children: [
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
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, {})
|
|
237
280
|
]
|
|
238
281
|
})]
|
|
239
282
|
}),
|
|
240
|
-
/* @__PURE__ */
|
|
241
|
-
open:
|
|
242
|
-
defaultDate:
|
|
243
|
-
defaultStartHour:
|
|
283
|
+
/* @__PURE__ */ C(te, {
|
|
284
|
+
open: K,
|
|
285
|
+
defaultDate: J?.date ?? F,
|
|
286
|
+
defaultStartHour: J?.hour,
|
|
244
287
|
onClose: () => {
|
|
245
|
-
|
|
288
|
+
q(!1), Y(null);
|
|
246
289
|
}
|
|
247
290
|
})
|
|
248
291
|
]
|
|
249
|
-
}) : /* @__PURE__ */
|
|
250
|
-
title:
|
|
251
|
-
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.")
|
|
252
295
|
});
|
|
253
296
|
}
|
|
254
297
|
//#endregion
|
|
255
|
-
export {
|
|
298
|
+
export { k as CalendarPage };
|
|
256
299
|
|
|
257
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 { AuroraBackground, GradientText } 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 </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 {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":";;;;;;;;;;;;;;;;;;;;;;;AA0BA,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,MAAU,EAAM,mBAAmB,EAC1E,IAAmB,GAAkB,MAAU,EAAM,iBAAiB,EACtE,IAAsB,GAAkB,MAAU,EAAM,oBAAoB,EAC5E,IAAc,GAAkB,MAAU,EAAM,YAAY,EAC5D,IAAoB,GAAkB,M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;IAC9B,eAAe;AAEb,KADA,EAAmB,GAAM,EACzB,EAAc,KAAK;;IAErB,CAAA;GACE;MAtOJ,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,EAC5D,IAAc,GAAkB,MAAU,EAAM,YAAY,EAC5D,IAAU,GAAkB,MAAU,EAAM,QAAQ,EACpD,IA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