@conferencesuite/ui 0.0.0-stage → 0.0.0
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/LICENSE +202 -0
- package/NOTICE +9 -0
- package/README.md +11 -2
- package/dist/AuthButton.d.ts +8 -0
- package/dist/AuthButton.js +73 -0
- package/dist/AuthButton.js.map +1 -0
- package/dist/AuthDialog.d.ts +2 -0
- package/dist/AuthDialog.js +295 -0
- package/dist/AuthDialog.js.map +1 -0
- package/dist/AuthNotice.d.ts +2 -0
- package/dist/AuthNotice.js +32 -0
- package/dist/AuthNotice.js.map +1 -0
- package/dist/CatalogPicker.d.ts +13 -0
- package/dist/CatalogPicker.js +272 -0
- package/dist/CatalogPicker.js.map +1 -0
- package/dist/CheckoutMount.d.ts +10 -0
- package/dist/CheckoutMount.js +51 -0
- package/dist/CheckoutMount.js.map +1 -0
- package/dist/PaymentStatus.d.ts +16 -0
- package/dist/PaymentStatus.js +173 -0
- package/dist/PaymentStatus.js.map +1 -0
- package/dist/ProposalForm.d.ts +12 -0
- package/dist/ProposalForm.js +345 -0
- package/dist/ProposalForm.js.map +1 -0
- package/dist/RegistrationCta.d.ts +17 -0
- package/dist/RegistrationCta.js +39 -0
- package/dist/RegistrationCta.js.map +1 -0
- package/dist/RegistrationForm.d.ts +13 -0
- package/dist/RegistrationForm.js +523 -0
- package/dist/RegistrationForm.js.map +1 -0
- package/dist/ScheduleBadge.d.ts +5 -0
- package/dist/ScheduleBadge.js +22 -0
- package/dist/ScheduleBadge.js.map +1 -0
- package/dist/SchedulePage.d.ts +10 -0
- package/dist/SchedulePage.js +435 -0
- package/dist/SchedulePage.js.map +1 -0
- package/dist/ScheduleViews.d.ts +32 -0
- package/dist/ScheduleViews.js +294 -0
- package/dist/ScheduleViews.js.map +1 -0
- package/dist/SessionDialog.d.ts +16 -0
- package/dist/SessionDialog.js +144 -0
- package/dist/SessionDialog.js.map +1 -0
- package/dist/SuiteAuth.d.ts +6 -0
- package/dist/SuiteAuth.js +20 -0
- package/dist/SuiteAuth.js.map +1 -0
- package/dist/classes.d.ts +36 -0
- package/dist/classes.js +40 -0
- package/dist/classes.js.map +1 -0
- package/dist/fields.d.ts +10 -0
- package/dist/fields.js +250 -0
- package/dist/fields.js.map +1 -0
- package/dist/scheduleClasses.d.ts +16 -0
- package/dist/scheduleClasses.js +20 -0
- package/dist/scheduleClasses.js.map +1 -0
- package/package.json +43 -3
|
@@ -0,0 +1,435 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { Tabs } from "@ark-ui/react/tabs";
|
|
3
|
+
import { CalendarPlus, Printer, Search } from "lucide-react";
|
|
4
|
+
import { useId, useMemo, useRef, useState } from "react";
|
|
5
|
+
import { publicFeedUrl, webcalUrl } from "@conferencesuite/core/schedule/api";
|
|
6
|
+
import { NO_FILTERS, dayHeading, filterSessions, lookups, scheduleDays, sessionsOnDay } from "@conferencesuite/core/schedule/logic";
|
|
7
|
+
import { themeVars } from "@conferencesuite/core/schedule/theme";
|
|
8
|
+
import { formatDay, viewerZone, zoneName } from "@conferencesuite/core/schedule/time";
|
|
9
|
+
import { useAuth } from "@conferencesuite/react/AuthProvider";
|
|
10
|
+
import { useAgenda } from "@conferencesuite/react/useAgenda";
|
|
11
|
+
import { useMediaQuery } from "@conferencesuite/react/useMediaQuery";
|
|
12
|
+
import { useSchedule } from "@conferencesuite/react/useSchedule";
|
|
13
|
+
import { SessionDialog } from "./SessionDialog.js";
|
|
14
|
+
import { AgendaView, GridView } from "./ScheduleViews.js";
|
|
15
|
+
import { sch } from "./scheduleClasses.js";
|
|
16
|
+
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
17
|
+
// src/SchedulePage.tsx
|
|
18
|
+
function Notice({ title, children, tone = "info" }) {
|
|
19
|
+
return /* @__PURE__ */ jsx("div", {
|
|
20
|
+
role: tone === "error" ? "alert" : "status",
|
|
21
|
+
className: "alert bg-base-200 text-base-content border border-info text-sm",
|
|
22
|
+
children: /* @__PURE__ */ jsxs("div", { children: [/* @__PURE__ */ jsx("p", {
|
|
23
|
+
className: "font-semibold",
|
|
24
|
+
children: title
|
|
25
|
+
}), children] })
|
|
26
|
+
});
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* The public schedule: day tabs, a rooms-by-time grid on wide screens and an agenda list on
|
|
30
|
+
* narrow ones, filters and search, a session dialog, a bookmarked "My schedule" that syncs when
|
|
31
|
+
* you're signed in, calendar feeds, and a clean print layout. Everything comes from the suite
|
|
32
|
+
* (`GET /api/schedule`); the org's theme arrives as --cs-* variables.
|
|
33
|
+
*/
|
|
34
|
+
function SchedulePage({ config }) {
|
|
35
|
+
const { load, retry } = useSchedule(config);
|
|
36
|
+
if (load.status === "loading") return /* @__PURE__ */ jsxs("p", {
|
|
37
|
+
role: "status",
|
|
38
|
+
"aria-live": "polite",
|
|
39
|
+
className: "text-center",
|
|
40
|
+
children: [/* @__PURE__ */ jsx("span", {
|
|
41
|
+
className: "loading loading-spinner loading-sm mr-2",
|
|
42
|
+
"aria-hidden": "true"
|
|
43
|
+
}), "Loading the schedule…"]
|
|
44
|
+
});
|
|
45
|
+
if (load.status === "error") return load.code === "plan_inactive" ? /* @__PURE__ */ jsx(Notice, {
|
|
46
|
+
title: "The schedule isn't available right now",
|
|
47
|
+
children: "Please check back soon."
|
|
48
|
+
}) : /* @__PURE__ */ jsxs(Notice, {
|
|
49
|
+
tone: "error",
|
|
50
|
+
title: "We couldn't load the schedule",
|
|
51
|
+
children: [/* @__PURE__ */ jsx("p", { children: load.message }), /* @__PURE__ */ jsx("button", {
|
|
52
|
+
type: "button",
|
|
53
|
+
className: "btn btn-sm mt-2",
|
|
54
|
+
onClick: retry,
|
|
55
|
+
children: "Try again"
|
|
56
|
+
})]
|
|
57
|
+
});
|
|
58
|
+
if (load.schedule.sessions.length === 0) return /* @__PURE__ */ jsx(Notice, {
|
|
59
|
+
title: "The program hasn't been published yet",
|
|
60
|
+
children: /* @__PURE__ */ jsx("p", { children: "Check back soon. Once sessions are published they will appear here." })
|
|
61
|
+
});
|
|
62
|
+
return /* @__PURE__ */ jsx(Loaded, {
|
|
63
|
+
config,
|
|
64
|
+
schedule: load.schedule
|
|
65
|
+
});
|
|
66
|
+
}
|
|
67
|
+
function Loaded({ config, schedule }) {
|
|
68
|
+
const auth = useAuth();
|
|
69
|
+
const agenda = useAgenda(config, schedule);
|
|
70
|
+
const uid = useId();
|
|
71
|
+
const wide = useMediaQuery("(min-width: 1024px)");
|
|
72
|
+
const eventZone = schedule.timezone;
|
|
73
|
+
const mine = viewerZone();
|
|
74
|
+
const canLocal = !!mine && mine !== eventZone;
|
|
75
|
+
const [local, setLocal] = useState(false);
|
|
76
|
+
const tz = local && mine ? mine : eventZone;
|
|
77
|
+
const [filters, setFilters] = useState(NO_FILTERS);
|
|
78
|
+
const [openId, setOpenId] = useState(null);
|
|
79
|
+
const opener = useRef(null);
|
|
80
|
+
const [announce, setAnnounce] = useState("");
|
|
81
|
+
const lookup = useMemo(() => lookups(schedule), [schedule]);
|
|
82
|
+
const themed = useMemo(() => themeVars(schedule.theme), [schedule.theme]);
|
|
83
|
+
const filtered = useMemo(() => filterSessions(schedule.sessions, filters, agenda.ids), [
|
|
84
|
+
schedule.sessions,
|
|
85
|
+
filters,
|
|
86
|
+
agenda.ids
|
|
87
|
+
]);
|
|
88
|
+
const allDays = useMemo(() => scheduleDays(schedule.sessions, tz), [schedule.sessions, tz]);
|
|
89
|
+
const [pickedDay, setDay] = useState(allDays[0]);
|
|
90
|
+
const day = allDays.includes(pickedDay) ? pickedDay : allDays[0];
|
|
91
|
+
const open = schedule.sessions.find((s) => s.id === openId) ?? null;
|
|
92
|
+
const toggle = (id) => {
|
|
93
|
+
const s = schedule.sessions.find((x) => x.id === id);
|
|
94
|
+
const on = agenda.ids.has(id);
|
|
95
|
+
agenda.toggle(id);
|
|
96
|
+
if (s) setAnnounce(on ? `Removed “${s.title}” from your schedule.` : `Added “${s.title}” to your schedule.`);
|
|
97
|
+
};
|
|
98
|
+
const openSession = (id) => {
|
|
99
|
+
opener.current = document.activeElement instanceof HTMLElement ? document.activeElement : null;
|
|
100
|
+
setOpenId(id);
|
|
101
|
+
};
|
|
102
|
+
const feed = publicFeedUrl(config);
|
|
103
|
+
const set = (k, v) => setFilters((f) => ({
|
|
104
|
+
...f,
|
|
105
|
+
[k]: v
|
|
106
|
+
}));
|
|
107
|
+
const hasFilters = !!(filters.track || filters.room || filters.text.trim());
|
|
108
|
+
const showing = filtered.length;
|
|
109
|
+
const common = {
|
|
110
|
+
rooms: schedule.rooms,
|
|
111
|
+
lookup,
|
|
112
|
+
tz,
|
|
113
|
+
agenda: agenda.ids,
|
|
114
|
+
onToggle: toggle,
|
|
115
|
+
onOpen: openSession,
|
|
116
|
+
allSessions: schedule.sessions
|
|
117
|
+
};
|
|
118
|
+
return /* @__PURE__ */ jsxs("div", {
|
|
119
|
+
className: `${sch.root} flex flex-col gap-4 p-4 print:p-0`,
|
|
120
|
+
style: themed,
|
|
121
|
+
children: [
|
|
122
|
+
/* @__PURE__ */ jsx("div", {
|
|
123
|
+
role: "status",
|
|
124
|
+
"aria-live": "polite",
|
|
125
|
+
className: "sr-only",
|
|
126
|
+
children: announce
|
|
127
|
+
}),
|
|
128
|
+
/* @__PURE__ */ jsxs("div", {
|
|
129
|
+
className: "flex flex-col gap-3 print:hidden",
|
|
130
|
+
children: [
|
|
131
|
+
/* @__PURE__ */ jsxs("div", {
|
|
132
|
+
className: "flex flex-wrap items-center gap-2",
|
|
133
|
+
children: [/* @__PURE__ */ jsxs("div", {
|
|
134
|
+
role: "group",
|
|
135
|
+
"aria-label": "Which sessions to show",
|
|
136
|
+
className: "flex gap-2",
|
|
137
|
+
children: [/* @__PURE__ */ jsx("button", {
|
|
138
|
+
type: "button",
|
|
139
|
+
"aria-pressed": !filters.mine,
|
|
140
|
+
onClick: () => set("mine", false),
|
|
141
|
+
className: `${sch.ghostBtn} ${!filters.mine ? sch.toggleOn : ""}`,
|
|
142
|
+
children: "Full schedule"
|
|
143
|
+
}), /* @__PURE__ */ jsxs("button", {
|
|
144
|
+
type: "button",
|
|
145
|
+
"aria-pressed": filters.mine,
|
|
146
|
+
onClick: () => set("mine", true),
|
|
147
|
+
className: `${sch.ghostBtn} ${filters.mine ? sch.toggleOn : ""}`,
|
|
148
|
+
children: [
|
|
149
|
+
"My schedule (",
|
|
150
|
+
agenda.ids.size,
|
|
151
|
+
")"
|
|
152
|
+
]
|
|
153
|
+
})]
|
|
154
|
+
}), /* @__PURE__ */ jsxs("button", {
|
|
155
|
+
type: "button",
|
|
156
|
+
className: `${sch.ghostBtn} ml-auto`,
|
|
157
|
+
onClick: () => window.print(),
|
|
158
|
+
children: [/* @__PURE__ */ jsx(Printer, {
|
|
159
|
+
className: "size-4",
|
|
160
|
+
"aria-hidden": "true"
|
|
161
|
+
}), " Print"]
|
|
162
|
+
})]
|
|
163
|
+
}),
|
|
164
|
+
/* @__PURE__ */ jsxs("div", {
|
|
165
|
+
className: "grid gap-2 sm:grid-cols-[1fr_auto_auto]",
|
|
166
|
+
children: [
|
|
167
|
+
/* @__PURE__ */ jsxs("div", { children: [/* @__PURE__ */ jsx("label", {
|
|
168
|
+
htmlFor: `${uid}-q`,
|
|
169
|
+
className: "sr-only",
|
|
170
|
+
children: "Search sessions, speakers and topics"
|
|
171
|
+
}), /* @__PURE__ */ jsxs("div", {
|
|
172
|
+
className: "relative",
|
|
173
|
+
children: [/* @__PURE__ */ jsx(Search, {
|
|
174
|
+
className: "pointer-events-none absolute left-3 top-1/2 size-4 -translate-y-1/2",
|
|
175
|
+
"aria-hidden": "true"
|
|
176
|
+
}), /* @__PURE__ */ jsx("input", {
|
|
177
|
+
id: `${uid}-q`,
|
|
178
|
+
type: "search",
|
|
179
|
+
className: `${sch.field} pl-9`,
|
|
180
|
+
placeholder: "Search sessions, speakers, topics",
|
|
181
|
+
value: filters.text,
|
|
182
|
+
onChange: (e) => set("text", e.target.value)
|
|
183
|
+
})]
|
|
184
|
+
})] }),
|
|
185
|
+
/* @__PURE__ */ jsxs("div", { children: [/* @__PURE__ */ jsx("label", {
|
|
186
|
+
htmlFor: `${uid}-track`,
|
|
187
|
+
className: "sr-only",
|
|
188
|
+
children: "Track"
|
|
189
|
+
}), /* @__PURE__ */ jsxs("select", {
|
|
190
|
+
id: `${uid}-track`,
|
|
191
|
+
className: sch.field,
|
|
192
|
+
value: filters.track ?? "",
|
|
193
|
+
onChange: (e) => set("track", e.target.value || null),
|
|
194
|
+
children: [/* @__PURE__ */ jsx("option", {
|
|
195
|
+
value: "",
|
|
196
|
+
children: "All tracks"
|
|
197
|
+
}), schedule.tracks.map((t) => /* @__PURE__ */ jsx("option", {
|
|
198
|
+
value: t.id,
|
|
199
|
+
children: t.name
|
|
200
|
+
}, t.id))]
|
|
201
|
+
})] }),
|
|
202
|
+
/* @__PURE__ */ jsxs("div", { children: [/* @__PURE__ */ jsx("label", {
|
|
203
|
+
htmlFor: `${uid}-room`,
|
|
204
|
+
className: "sr-only",
|
|
205
|
+
children: "Room"
|
|
206
|
+
}), /* @__PURE__ */ jsxs("select", {
|
|
207
|
+
id: `${uid}-room`,
|
|
208
|
+
className: sch.field,
|
|
209
|
+
value: filters.room ?? "",
|
|
210
|
+
onChange: (e) => set("room", e.target.value || null),
|
|
211
|
+
children: [/* @__PURE__ */ jsx("option", {
|
|
212
|
+
value: "",
|
|
213
|
+
children: "All rooms"
|
|
214
|
+
}), schedule.rooms.map((r) => /* @__PURE__ */ jsx("option", {
|
|
215
|
+
value: r.id,
|
|
216
|
+
children: r.name
|
|
217
|
+
}, r.id))]
|
|
218
|
+
})] })
|
|
219
|
+
]
|
|
220
|
+
}),
|
|
221
|
+
/* @__PURE__ */ jsxs("div", {
|
|
222
|
+
className: "flex flex-wrap items-center justify-between gap-2 text-sm",
|
|
223
|
+
children: [/* @__PURE__ */ jsxs("p", {
|
|
224
|
+
className: `m-0 ${sch.muted}`,
|
|
225
|
+
children: [
|
|
226
|
+
"Times are in ",
|
|
227
|
+
zoneName(tz, new Date(schedule.sessions[0].starts_at), "long"),
|
|
228
|
+
" (",
|
|
229
|
+
tz,
|
|
230
|
+
").",
|
|
231
|
+
canLocal && /* @__PURE__ */ jsxs("label", {
|
|
232
|
+
className: "ml-3 inline-flex items-center gap-2",
|
|
233
|
+
children: [
|
|
234
|
+
/* @__PURE__ */ jsx("input", {
|
|
235
|
+
type: "checkbox",
|
|
236
|
+
checked: local,
|
|
237
|
+
onChange: (e) => setLocal(e.target.checked)
|
|
238
|
+
}),
|
|
239
|
+
"Show in my time zone (",
|
|
240
|
+
mine,
|
|
241
|
+
")"
|
|
242
|
+
]
|
|
243
|
+
})
|
|
244
|
+
]
|
|
245
|
+
}), /* @__PURE__ */ jsxs("p", {
|
|
246
|
+
role: "status",
|
|
247
|
+
className: `m-0 ${sch.muted}`,
|
|
248
|
+
children: [hasFilters || filters.mine ? `${showing} session${showing === 1 ? "" : "s"} match.` : `${schedule.sessions.length} sessions.`, hasFilters && /* @__PURE__ */ jsx("button", {
|
|
249
|
+
type: "button",
|
|
250
|
+
className: `ml-2 ${sch.link}`,
|
|
251
|
+
onClick: () => setFilters((f) => ({
|
|
252
|
+
...NO_FILTERS,
|
|
253
|
+
mine: f.mine
|
|
254
|
+
})),
|
|
255
|
+
children: "Clear filters"
|
|
256
|
+
})]
|
|
257
|
+
})]
|
|
258
|
+
})
|
|
259
|
+
]
|
|
260
|
+
}),
|
|
261
|
+
/* @__PURE__ */ jsx("div", {
|
|
262
|
+
className: "print:hidden",
|
|
263
|
+
children: /* @__PURE__ */ jsxs(Tabs.Root, {
|
|
264
|
+
value: day,
|
|
265
|
+
onValueChange: (e) => setDay(e.value),
|
|
266
|
+
lazyMount: true,
|
|
267
|
+
unmountOnExit: true,
|
|
268
|
+
children: [/* @__PURE__ */ jsx(Tabs.List, {
|
|
269
|
+
className: "flex flex-wrap gap-1 border-b border-current/25",
|
|
270
|
+
"aria-label": "Conference days",
|
|
271
|
+
children: allDays.map((d) => /* @__PURE__ */ jsxs(Tabs.Trigger, {
|
|
272
|
+
value: d,
|
|
273
|
+
className: `px-4 py-2 text-sm font-semibold data-[selected]:border-b-4 data-[selected]:border-[var(--cs-accent,var(--color-primary))] ${sch.focus}`,
|
|
274
|
+
children: [formatDay(d), /* @__PURE__ */ jsxs("span", {
|
|
275
|
+
className: "sr-only",
|
|
276
|
+
children: [
|
|
277
|
+
" (",
|
|
278
|
+
sessionsOnDay(filtered, d, tz).length,
|
|
279
|
+
" sessions)"
|
|
280
|
+
]
|
|
281
|
+
})]
|
|
282
|
+
}, d))
|
|
283
|
+
}), allDays.map((d) => {
|
|
284
|
+
const list = sessionsOnDay(filtered, d, tz);
|
|
285
|
+
return /* @__PURE__ */ jsxs(Tabs.Content, {
|
|
286
|
+
value: d,
|
|
287
|
+
className: "pt-4",
|
|
288
|
+
children: [/* @__PURE__ */ jsx("h2", {
|
|
289
|
+
className: "mb-3 text-xl font-bold",
|
|
290
|
+
children: dayHeading(d, list.length)
|
|
291
|
+
}), filters.mine && list.length === 0 ? /* @__PURE__ */ jsx("p", {
|
|
292
|
+
className: sch.muted,
|
|
293
|
+
children: "You haven't added anything on this day. Use “Add to my schedule” on a session to build your agenda."
|
|
294
|
+
}) : wide ? /* @__PURE__ */ jsx(GridView, {
|
|
295
|
+
day: d,
|
|
296
|
+
sessions: list,
|
|
297
|
+
...common
|
|
298
|
+
}) : /* @__PURE__ */ jsx(AgendaView, {
|
|
299
|
+
day: d,
|
|
300
|
+
sessions: list,
|
|
301
|
+
...common
|
|
302
|
+
})]
|
|
303
|
+
}, d);
|
|
304
|
+
})]
|
|
305
|
+
})
|
|
306
|
+
}),
|
|
307
|
+
/* @__PURE__ */ jsxs("section", {
|
|
308
|
+
"aria-labelledby": `${uid}-cal`,
|
|
309
|
+
className: `${sch.surface} flex flex-col gap-2 rounded-box p-4 print:hidden`,
|
|
310
|
+
children: [
|
|
311
|
+
/* @__PURE__ */ jsxs("h2", {
|
|
312
|
+
id: `${uid}-cal`,
|
|
313
|
+
className: "m-0 flex items-center gap-2 text-lg font-bold",
|
|
314
|
+
children: [/* @__PURE__ */ jsx(CalendarPlus, {
|
|
315
|
+
className: "size-5",
|
|
316
|
+
"aria-hidden": "true"
|
|
317
|
+
}), " Take it with you"]
|
|
318
|
+
}),
|
|
319
|
+
/* @__PURE__ */ jsxs("p", {
|
|
320
|
+
className: "m-0 text-sm",
|
|
321
|
+
role: "status",
|
|
322
|
+
children: [
|
|
323
|
+
agenda.signedIn ? agenda.sync === "failed" ? "Your schedule is saved on this device, but we couldn't sync it to your account." : agenda.sync === "syncing" ? "Saving your schedule to your account…" : "Your schedule is saved to your account and follows you across devices." : "Your schedule is saved on this device.",
|
|
324
|
+
!agenda.signedIn && /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
325
|
+
" ",
|
|
326
|
+
/* @__PURE__ */ jsx("button", {
|
|
327
|
+
type: "button",
|
|
328
|
+
className: sch.link,
|
|
329
|
+
onClick: () => auth.open("signin"),
|
|
330
|
+
children: "Sign in to keep it across devices"
|
|
331
|
+
}),
|
|
332
|
+
"."
|
|
333
|
+
] }),
|
|
334
|
+
agenda.sync === "failed" && /* @__PURE__ */ jsxs(Fragment, { children: [" ", /* @__PURE__ */ jsx("button", {
|
|
335
|
+
type: "button",
|
|
336
|
+
className: sch.link,
|
|
337
|
+
onClick: () => void agenda.retrySync(),
|
|
338
|
+
children: "Try again"
|
|
339
|
+
})] })
|
|
340
|
+
]
|
|
341
|
+
}),
|
|
342
|
+
/* @__PURE__ */ jsxs("ul", {
|
|
343
|
+
className: "m-0 flex list-none flex-wrap gap-x-6 gap-y-1 p-0 text-sm",
|
|
344
|
+
children: [
|
|
345
|
+
/* @__PURE__ */ jsx("li", { children: /* @__PURE__ */ jsx("a", {
|
|
346
|
+
className: sch.link,
|
|
347
|
+
href: webcalUrl(feed),
|
|
348
|
+
children: "Subscribe to the full schedule in your calendar"
|
|
349
|
+
}) }),
|
|
350
|
+
agenda.feedUrl && /* @__PURE__ */ jsx("li", { children: /* @__PURE__ */ jsx("a", {
|
|
351
|
+
className: sch.link,
|
|
352
|
+
href: webcalUrl(agenda.feedUrl),
|
|
353
|
+
children: "Subscribe to my schedule in your calendar"
|
|
354
|
+
}) }),
|
|
355
|
+
/* @__PURE__ */ jsx("li", { children: /* @__PURE__ */ jsx("a", {
|
|
356
|
+
className: sch.link,
|
|
357
|
+
href: feed,
|
|
358
|
+
children: "Download the full schedule (.ics)"
|
|
359
|
+
}) })
|
|
360
|
+
]
|
|
361
|
+
})
|
|
362
|
+
]
|
|
363
|
+
}),
|
|
364
|
+
/* @__PURE__ */ jsx("div", {
|
|
365
|
+
className: "hidden print:block",
|
|
366
|
+
"aria-hidden": "true",
|
|
367
|
+
children: /* @__PURE__ */ jsx(PrintAll, {
|
|
368
|
+
schedule,
|
|
369
|
+
sessions: filtered,
|
|
370
|
+
lookup,
|
|
371
|
+
tz
|
|
372
|
+
})
|
|
373
|
+
}),
|
|
374
|
+
/* @__PURE__ */ jsx(SessionDialog, {
|
|
375
|
+
session: open,
|
|
376
|
+
allSessions: schedule.sessions,
|
|
377
|
+
lookup,
|
|
378
|
+
tz,
|
|
379
|
+
agenda: agenda.ids,
|
|
380
|
+
onToggle: toggle,
|
|
381
|
+
onClose: () => setOpenId(null),
|
|
382
|
+
returnFocus: () => opener.current?.isConnected ? opener.current : null,
|
|
383
|
+
themed
|
|
384
|
+
})
|
|
385
|
+
]
|
|
386
|
+
});
|
|
387
|
+
}
|
|
388
|
+
function PrintAll({ schedule, sessions, lookup, tz }) {
|
|
389
|
+
const days = scheduleDays(sessions, tz);
|
|
390
|
+
return /* @__PURE__ */ jsxs("div", {
|
|
391
|
+
className: "text-black",
|
|
392
|
+
children: [
|
|
393
|
+
/* @__PURE__ */ jsx("h1", {
|
|
394
|
+
className: "text-2xl font-bold",
|
|
395
|
+
children: "Schedule"
|
|
396
|
+
}),
|
|
397
|
+
days.map((d) => /* @__PURE__ */ jsxs("section", {
|
|
398
|
+
className: "mt-4 break-inside-avoid-page",
|
|
399
|
+
children: [/* @__PURE__ */ jsx("h2", {
|
|
400
|
+
className: "border-b border-black text-lg font-bold",
|
|
401
|
+
children: formatDay(d, "long")
|
|
402
|
+
}), /* @__PURE__ */ jsx("ul", {
|
|
403
|
+
className: "m-0 list-none p-0",
|
|
404
|
+
children: sessionsOnDay(sessions, d, tz).map((s) => /* @__PURE__ */ jsxs("li", {
|
|
405
|
+
className: "break-inside-avoid border-b border-black/20 py-1 text-sm",
|
|
406
|
+
children: [
|
|
407
|
+
/* @__PURE__ */ jsx("strong", { children: new Intl.DateTimeFormat("en-US", {
|
|
408
|
+
timeZone: tz,
|
|
409
|
+
hour: "numeric",
|
|
410
|
+
minute: "2-digit"
|
|
411
|
+
}).format(new Date(s.starts_at)) }),
|
|
412
|
+
" ",
|
|
413
|
+
s.title,
|
|
414
|
+
s.room_id ? ` · ${lookup.rooms.get(s.room_id)}` : "",
|
|
415
|
+
s.speakers.length ? ` · ${s.speakers.map((p) => p.name).join(", ")}` : ""
|
|
416
|
+
]
|
|
417
|
+
}, s.id))
|
|
418
|
+
})]
|
|
419
|
+
}, d)),
|
|
420
|
+
/* @__PURE__ */ jsxs("p", {
|
|
421
|
+
className: "mt-4 text-xs",
|
|
422
|
+
children: [
|
|
423
|
+
"Times in ",
|
|
424
|
+
tz,
|
|
425
|
+
". ",
|
|
426
|
+
schedule.sessions.length,
|
|
427
|
+
" sessions."
|
|
428
|
+
]
|
|
429
|
+
})
|
|
430
|
+
]
|
|
431
|
+
});
|
|
432
|
+
}
|
|
433
|
+
export { SchedulePage };
|
|
434
|
+
|
|
435
|
+
//# sourceMappingURL=SchedulePage.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SchedulePage.js","names":[],"sources":["../src/SchedulePage.tsx"],"sourcesContent":["\"use client\";\n\nimport { Tabs } from \"@ark-ui/react/tabs\";\nimport { CalendarPlus, Printer, Search } from \"lucide-react\";\nimport { useId, useMemo, useRef, useState } from \"react\";\nimport { publicFeedUrl, webcalUrl } from \"@conferencesuite/core/schedule/api\";\nimport { dayHeading, filterSessions, lookups, NO_FILTERS, scheduleDays, sessionsOnDay } from \"@conferencesuite/core/schedule/logic\";\nimport { themeVars } from \"@conferencesuite/core/schedule/theme\";\nimport { formatDay, viewerZone, zoneName } from \"@conferencesuite/core/schedule/time\";\nimport type { Filters, Schedule } from \"@conferencesuite/core/schedule/types\";\nimport type { SuiteConfig } from \"@conferencesuite/core/types\";\nimport { useAuth } from \"@conferencesuite/react/AuthProvider\";\nimport { useAgenda } from \"@conferencesuite/react/useAgenda\";\nimport { useMediaQuery } from \"@conferencesuite/react/useMediaQuery\";\nimport { useSchedule } from \"@conferencesuite/react/useSchedule\";\nimport { SessionDialog } from \"./SessionDialog\";\nimport { AgendaView, GridView } from \"./ScheduleViews\";\nimport { sch } from \"./scheduleClasses\";\n\nfunction Notice({ title, children, tone = \"info\" }: { title: string; children?: React.ReactNode; tone?: \"info\" | \"error\" }) {\n return (\n <div role={tone === \"error\" ? \"alert\" : \"status\"} className=\"alert bg-base-200 text-base-content border border-info text-sm\">\n <div>\n <p className=\"font-semibold\">{title}</p>\n {children}\n </div>\n </div>\n );\n}\n\n/**\n * The public schedule: day tabs, a rooms-by-time grid on wide screens and an agenda list on\n * narrow ones, filters and search, a session dialog, a bookmarked \"My schedule\" that syncs when\n * you're signed in, calendar feeds, and a clean print layout. Everything comes from the suite\n * (`GET /api/schedule`); the org's theme arrives as --cs-* variables.\n */\nexport function SchedulePage({ config }: { config: SuiteConfig }) {\n const { load, retry } = useSchedule(config);\n if (load.status === \"loading\") {\n return (\n <p role=\"status\" aria-live=\"polite\" className=\"text-center\">\n <span className=\"loading loading-spinner loading-sm mr-2\" aria-hidden=\"true\" />\n Loading the schedule…\n </p>\n );\n }\n if (load.status === \"error\") {\n return load.code === \"plan_inactive\" ? (\n <Notice title=\"The schedule isn't available right now\">Please check back soon.</Notice>\n ) : (\n <Notice tone=\"error\" title=\"We couldn't load the schedule\">\n <p>{load.message}</p>\n <button type=\"button\" className=\"btn btn-sm mt-2\" onClick={retry}>\n Try again\n </button>\n </Notice>\n );\n }\n if (load.schedule.sessions.length === 0) {\n return (\n <Notice title=\"The program hasn't been published yet\">\n <p>Check back soon. Once sessions are published they will appear here.</p>\n </Notice>\n );\n }\n return <Loaded config={config} schedule={load.schedule} />;\n}\n\nfunction Loaded({ config, schedule }: { config: SuiteConfig; schedule: Schedule }) {\n const auth = useAuth();\n const agenda = useAgenda(config, schedule);\n const uid = useId();\n const wide = useMediaQuery(\"(min-width: 1024px)\");\n const eventZone = schedule.timezone;\n const mine = viewerZone();\n const canLocal = !!mine && mine !== eventZone;\n const [local, setLocal] = useState(false);\n const tz = local && mine ? mine : eventZone;\n\n const [filters, setFilters] = useState<Filters>(NO_FILTERS);\n const [openId, setOpenId] = useState<string | null>(null);\n const opener = useRef<HTMLElement | null>(null);\n const [announce, setAnnounce] = useState(\"\");\n\n const lookup = useMemo(() => lookups(schedule), [schedule]);\n const themed = useMemo(() => themeVars(schedule.theme), [schedule.theme]);\n const filtered = useMemo(() => filterSessions(schedule.sessions, filters, agenda.ids), [schedule.sessions, filters, agenda.ids]);\n const allDays = useMemo(() => scheduleDays(schedule.sessions, tz), [schedule.sessions, tz]);\n const [pickedDay, setDay] = useState<string>(allDays[0]);\n const day = allDays.includes(pickedDay) ? pickedDay : allDays[0];\n const open = schedule.sessions.find((s) => s.id === openId) ?? null;\n\n const toggle = (id: string) => {\n const s = schedule.sessions.find((x) => x.id === id);\n const on = agenda.ids.has(id);\n agenda.toggle(id);\n if (s) setAnnounce(on ? `Removed “${s.title}” from your schedule.` : `Added “${s.title}” to your schedule.`);\n };\n const openSession = (id: string) => {\n opener.current = document.activeElement instanceof HTMLElement ? document.activeElement : null;\n setOpenId(id);\n };\n\n const feed = publicFeedUrl(config);\n const set = <K extends keyof Filters>(k: K, v: Filters[K]) => setFilters((f) => ({ ...f, [k]: v }));\n const hasFilters = !!(filters.track || filters.room || filters.text.trim());\n const showing = filtered.length;\n\n const common = { rooms: schedule.rooms, lookup, tz, agenda: agenda.ids, onToggle: toggle, onOpen: openSession, allSessions: schedule.sessions };\n\n return (\n <div className={`${sch.root} flex flex-col gap-4 p-4 print:p-0`} style={themed}>\n <div role=\"status\" aria-live=\"polite\" className=\"sr-only\">\n {announce}\n </div>\n\n {/* Controls */}\n <div className=\"flex flex-col gap-3 print:hidden\">\n <div className=\"flex flex-wrap items-center gap-2\">\n <div role=\"group\" aria-label=\"Which sessions to show\" className=\"flex gap-2\">\n <button type=\"button\" aria-pressed={!filters.mine} onClick={() => set(\"mine\", false)} className={`${sch.ghostBtn} ${!filters.mine ? sch.toggleOn : \"\"}`}>\n Full schedule\n </button>\n <button type=\"button\" aria-pressed={filters.mine} onClick={() => set(\"mine\", true)} className={`${sch.ghostBtn} ${filters.mine ? sch.toggleOn : \"\"}`}>\n My schedule ({agenda.ids.size})\n </button>\n </div>\n <button type=\"button\" className={`${sch.ghostBtn} ml-auto`} onClick={() => window.print()}>\n <Printer className=\"size-4\" aria-hidden=\"true\" /> Print\n </button>\n </div>\n\n <div className=\"grid gap-2 sm:grid-cols-[1fr_auto_auto]\">\n <div>\n <label htmlFor={`${uid}-q`} className=\"sr-only\">\n Search sessions, speakers and topics\n </label>\n <div className=\"relative\">\n <Search className=\"pointer-events-none absolute left-3 top-1/2 size-4 -translate-y-1/2\" aria-hidden=\"true\" />\n <input id={`${uid}-q`} type=\"search\" className={`${sch.field} pl-9`} placeholder=\"Search sessions, speakers, topics\" value={filters.text} onChange={(e) => set(\"text\", e.target.value)} />\n </div>\n </div>\n <div>\n <label htmlFor={`${uid}-track`} className=\"sr-only\">\n Track\n </label>\n <select id={`${uid}-track`} className={sch.field} value={filters.track ?? \"\"} onChange={(e) => set(\"track\", e.target.value || null)}>\n <option value=\"\">All tracks</option>\n {schedule.tracks.map((t) => (\n <option key={t.id} value={t.id}>\n {t.name}\n </option>\n ))}\n </select>\n </div>\n <div>\n <label htmlFor={`${uid}-room`} className=\"sr-only\">\n Room\n </label>\n <select id={`${uid}-room`} className={sch.field} value={filters.room ?? \"\"} onChange={(e) => set(\"room\", e.target.value || null)}>\n <option value=\"\">All rooms</option>\n {schedule.rooms.map((r) => (\n <option key={r.id} value={r.id}>\n {r.name}\n </option>\n ))}\n </select>\n </div>\n </div>\n\n <div className=\"flex flex-wrap items-center justify-between gap-2 text-sm\">\n <p className={`m-0 ${sch.muted}`}>\n Times are in {zoneName(tz, new Date(schedule.sessions[0].starts_at), \"long\")} ({tz}).\n {canLocal && (\n <label className=\"ml-3 inline-flex items-center gap-2\">\n <input type=\"checkbox\" checked={local} onChange={(e) => setLocal(e.target.checked)} />\n Show in my time zone ({mine})\n </label>\n )}\n </p>\n <p role=\"status\" className={`m-0 ${sch.muted}`}>\n {hasFilters || filters.mine ? `${showing} session${showing === 1 ? \"\" : \"s\"} match.` : `${schedule.sessions.length} sessions.`}\n {hasFilters && (\n <button type=\"button\" className={`ml-2 ${sch.link}`} onClick={() => setFilters((f) => ({ ...NO_FILTERS, mine: f.mine }))}>\n Clear filters\n </button>\n )}\n </p>\n </div>\n </div>\n\n {/* Days */}\n <div className=\"print:hidden\">\n <Tabs.Root value={day} onValueChange={(e) => setDay(e.value)} lazyMount unmountOnExit>\n <Tabs.List className=\"flex flex-wrap gap-1 border-b border-current/25\" aria-label=\"Conference days\">\n {allDays.map((d) => (\n <Tabs.Trigger key={d} value={d} className={`px-4 py-2 text-sm font-semibold data-[selected]:border-b-4 data-[selected]:border-[var(--cs-accent,var(--color-primary))] ${sch.focus}`}>\n {formatDay(d)}\n <span className=\"sr-only\"> ({sessionsOnDay(filtered, d, tz).length} sessions)</span>\n </Tabs.Trigger>\n ))}\n </Tabs.List>\n {allDays.map((d) => {\n const list = sessionsOnDay(filtered, d, tz);\n return (\n <Tabs.Content key={d} value={d} className=\"pt-4\">\n <h2 className=\"mb-3 text-xl font-bold\">{dayHeading(d, list.length)}</h2>\n {filters.mine && list.length === 0 ? (\n <p className={sch.muted}>You haven't added anything on this day. Use “Add to my schedule” on a session to build your agenda.</p>\n ) : wide ? (\n <GridView day={d} sessions={list} {...common} />\n ) : (\n <AgendaView day={d} sessions={list} {...common} />\n )}\n </Tabs.Content>\n );\n })}\n </Tabs.Root>\n </div>\n\n {/* Agenda sync and calendar links */}\n <section aria-labelledby={`${uid}-cal`} className={`${sch.surface} flex flex-col gap-2 rounded-box p-4 print:hidden`}>\n <h2 id={`${uid}-cal`} className=\"m-0 flex items-center gap-2 text-lg font-bold\">\n <CalendarPlus className=\"size-5\" aria-hidden=\"true\" /> Take it with you\n </h2>\n <p className=\"m-0 text-sm\" role=\"status\">\n {agenda.signedIn\n ? agenda.sync === \"failed\"\n ? \"Your schedule is saved on this device, but we couldn't sync it to your account.\"\n : agenda.sync === \"syncing\"\n ? \"Saving your schedule to your account…\"\n : \"Your schedule is saved to your account and follows you across devices.\"\n : \"Your schedule is saved on this device.\"}\n {!agenda.signedIn && (\n <>\n {\" \"}\n <button type=\"button\" className={sch.link} onClick={() => auth.open(\"signin\")}>\n Sign in to keep it across devices\n </button>\n .\n </>\n )}\n {agenda.sync === \"failed\" && (\n <>\n {\" \"}\n <button type=\"button\" className={sch.link} onClick={() => void agenda.retrySync()}>\n Try again\n </button>\n </>\n )}\n </p>\n <ul className=\"m-0 flex list-none flex-wrap gap-x-6 gap-y-1 p-0 text-sm\">\n <li>\n <a className={sch.link} href={webcalUrl(feed)}>\n Subscribe to the full schedule in your calendar\n </a>\n </li>\n {agenda.feedUrl && (\n <li>\n <a className={sch.link} href={webcalUrl(agenda.feedUrl)}>\n Subscribe to my schedule in your calendar\n </a>\n </li>\n )}\n <li>\n <a className={sch.link} href={feed}>\n Download the full schedule (.ics)\n </a>\n </li>\n </ul>\n </section>\n\n {/* Print: every day, as plain lists, nothing interactive */}\n <div className=\"hidden print:block\" aria-hidden=\"true\">\n <PrintAll schedule={schedule} sessions={filtered} lookup={lookup} tz={tz} />\n </div>\n\n <SessionDialog session={open} allSessions={schedule.sessions} lookup={lookup} tz={tz} agenda={agenda.ids} onToggle={toggle} onClose={() => setOpenId(null)} returnFocus={() => (opener.current?.isConnected ? opener.current : null)} themed={themed} />\n </div>\n );\n}\n\nfunction PrintAll({ schedule, sessions, lookup, tz }: { schedule: Schedule; sessions: Schedule[\"sessions\"]; lookup: ReturnType<typeof lookups>; tz: string }) {\n const days = scheduleDays(sessions, tz);\n return (\n <div className=\"text-black\">\n <h1 className=\"text-2xl font-bold\">Schedule</h1>\n {days.map((d) => (\n <section key={d} className=\"mt-4 break-inside-avoid-page\">\n <h2 className=\"border-b border-black text-lg font-bold\">{formatDay(d, \"long\")}</h2>\n <ul className=\"m-0 list-none p-0\">\n {sessionsOnDay(sessions, d, tz).map((s) => (\n <li key={s.id} className=\"break-inside-avoid border-b border-black/20 py-1 text-sm\">\n <strong>\n {new Intl.DateTimeFormat(\"en-US\", { timeZone: tz, hour: \"numeric\", minute: \"2-digit\" }).format(new Date(s.starts_at))}\n </strong>{\" \"}\n {s.title}\n {s.room_id ? ` · ${lookup.rooms.get(s.room_id)}` : \"\"}\n {s.speakers.length ? ` · ${s.speakers.map((p) => p.name).join(\", \")}` : \"\"}\n </li>\n ))}\n </ul>\n </section>\n ))}\n <p className=\"mt-4 text-xs\">Times in {tz}. {schedule.sessions.length} sessions.</p>\n </div>\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;;;AAmBA,SAAS,OAAO,EAAE,OAAO,UAAU,OAAO,UAAkF;CAC1H,OACE,oBAAC,OAAD;EAAK,MAAM,SAAS,UAAU,UAAU;EAAU,WAAU;EAC1D,UAAA,qBAAC,OAAD,EAAA,UAAA,CACE,oBAAC,KAAD;GAAG,WAAU;GAAiB,UAAA;EAAS,CAAA,GACtC,QACE,EAAA,CAAA;CACF,CAAA;AAET;;;;;;;AAQA,SAAgB,aAAa,EAAE,UAAmC;CAChE,MAAM,EAAE,MAAM,UAAU,YAAY,MAAM;CAC1C,IAAI,KAAK,WAAW,WAClB,OACE,qBAAC,KAAD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AOP,CACL;IACC,CAAA,CACG;GAdK,GAAA,CAcL,CACV;GACD,qBAAC,KAAD;IAAG,WAAU;IAAb,UAAA;KAA4B;KAAU;KAAG;KAAG,SAAS,SAAS;KAAO;IAAa;;EAC/E;;AAET"}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { Lookup } from "@conferencesuite/core/schedule/logic";
|
|
2
|
+
import { ScheduleRoom, ScheduleSession } from "@conferencesuite/core/schedule/types";
|
|
3
|
+
export type ViewProps = {
|
|
4
|
+
day: string;
|
|
5
|
+
sessions: ScheduleSession[];
|
|
6
|
+
rooms: ScheduleRoom[];
|
|
7
|
+
lookup: Lookup;
|
|
8
|
+
tz: string;
|
|
9
|
+
agenda: ReadonlySet<string>;
|
|
10
|
+
onToggle: (id: string) => void;
|
|
11
|
+
onOpen: (id: string) => void;
|
|
12
|
+
};
|
|
13
|
+
/** The bookmark button: a toggle that says what it will do and what it's for. */
|
|
14
|
+
export declare function BookmarkButton({ session, on, onToggle, compact }: {
|
|
15
|
+
session: ScheduleSession;
|
|
16
|
+
on: boolean;
|
|
17
|
+
onToggle: (id: string) => void;
|
|
18
|
+
compact?: boolean;
|
|
19
|
+
}): import("react").JSX.Element;
|
|
20
|
+
/** A day as a list grouped by start time. One heading per time, one card per session. */
|
|
21
|
+
export declare function AgendaView({ day, sessions, lookup, tz, agenda, onToggle, onOpen, allSessions }: ViewProps & {
|
|
22
|
+
allSessions: ScheduleSession[];
|
|
23
|
+
}): import("react").JSX.Element;
|
|
24
|
+
/**
|
|
25
|
+
* Rooms as columns, time down the side. Each room is a labelled list of sessions, so a screen
|
|
26
|
+
* reader reads it room by room in time order. The sessions are a single tab stop (roving
|
|
27
|
+
* tabindex): the arrow keys move between them (up/down in the room, left/right across rooms),
|
|
28
|
+
* Enter opens one, and B bookmarks it.
|
|
29
|
+
*/
|
|
30
|
+
export declare function GridView({ day, sessions, rooms, lookup, tz, agenda, onToggle, onOpen, allSessions }: ViewProps & {
|
|
31
|
+
allSessions: ScheduleSession[];
|
|
32
|
+
}): import("react").JSX.Element;
|