@burdenoff/microfe-eventfullymanaged 2026.1110.9 → 2026.1110.10
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/eventfullymanaged/EventfullyManagedRoutes.js +6 -4
- package/dist/eventfullymanaged/EventfullyManagedRoutes.js.map +1 -1
- package/dist/eventfullymanaged/api/eventApi.d.ts +38 -0
- package/dist/eventfullymanaged/api/eventApi.js +382 -273
- package/dist/eventfullymanaged/api/eventApi.js.map +1 -1
- package/dist/eventfullymanaged/components/ActionMenu.d.ts +7 -1
- package/dist/eventfullymanaged/components/ActionMenu.js +25 -24
- package/dist/eventfullymanaged/components/ActionMenu.js.map +1 -1
- package/dist/eventfullymanaged/pages/modules/AnalyticsPage.js +117 -116
- package/dist/eventfullymanaged/pages/modules/AnalyticsPage.js.map +1 -1
- package/dist/eventfullymanaged/pages/modules/IntegrationsPage.js +4 -3
- package/dist/eventfullymanaged/pages/modules/IntegrationsPage.js.map +1 -1
- package/dist/eventfullymanaged/pages/modules/OperationsHubPage.d.ts +8 -1
- package/dist/eventfullymanaged/pages/modules/OperationsHubPage.js +198 -131
- package/dist/eventfullymanaged/pages/modules/OperationsHubPage.js.map +1 -1
- package/dist/generated/global-types.d.ts +8934 -480
- package/dist/generated/wspace-types.d.ts +62350 -9004
- package/package.json +1 -1
|
@@ -4,15 +4,15 @@ import { CHART_SERIES_COLORS as n, ChartLegend as r, EventAreaChart as ee, Event
|
|
|
4
4
|
import { Pagination as ne, usePagination as re } from "../../components/Pagination.js";
|
|
5
5
|
import { AttendanceForecast as ie } from "../../components/AttendanceForecast.js";
|
|
6
6
|
import { EventDraftAssistant as a } from "../../components/EventDraftAssistant.js";
|
|
7
|
-
import { useCheckInThroughputQuery as o, useDashboardSummaryQuery as s, useEventsQuery as c,
|
|
8
|
-
import { describeError as
|
|
7
|
+
import { useCheckInThroughputQuery as o, useDashboardSummaryQuery as s, useEventsQuery as c, useUpsertAnalyticsSnapshotMutation as l } from "../../api/eventApi.js";
|
|
8
|
+
import { describeError as u, mutationSucceeded as d } from "../../lib/mutationResult.js";
|
|
9
9
|
import { notify as f } from "../../lib/toast.js";
|
|
10
10
|
import { useMemo as p, useState as m } from "react";
|
|
11
11
|
import { jsx as h, jsxs as g } from "react/jsx-runtime";
|
|
12
|
-
import { BarChart3 as
|
|
13
|
-
import { Badge as
|
|
12
|
+
import { BarChart3 as ae, CalendarDays as oe, ClipboardList as se, MapPin as ce, QrCode as le, Sparkles as ue, Ticket as de, Trophy as fe, Users as _ } from "lucide-react";
|
|
13
|
+
import { Badge as v, Button as y, EmphasisPanel as b, GlassCard as x, GradientText as S, IllustratedEmptyState as C, Input as w, PagePurpose as T, Select as E, SelectContent as D, SelectItem as O, SelectTrigger as k, SelectValue as A, Skeleton as j } from "@burdenoff/fe-libs/ui";
|
|
14
14
|
// src/eventfullymanaged/pages/modules/AnalyticsPage.tsx
|
|
15
|
-
var
|
|
15
|
+
var M = e`
|
|
16
16
|
query EventfullymanagedAnalyticsSnapshotsWithMetrics($limit: Int, $offset: Int) {
|
|
17
17
|
analyticsSnapshots: eventfullyManagedAnalyticsSnapshots(limit: $limit, offset: $offset) {
|
|
18
18
|
total
|
|
@@ -26,7 +26,7 @@ var j = e`
|
|
|
26
26
|
}
|
|
27
27
|
}
|
|
28
28
|
}
|
|
29
|
-
`,
|
|
29
|
+
`, N = [
|
|
30
30
|
{
|
|
31
31
|
key: "totalEvents",
|
|
32
32
|
label: "Events"
|
|
@@ -56,7 +56,7 @@ var j = e`
|
|
|
56
56
|
label: "Upcoming Sessions"
|
|
57
57
|
}
|
|
58
58
|
];
|
|
59
|
-
function
|
|
59
|
+
function P(e) {
|
|
60
60
|
let t = e.toLowerCase();
|
|
61
61
|
return [
|
|
62
62
|
"active",
|
|
@@ -74,12 +74,12 @@ function N(e) {
|
|
|
74
74
|
"scheduled"
|
|
75
75
|
].includes(t) ? "info" : "secondary";
|
|
76
76
|
}
|
|
77
|
-
function
|
|
77
|
+
function F(e) {
|
|
78
78
|
if (!e) return null;
|
|
79
79
|
let t = new Date(e);
|
|
80
80
|
return Number.isNaN(t.getTime()) ? null : t.toLocaleString();
|
|
81
81
|
}
|
|
82
|
-
function
|
|
82
|
+
function I(e) {
|
|
83
83
|
if (!e) return "—";
|
|
84
84
|
let t = new Date(e);
|
|
85
85
|
return Number.isNaN(t.getTime()) ? "—" : t.toLocaleDateString(void 0, {
|
|
@@ -87,11 +87,11 @@ function F(e) {
|
|
|
87
87
|
day: "numeric"
|
|
88
88
|
});
|
|
89
89
|
}
|
|
90
|
-
function
|
|
90
|
+
function L(e) {
|
|
91
91
|
return e.replace(/[_-]+/g, " ").split(" ").filter(Boolean).map((e) => e.charAt(0).toUpperCase() + e.slice(1).toLowerCase()).join(" ");
|
|
92
92
|
}
|
|
93
|
-
function
|
|
94
|
-
return /* @__PURE__ */ g(
|
|
93
|
+
function R({ icon: e, label: t, value: n }) {
|
|
94
|
+
return /* @__PURE__ */ g(x, {
|
|
95
95
|
treatment: "metric",
|
|
96
96
|
className: "p-4",
|
|
97
97
|
children: [/* @__PURE__ */ g("div", {
|
|
@@ -106,52 +106,45 @@ function L({ icon: e, label: t, value: n }) {
|
|
|
106
106
|
})]
|
|
107
107
|
});
|
|
108
108
|
}
|
|
109
|
-
function
|
|
110
|
-
let e = re({ pageSize: 8 }), { data:
|
|
109
|
+
function z() {
|
|
110
|
+
let e = re({ pageSize: 8 }), { data: z, loading: B, refetch: pe } = t(M, { variables: {
|
|
111
111
|
limit: e.limit,
|
|
112
112
|
offset: e.offset
|
|
113
|
-
} }),
|
|
114
|
-
limit: 200,
|
|
115
|
-
offset: 0
|
|
116
|
-
}), [ge, { loading: H }] = u(), [U, _e] = m("overview"), W = c({
|
|
113
|
+
} }), V = s(), [me, { loading: H }] = l(), [U, he] = m("overview"), W = c({
|
|
117
114
|
limit: 50,
|
|
118
115
|
offset: 0
|
|
119
|
-
}), G = p(() => W.data?.events.items ?? [], [W.data]), [
|
|
120
|
-
name: new Date(e.hour).toLocaleTimeString(void 0, {
|
|
116
|
+
}), G = p(() => W.data?.events.items ?? [], [W.data]), [ge, _e] = m(""), K = ge || G[0]?.id || "", q = o({ eventId: K }), J = q.data?.checkInThroughput[0]?.timezone ?? null, ve = p(() => (q.data?.checkInThroughput ?? []).map((e) => ({
|
|
117
|
+
name: new Date(e.hour).toLocaleTimeString(void 0, {
|
|
118
|
+
hour: "numeric",
|
|
119
|
+
timeZone: e.timezone
|
|
120
|
+
}),
|
|
121
121
|
value: e.count
|
|
122
|
-
})), [q.data]),
|
|
122
|
+
})), [q.data]), Y = p(() => z?.analyticsSnapshots.items ?? [], [z]), X = z?.analyticsSnapshots.total ?? 0, Z = V.data?.dashboardSummary, Q = Z?.checkedInRegistrations ?? 0, ye = p(() => Y.map((e) => {
|
|
123
123
|
let t = e.metrics?.generatedAt ?? e.createdAt ?? null, n = t ? new Date(t) : null, r = typeof e.metrics?.totalRegistrations == "number" ? e.metrics.totalRegistrations : null;
|
|
124
124
|
return n && !Number.isNaN(n.getTime()) && r !== null ? {
|
|
125
125
|
time: n.getTime(),
|
|
126
|
-
label:
|
|
126
|
+
label: I(t),
|
|
127
127
|
value: r
|
|
128
128
|
} : null;
|
|
129
129
|
}).filter((e) => e !== null).sort((e, t) => e.time - t.time).map(({ label: e, value: t }) => ({
|
|
130
130
|
label: e,
|
|
131
131
|
value: t
|
|
132
|
-
})), [
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
}
|
|
138
|
-
return Array.from(e.entries()).sort((e, t) => t[1] - e[1]).map(([e, t], r) => ({
|
|
139
|
-
name: I(e),
|
|
140
|
-
value: t,
|
|
141
|
-
color: n[r % n.length]
|
|
142
|
-
}));
|
|
143
|
-
}, [Z]), Se = Z.length, Ce = p(() => X ? [
|
|
132
|
+
})), [Y]), $ = p(() => (Z?.registrationsByStatus ?? []).slice().sort((e, t) => t.count - e.count).map((e, t) => ({
|
|
133
|
+
name: L(e.status || "unknown"),
|
|
134
|
+
value: e.count,
|
|
135
|
+
color: n[t % n.length]
|
|
136
|
+
})), [Z]), be = Z?.totalRegistrations ?? 0, xe = p(() => Z ? [
|
|
144
137
|
{
|
|
145
138
|
name: "Events",
|
|
146
|
-
value:
|
|
139
|
+
value: Z.totalEvents
|
|
147
140
|
},
|
|
148
141
|
{
|
|
149
142
|
name: "Regs",
|
|
150
|
-
value:
|
|
143
|
+
value: Z.totalRegistrations
|
|
151
144
|
},
|
|
152
145
|
{
|
|
153
146
|
name: "Attendees",
|
|
154
|
-
value:
|
|
147
|
+
value: Z.totalAttendees
|
|
155
148
|
},
|
|
156
149
|
{
|
|
157
150
|
name: "Check-ins",
|
|
@@ -159,55 +152,59 @@ function R() {
|
|
|
159
152
|
},
|
|
160
153
|
{
|
|
161
154
|
name: "Venues",
|
|
162
|
-
value:
|
|
155
|
+
value: Z.totalVenues
|
|
163
156
|
},
|
|
164
157
|
{
|
|
165
158
|
name: "Sponsors",
|
|
166
|
-
value:
|
|
159
|
+
value: Z.totalSponsors
|
|
167
160
|
},
|
|
168
161
|
{
|
|
169
162
|
name: "Sessions",
|
|
170
|
-
value:
|
|
163
|
+
value: Z.upcomingSessions
|
|
171
164
|
}
|
|
172
|
-
] : [], [
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
165
|
+
] : [], [Z, Q]), Se = async () => {
|
|
166
|
+
let e = U.trim();
|
|
167
|
+
if (e) {
|
|
168
|
+
if (Y.some((t) => (t.name ?? "").toLowerCase() === e.toLowerCase())) f.error("Snapshot name already used", "Pick a different name, or delete the existing snapshot first.");
|
|
169
|
+
else try {
|
|
170
|
+
let t = await me({ variables: { input: {
|
|
171
|
+
name: e,
|
|
172
|
+
title: e,
|
|
173
|
+
status: "created",
|
|
174
|
+
metadata: {}
|
|
175
|
+
} } });
|
|
176
|
+
if (!d(t, t.data?.upsertAnalyticsSnapshot?.id, "Could not generate snapshot")) return;
|
|
177
|
+
f.success("Snapshot generated"), await pe();
|
|
178
|
+
} catch (e) {
|
|
179
|
+
f.error("Could not generate snapshot", u(e));
|
|
180
|
+
}
|
|
184
181
|
}
|
|
185
|
-
},
|
|
182
|
+
}, Ce = V.loading && !Z;
|
|
186
183
|
return /* @__PURE__ */ g("div", {
|
|
187
184
|
className: "space-y-6 p-6",
|
|
188
185
|
children: [
|
|
189
|
-
/* @__PURE__ */ h(
|
|
190
|
-
/* @__PURE__ */ h(
|
|
186
|
+
/* @__PURE__ */ h(T, { children: "Analytics shows current totals across every entity you manage, how registrations break down by status, and a trend line built from your saved snapshots. Generate a snapshot to record today's numbers for the workspace; each one is kept on its own and does not get replaced by later snapshots." }),
|
|
187
|
+
/* @__PURE__ */ h(b, { children: /* @__PURE__ */ g("div", {
|
|
191
188
|
className: "flex flex-col gap-4 sm:flex-row sm:items-end sm:justify-between",
|
|
192
189
|
children: [/* @__PURE__ */ g("div", { children: [/* @__PURE__ */ h("h1", {
|
|
193
190
|
className: "text-2xl font-bold text-text-primary",
|
|
194
|
-
children: /* @__PURE__ */ h(
|
|
191
|
+
children: /* @__PURE__ */ h(S, { children: "Analytics" })
|
|
195
192
|
}), /* @__PURE__ */ h("p", {
|
|
196
193
|
className: "mt-1 text-sm text-text-secondary",
|
|
197
|
-
children: "
|
|
194
|
+
children: "Current metrics from live event operations, loaded when the page opens, plus point-in-time snapshots you control."
|
|
198
195
|
})] }), /* @__PURE__ */ g("div", {
|
|
199
196
|
className: "flex w-full flex-col gap-2 sm:w-auto sm:flex-row",
|
|
200
|
-
children: [/* @__PURE__ */ h(
|
|
197
|
+
children: [/* @__PURE__ */ h(w, {
|
|
201
198
|
value: U,
|
|
202
|
-
onChange: (e) =>
|
|
199
|
+
onChange: (e) => he(e.target.value),
|
|
203
200
|
placeholder: "daily-summary",
|
|
204
201
|
"aria-label": "Snapshot name",
|
|
205
202
|
className: "sm:w-48"
|
|
206
|
-
}), /* @__PURE__ */ g(
|
|
203
|
+
}), /* @__PURE__ */ g(y, {
|
|
207
204
|
type: "button",
|
|
208
205
|
disabled: H,
|
|
209
|
-
onClick:
|
|
210
|
-
children: [/* @__PURE__ */ h(
|
|
206
|
+
onClick: Se,
|
|
207
|
+
children: [/* @__PURE__ */ h(ue, { className: "h-4 w-4" }), H ? "Generating..." : "Generate snapshot"]
|
|
211
208
|
})]
|
|
212
209
|
})]
|
|
213
210
|
}) }),
|
|
@@ -234,52 +231,52 @@ function R() {
|
|
|
234
231
|
children: [/* @__PURE__ */ g("div", {
|
|
235
232
|
className: "space-y-6",
|
|
236
233
|
children: [
|
|
237
|
-
|
|
234
|
+
Ce ? /* @__PURE__ */ h("div", {
|
|
238
235
|
className: "grid grid-cols-2 gap-4 sm:grid-cols-3 xl:grid-cols-4",
|
|
239
|
-
children: Array.from({ length: 7 }).map((e, t) => /* @__PURE__ */ h(
|
|
240
|
-
}) :
|
|
236
|
+
children: Array.from({ length: 7 }).map((e, t) => /* @__PURE__ */ h(j, { className: "h-[92px] rounded-card" }, t))
|
|
237
|
+
}) : Z ? /* @__PURE__ */ g("div", {
|
|
241
238
|
className: "grid grid-cols-2 gap-4 sm:grid-cols-3 xl:grid-cols-4",
|
|
242
239
|
children: [
|
|
243
|
-
/* @__PURE__ */ h(
|
|
244
|
-
icon:
|
|
240
|
+
/* @__PURE__ */ h(R, {
|
|
241
|
+
icon: oe,
|
|
245
242
|
label: "Events",
|
|
246
|
-
value:
|
|
243
|
+
value: Z.totalEvents
|
|
247
244
|
}),
|
|
248
|
-
/* @__PURE__ */ h(
|
|
249
|
-
icon:
|
|
245
|
+
/* @__PURE__ */ h(R, {
|
|
246
|
+
icon: se,
|
|
250
247
|
label: "Registrations",
|
|
251
|
-
value:
|
|
248
|
+
value: Z.totalRegistrations
|
|
252
249
|
}),
|
|
253
|
-
/* @__PURE__ */ h(
|
|
254
|
-
icon:
|
|
250
|
+
/* @__PURE__ */ h(R, {
|
|
251
|
+
icon: _,
|
|
255
252
|
label: "Attendees",
|
|
256
|
-
value:
|
|
253
|
+
value: Z.totalAttendees
|
|
257
254
|
}),
|
|
258
|
-
/* @__PURE__ */ h(
|
|
259
|
-
icon:
|
|
255
|
+
/* @__PURE__ */ h(R, {
|
|
256
|
+
icon: le,
|
|
260
257
|
label: "Check-ins",
|
|
261
258
|
value: Q
|
|
262
259
|
}),
|
|
263
|
-
/* @__PURE__ */ h(
|
|
264
|
-
icon:
|
|
260
|
+
/* @__PURE__ */ h(R, {
|
|
261
|
+
icon: ce,
|
|
265
262
|
label: "Venues",
|
|
266
|
-
value:
|
|
263
|
+
value: Z.totalVenues
|
|
267
264
|
}),
|
|
268
|
-
/* @__PURE__ */ h(
|
|
269
|
-
icon:
|
|
265
|
+
/* @__PURE__ */ h(R, {
|
|
266
|
+
icon: fe,
|
|
270
267
|
label: "Sponsors",
|
|
271
|
-
value:
|
|
268
|
+
value: Z.totalSponsors
|
|
272
269
|
}),
|
|
273
|
-
/* @__PURE__ */ h(
|
|
274
|
-
icon:
|
|
270
|
+
/* @__PURE__ */ h(R, {
|
|
271
|
+
icon: de,
|
|
275
272
|
label: "Upcoming Sessions",
|
|
276
|
-
value:
|
|
273
|
+
value: Z.upcomingSessions
|
|
277
274
|
})
|
|
278
275
|
]
|
|
279
276
|
}) : null,
|
|
280
277
|
/* @__PURE__ */ g("div", {
|
|
281
278
|
className: "grid grid-cols-1 gap-6 lg:grid-cols-2",
|
|
282
|
-
children: [/* @__PURE__ */ g(
|
|
279
|
+
children: [/* @__PURE__ */ g(x, {
|
|
283
280
|
treatment: "insight",
|
|
284
281
|
className: "p-5",
|
|
285
282
|
children: [/* @__PURE__ */ g("div", {
|
|
@@ -294,11 +291,11 @@ function R() {
|
|
|
294
291
|
}), /* @__PURE__ */ h("div", {
|
|
295
292
|
className: "mt-4",
|
|
296
293
|
children: /* @__PURE__ */ h(ee, {
|
|
297
|
-
data:
|
|
294
|
+
data: ye,
|
|
298
295
|
emptyLabel: "Generate a few snapshots to chart the trend"
|
|
299
296
|
})
|
|
300
297
|
})]
|
|
301
|
-
}), /* @__PURE__ */ g(
|
|
298
|
+
}), /* @__PURE__ */ g(x, {
|
|
302
299
|
treatment: "insight",
|
|
303
300
|
className: "p-5",
|
|
304
301
|
children: [/* @__PURE__ */ h("h2", {
|
|
@@ -310,7 +307,7 @@ function R() {
|
|
|
310
307
|
className: "w-full sm:w-1/2",
|
|
311
308
|
children: /* @__PURE__ */ h(te, {
|
|
312
309
|
data: $,
|
|
313
|
-
centerValue:
|
|
310
|
+
centerValue: be.toLocaleString(),
|
|
314
311
|
centerLabel: "Registrations",
|
|
315
312
|
emptyLabel: "No registrations yet"
|
|
316
313
|
})
|
|
@@ -325,7 +322,7 @@ function R() {
|
|
|
325
322
|
})]
|
|
326
323
|
})]
|
|
327
324
|
}),
|
|
328
|
-
/* @__PURE__ */ g(
|
|
325
|
+
/* @__PURE__ */ g(x, {
|
|
329
326
|
treatment: "insight",
|
|
330
327
|
className: "p-5",
|
|
331
328
|
children: [
|
|
@@ -340,13 +337,13 @@ function R() {
|
|
|
340
337
|
/* @__PURE__ */ h("div", {
|
|
341
338
|
className: "mt-4",
|
|
342
339
|
children: /* @__PURE__ */ h(i, {
|
|
343
|
-
data:
|
|
340
|
+
data: xe,
|
|
344
341
|
emptyLabel: "No operational data yet"
|
|
345
342
|
})
|
|
346
343
|
})
|
|
347
344
|
]
|
|
348
345
|
}),
|
|
349
|
-
/* @__PURE__ */ g(
|
|
346
|
+
/* @__PURE__ */ g(x, {
|
|
350
347
|
treatment: "insight",
|
|
351
348
|
className: "p-5",
|
|
352
349
|
children: [/* @__PURE__ */ g("div", {
|
|
@@ -354,17 +351,21 @@ function R() {
|
|
|
354
351
|
children: [/* @__PURE__ */ g("div", { children: [/* @__PURE__ */ h("h2", {
|
|
355
352
|
className: "text-base font-semibold text-text-primary",
|
|
356
353
|
children: "Check-in throughput"
|
|
357
|
-
}), /* @__PURE__ */
|
|
354
|
+
}), /* @__PURE__ */ g("p", {
|
|
358
355
|
className: "mt-0.5 text-xs text-text-muted",
|
|
359
|
-
children:
|
|
360
|
-
|
|
356
|
+
children: [
|
|
357
|
+
"Scans per hour at the door for the selected event",
|
|
358
|
+
J ? ` (${J})` : "",
|
|
359
|
+
"."
|
|
360
|
+
]
|
|
361
|
+
})] }), G.length > 0 ? /* @__PURE__ */ g(E, {
|
|
361
362
|
value: K,
|
|
362
|
-
onValueChange:
|
|
363
|
-
children: [/* @__PURE__ */ h(
|
|
363
|
+
onValueChange: _e,
|
|
364
|
+
children: [/* @__PURE__ */ h(k, {
|
|
364
365
|
className: "w-full sm:w-56",
|
|
365
366
|
"aria-label": "Select event for check-in throughput",
|
|
366
|
-
children: /* @__PURE__ */ h(
|
|
367
|
-
}), /* @__PURE__ */ h(
|
|
367
|
+
children: /* @__PURE__ */ h(A, { placeholder: "Select event" })
|
|
368
|
+
}), /* @__PURE__ */ h(D, { children: G.map((e) => /* @__PURE__ */ h(O, {
|
|
368
369
|
value: e.id,
|
|
369
370
|
children: e.name
|
|
370
371
|
}, e.id)) })]
|
|
@@ -372,7 +373,7 @@ function R() {
|
|
|
372
373
|
}), /* @__PURE__ */ h("div", {
|
|
373
374
|
className: "mt-4",
|
|
374
375
|
children: /* @__PURE__ */ h(i, {
|
|
375
|
-
data:
|
|
376
|
+
data: ve,
|
|
376
377
|
emptyLabel: K ? "No check-ins recorded yet for this event" : "Select an event to see throughput"
|
|
377
378
|
})
|
|
378
379
|
})]
|
|
@@ -384,22 +385,22 @@ function R() {
|
|
|
384
385
|
className: "flex items-center justify-between",
|
|
385
386
|
children: [/* @__PURE__ */ g("h2", {
|
|
386
387
|
className: "text-base font-semibold text-text-primary",
|
|
387
|
-
children: ["Saved snapshots ",
|
|
388
|
+
children: ["Saved snapshots ", X > 0 ? /* @__PURE__ */ g("span", {
|
|
388
389
|
className: "text-text-muted",
|
|
389
390
|
children: [
|
|
390
391
|
"(",
|
|
391
|
-
|
|
392
|
+
X,
|
|
392
393
|
")"
|
|
393
394
|
]
|
|
394
395
|
}) : null]
|
|
395
|
-
}), /* @__PURE__ */ h(
|
|
396
|
-
}),
|
|
396
|
+
}), /* @__PURE__ */ h(ae, { className: "h-4 w-4 text-text-muted" })]
|
|
397
|
+
}), B && Y.length === 0 ? /* @__PURE__ */ h("div", {
|
|
397
398
|
className: "space-y-3",
|
|
398
|
-
children: Array.from({ length: 3 }).map((e, t) => /* @__PURE__ */ h(
|
|
399
|
-
}) :
|
|
399
|
+
children: Array.from({ length: 3 }).map((e, t) => /* @__PURE__ */ h(j, { className: "h-24 rounded-card" }, t))
|
|
400
|
+
}) : Y.length === 0 ? /* @__PURE__ */ h(x, {
|
|
400
401
|
treatment: "plain",
|
|
401
402
|
className: "border-border-seam",
|
|
402
|
-
children: /* @__PURE__ */ h(
|
|
403
|
+
children: /* @__PURE__ */ h(C, {
|
|
403
404
|
illustration: "empty-data",
|
|
404
405
|
title: "No snapshots yet",
|
|
405
406
|
description: "Generate your first snapshot to freeze the current metrics.",
|
|
@@ -407,15 +408,15 @@ function R() {
|
|
|
407
408
|
})
|
|
408
409
|
}) : /* @__PURE__ */ g("div", {
|
|
409
410
|
className: "space-y-3",
|
|
410
|
-
children: [
|
|
411
|
-
let t =
|
|
411
|
+
children: [Y.map((e) => {
|
|
412
|
+
let t = F(e.metrics?.generatedAt) ?? F(e.createdAt), n = N.map((t) => {
|
|
412
413
|
let n = e.metrics?.[t.key];
|
|
413
414
|
return {
|
|
414
415
|
label: t.label,
|
|
415
416
|
value: typeof n == "number" ? n : null
|
|
416
417
|
};
|
|
417
418
|
}).filter((e) => e.value !== null);
|
|
418
|
-
return /* @__PURE__ */ g(
|
|
419
|
+
return /* @__PURE__ */ g(x, {
|
|
419
420
|
treatment: "plain",
|
|
420
421
|
className: "border-border-seam p-4",
|
|
421
422
|
children: [/* @__PURE__ */ g("div", {
|
|
@@ -429,8 +430,8 @@ function R() {
|
|
|
429
430
|
className: "mt-0.5 text-xs text-text-muted",
|
|
430
431
|
children: t
|
|
431
432
|
}) : null]
|
|
432
|
-
}), e.status ? /* @__PURE__ */ h(
|
|
433
|
-
variant:
|
|
433
|
+
}), e.status ? /* @__PURE__ */ h(v, {
|
|
434
|
+
variant: P(e.status),
|
|
434
435
|
className: "shrink-0 uppercase",
|
|
435
436
|
children: e.status
|
|
436
437
|
}) : null]
|
|
@@ -454,12 +455,12 @@ function R() {
|
|
|
454
455
|
}), /* @__PURE__ */ h(ne, {
|
|
455
456
|
offset: e.offset,
|
|
456
457
|
limit: e.limit,
|
|
457
|
-
loadedCount:
|
|
458
|
-
total:
|
|
458
|
+
loadedCount: Y.length,
|
|
459
|
+
total: X,
|
|
459
460
|
onPrev: e.prevPage,
|
|
460
461
|
onNext: e.nextPage,
|
|
461
462
|
itemLabel: "snapshots",
|
|
462
|
-
loading:
|
|
463
|
+
loading: B
|
|
463
464
|
})]
|
|
464
465
|
})]
|
|
465
466
|
})]
|
|
@@ -467,6 +468,6 @@ function R() {
|
|
|
467
468
|
]
|
|
468
469
|
});
|
|
469
470
|
}
|
|
470
|
-
export {
|
|
471
|
+
export { z as default };
|
|
471
472
|
|
|
472
473
|
//# sourceMappingURL=AnalyticsPage.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AnalyticsPage.js","names":["Badge","Badge$1","ANALYTICS_SNAPSHOTS_WITH_METRICS_QUERY","METRIC_FIELDS","statusVariant","value","status","formatGeneratedAt","parsed","shortDate","humanizeStatus","word","MetricTile","Icon","GlassCard","label","AnalyticsPage","pagination","usePagination","useQuery","summaryQuery","useDashboardSummaryQuery","registrationsQuery","useRegistrationsQuery","upsertSnapshot","creating","useUpsertAnalyticsSnapshotMutation","snapshotName","setSnapshotName","useState","eventsQuery","useEventsQuery","events","useMemo","throughputEventIdOverride","setThroughputEventIdOverride","throughputEventId","throughputQuery","useCheckInThroughputQuery","throughputSeries","point","snapshots","data","total","summary","registrations","checkInCount","row","registrationsSeries","at","snapshot","a","b","statusBreakdown","counts","key","count","CHART_SERIES_COLORS","index","registrationTotal","entityCounts","onCreate","response","mutationSucceeded","notify","refetch","error","describeError","summaryLoading","PagePurpose","EmphasisPanel","GradientText","Input","Button","Sparkles","AttendanceForecast","fetchMoreResult","previous","event","EventDraftAssistant","Skeleton","CalendarDays","ClipboardList","Users","QrCode","MapPin","Trophy","Ticket","EventAreaChart","EventDonutChart","ChartLegend","slice","EventBarChart","Select","SelectTrigger","SelectValue","SelectContent","SelectItem","BarChart3","loading","IllustratedEmptyState","generatedAt","captured","raw","field","entry","Pagination"],"sources":["../../../../src/eventfullymanaged/pages/modules/AnalyticsPage.tsx"],"sourcesContent":["import { BarChart3, CalendarDays, ClipboardList, MapPin, QrCode, Sparkles, Ticket, Trophy, Users } from 'lucide-react';\nimport type { LucideIcon } from 'lucide-react';\nimport { gql } from '@apollo/client';\nimport { useQuery } from '@apollo/client/react';\nimport {\n Badge,\n Button,\n EmphasisPanel,\n GlassCard,\n GradientText,\n IllustratedEmptyState,\n Input,\n PagePurpose,\n Select,\n SelectContent,\n SelectItem,\n SelectTrigger,\n SelectValue,\n Skeleton,\n} from '@burdenoff/fe-libs/ui';\nimport { useMemo, useState } from 'react';\n\nimport {\n CHART_SERIES_COLORS,\n ChartLegend,\n EventAreaChart,\n EventBarChart,\n EventDonutChart,\n type AreaPoint,\n type BarDatum,\n type DonutSlice,\n} from '../../components/EventCharts';\nimport { Pagination, usePagination } from '../../components/Pagination';\nimport { AttendanceForecast } from '../../components/AttendanceForecast';\nimport { EventDraftAssistant } from '../../components/EventDraftAssistant';\nimport {\n useCheckInThroughputQuery,\n useDashboardSummaryQuery,\n useEventsQuery,\n useRegistrationsQuery,\n useUpsertAnalyticsSnapshotMutation,\n} from '../../api/eventApi';\nimport { describeError, mutationSucceeded } from '../../lib/mutationResult';\nimport { notify } from '../../lib/toast';\n\n/**\n * Snapshot metrics are computed server-side at generation time and returned on\n * the `metrics` JSON field of an analytics snapshot. The shared\n * `useAnalyticsSnapshotsQuery` hook does not select `metrics`, so this page owns\n * a dedicated query (distinct operation name) that pulls the metric payload in\n * addition to the identity fields.\n */\nconst ANALYTICS_SNAPSHOTS_WITH_METRICS_QUERY = gql`\n query EventfullymanagedAnalyticsSnapshotsWithMetrics($limit: Int, $offset: Int) {\n analyticsSnapshots: eventfullyManagedAnalyticsSnapshots(limit: $limit, offset: $offset) {\n total\n items {\n id\n name\n title\n status\n metrics\n createdAt\n }\n }\n }\n`;\n\ntype SnapshotMetrics = {\n totalEvents?: number | null;\n activeEvents?: number | null;\n totalRegistrations?: number | null;\n totalAttendees?: number | null;\n totalVenues?: number | null;\n totalSponsors?: number | null;\n upcomingSessions?: number | null;\n generatedAt?: string | null;\n};\n\ntype SnapshotRow = {\n id: string;\n name?: string | null;\n title?: string | null;\n status?: string | null;\n createdAt?: string | null;\n metrics?: SnapshotMetrics | null;\n};\n\ntype SnapshotsResponse = {\n analyticsSnapshots: { total: number; items: SnapshotRow[] };\n};\n\nconst METRIC_FIELDS: { key: keyof SnapshotMetrics; label: string }[] = [\n { key: 'totalEvents', label: 'Events' },\n { key: 'activeEvents', label: 'Active' },\n { key: 'totalRegistrations', label: 'Registrations' },\n { key: 'totalAttendees', label: 'Attendees' },\n { key: 'totalVenues', label: 'Venues' },\n { key: 'totalSponsors', label: 'Sponsors' },\n { key: 'upcomingSessions', label: 'Upcoming Sessions' },\n];\n\nfunction statusVariant(status: string): 'success' | 'warning' | 'secondary' | 'info' {\n const value = status.toLowerCase();\n if (['active', 'published', 'completed'].includes(value)) return 'success';\n if (['inactive', 'cancelled', 'archived', 'expired'].includes(value)) return 'warning';\n if (['draft', 'created', 'pending', 'scheduled'].includes(value)) return 'info';\n return 'secondary';\n}\n\nfunction formatGeneratedAt(value?: string | null): string | null {\n if (!value) return null;\n const parsed = new Date(value);\n return Number.isNaN(parsed.getTime()) ? null : parsed.toLocaleString();\n}\n\nfunction shortDate(value?: string | null): string {\n if (!value) return '—';\n const parsed = new Date(value);\n if (Number.isNaN(parsed.getTime())) return '—';\n return parsed.toLocaleDateString(undefined, { month: 'short', day: 'numeric' });\n}\n\n/** Humanise a registration status token (e.g. `checked_in` → `Checked In`). */\nfunction humanizeStatus(status: string): string {\n return status\n .replace(/[_-]+/g, ' ')\n .split(' ')\n .filter(Boolean)\n .map((word) => word.charAt(0).toUpperCase() + word.slice(1).toLowerCase())\n .join(' ');\n}\n\nfunction MetricTile({ icon: Icon, label, value }: { icon: LucideIcon; label: string; value: number }) {\n return (\n <GlassCard treatment=\"metric\" className=\"p-4\">\n <div className=\"flex items-center gap-2 text-text-secondary\">\n <Icon className=\"h-4 w-4 text-accent-primary\" />\n <p className=\"text-xs font-medium uppercase tracking-wide\">{label}</p>\n </div>\n <p className=\"mt-2 text-2xl font-bold tabular-nums text-text-primary\">{value.toLocaleString()}</p>\n </GlassCard>\n );\n}\n\nexport default function AnalyticsPage() {\n const pagination = usePagination({ pageSize: 8 });\n const { data, loading, refetch } = useQuery<SnapshotsResponse, { limit: number; offset: number }>(\n ANALYTICS_SNAPSHOTS_WITH_METRICS_QUERY,\n { variables: { limit: pagination.limit, offset: pagination.offset } }\n );\n const summaryQuery = useDashboardSummaryQuery();\n const registrationsQuery = useRegistrationsQuery({ limit: 200, offset: 0 });\n const [upsertSnapshot, { loading: creating }] = useUpsertAnalyticsSnapshotMutation();\n const [snapshotName, setSnapshotName] = useState('overview');\n\n // BOFF-3999 — check-in throughput is scoped to one event; default to the\n // first event once the list loads.\n const eventsQuery = useEventsQuery({ limit: 50, offset: 0 });\n const events = useMemo(() => eventsQuery.data?.events.items ?? [], [eventsQuery.data]);\n // Derived (not effect-synced): an explicit user pick wins, otherwise fall\n // back to the first loaded event — avoids a setState-in-effect render.\n const [throughputEventIdOverride, setThroughputEventIdOverride] = useState('');\n const throughputEventId = throughputEventIdOverride || events[0]?.id || '';\n const throughputQuery = useCheckInThroughputQuery({ eventId: throughputEventId });\n const throughputSeries = useMemo<BarDatum[]>(() => {\n return (throughputQuery.data?.checkInThroughput ?? []).map((point) => ({\n name: new Date(point.hour).toLocaleTimeString(undefined, { hour: 'numeric' }),\n value: point.count,\n }));\n }, [throughputQuery.data]);\n\n const snapshots = useMemo(() => data?.analyticsSnapshots.items ?? [], [data]);\n const total = data?.analyticsSnapshots.total ?? 0;\n\n const summary = summaryQuery.data?.dashboardSummary;\n const registrations = useMemo(() => registrationsQuery.data?.registrations.items ?? [], [registrationsQuery.data]);\n\n // Check-ins are derived from the loaded registration sample (registrations\n // carrying a `checkedInAt`) — the dashboard summary does not expose them.\n const checkInCount = useMemo(() => registrations.filter((row) => Boolean(row.checkedInAt)).length, [registrations]);\n\n // Registrations over time: the totalRegistrations captured on each snapshot,\n // ordered oldest → newest. Purely real, snapshot-derived — never synthesised.\n const registrationsSeries = useMemo<AreaPoint[]>(() => {\n return snapshots\n .map((snapshot) => {\n const at = snapshot.metrics?.generatedAt ?? snapshot.createdAt ?? null;\n const parsed = at ? new Date(at) : null;\n const value =\n typeof snapshot.metrics?.totalRegistrations === 'number' ? snapshot.metrics.totalRegistrations : null;\n return parsed && !Number.isNaN(parsed.getTime()) && value !== null\n ? { time: parsed.getTime(), label: shortDate(at), value }\n : null;\n })\n .filter((point): point is { time: number; label: string; value: number } => point !== null)\n .sort((a, b) => a.time - b.time)\n .map(({ label, value }) => ({ label, value }));\n }, [snapshots]);\n\n // Registrations by status donut, computed from the real registration list.\n const statusBreakdown = useMemo<DonutSlice[]>(() => {\n const counts = new Map<string, number>();\n for (const row of registrations) {\n const key = (row.status || 'unknown').toLowerCase();\n counts.set(key, (counts.get(key) ?? 0) + 1);\n }\n return Array.from(counts.entries())\n .sort((a, b) => b[1] - a[1])\n .map(([key, count], index) => ({\n name: humanizeStatus(key),\n value: count,\n color: CHART_SERIES_COLORS[index % CHART_SERIES_COLORS.length],\n }));\n }, [registrations]);\n\n const registrationTotal = registrations.length;\n\n // Entity-count bar chart from the real dashboard summary + derived check-ins.\n const entityCounts = useMemo<BarDatum[]>(() => {\n if (!summary) return [];\n return [\n { name: 'Events', value: summary.totalEvents },\n { name: 'Regs', value: summary.totalRegistrations },\n { name: 'Attendees', value: summary.totalAttendees },\n { name: 'Check-ins', value: checkInCount },\n { name: 'Venues', value: summary.totalVenues },\n { name: 'Sponsors', value: summary.totalSponsors },\n { name: 'Sessions', value: summary.upcomingSessions },\n ];\n }, [summary, checkInCount]);\n\n const onCreate = async () => {\n if (!snapshotName.trim()) return;\n try {\n const response = await upsertSnapshot({\n variables: {\n input: {\n name: snapshotName,\n title: snapshotName,\n status: 'created',\n metadata: {},\n },\n },\n });\n if (!mutationSucceeded(response, response.data?.upsertAnalyticsSnapshot?.id, 'Could not generate snapshot')) {\n return;\n }\n notify.success('Snapshot generated');\n await refetch();\n } catch (error) {\n notify.error('Could not generate snapshot', describeError(error));\n }\n };\n\n const summaryLoading = summaryQuery.loading && !summary;\n\n return (\n <div className=\"space-y-6 p-6\">\n <PagePurpose>\n Analytics gives you the live pulse of your event operations — registrations over time, how those registrations\n break down by status, and totals across every entity you manage. Generate a snapshot to freeze today's\n numbers so you can compare trends over time and report on outcomes.\n </PagePurpose>\n\n <EmphasisPanel>\n <div className=\"flex flex-col gap-4 sm:flex-row sm:items-end sm:justify-between\">\n <div>\n <h1 className=\"text-2xl font-bold text-text-primary\">\n <GradientText>Analytics</GradientText>\n </h1>\n <p className=\"mt-1 text-sm text-text-secondary\">\n Real-time metrics from live event operations, plus point-in-time snapshots you control.\n </p>\n </div>\n <div className=\"flex w-full flex-col gap-2 sm:w-auto sm:flex-row\">\n <Input\n value={snapshotName}\n onChange={(e) => setSnapshotName(e.target.value)}\n placeholder=\"daily-summary\"\n aria-label=\"Snapshot name\"\n className=\"sm:w-48\"\n />\n <Button type=\"button\" disabled={creating} onClick={onCreate}>\n <Sparkles className=\"h-4 w-4\" />\n {creating ? 'Generating...' : 'Generate snapshot'}\n </Button>\n </div>\n </div>\n </EmphasisPanel>\n\n <AttendanceForecast\n events={events}\n total={eventsQuery.data?.events.total ?? 0}\n loading={eventsQuery.loading}\n failed={Boolean(eventsQuery.error)}\n reload={() => eventsQuery.refetch()}\n loadMore={() =>\n eventsQuery.fetchMore({\n variables: { limit: 50, offset: events.length },\n updateQuery: (previous, { fetchMoreResult }) => ({\n events: {\n total: fetchMoreResult.events.total,\n items: Array.from(\n new Map(\n [...previous.events.items, ...fetchMoreResult.events.items].map((event) => [event.id, event])\n ).values()\n ),\n },\n }),\n })\n }\n />\n\n <EventDraftAssistant events={events} />\n\n <div className=\"grid grid-cols-1 gap-6 xl:grid-cols-[minmax(0,1fr)_320px]\">\n <div className=\"space-y-6\">\n {/* Live metric tiles */}\n {summaryLoading ? (\n <div className=\"grid grid-cols-2 gap-4 sm:grid-cols-3 xl:grid-cols-4\">\n {Array.from({ length: 7 }).map((_, index) => (\n <Skeleton key={index} className=\"h-[92px] rounded-card\" />\n ))}\n </div>\n ) : summary ? (\n <div className=\"grid grid-cols-2 gap-4 sm:grid-cols-3 xl:grid-cols-4\">\n <MetricTile icon={CalendarDays} label=\"Events\" value={summary.totalEvents} />\n <MetricTile icon={ClipboardList} label=\"Registrations\" value={summary.totalRegistrations} />\n <MetricTile icon={Users} label=\"Attendees\" value={summary.totalAttendees} />\n <MetricTile icon={QrCode} label=\"Check-ins\" value={checkInCount} />\n <MetricTile icon={MapPin} label=\"Venues\" value={summary.totalVenues} />\n <MetricTile icon={Trophy} label=\"Sponsors\" value={summary.totalSponsors} />\n <MetricTile icon={Ticket} label=\"Upcoming Sessions\" value={summary.upcomingSessions} />\n </div>\n ) : null}\n\n {/* Registrations over time + by status */}\n <div className=\"grid grid-cols-1 gap-6 lg:grid-cols-2\">\n <GlassCard treatment=\"insight\" className=\"p-5\">\n <div className=\"flex items-center justify-between\">\n <h2 className=\"text-base font-semibold text-text-primary\">Registrations over time</h2>\n <span className=\"text-xs text-text-muted\">By snapshot</span>\n </div>\n <div className=\"mt-4\">\n <EventAreaChart data={registrationsSeries} emptyLabel=\"Generate a few snapshots to chart the trend\" />\n </div>\n </GlassCard>\n\n <GlassCard treatment=\"insight\" className=\"p-5\">\n <h2 className=\"text-base font-semibold text-text-primary\">Registrations by status</h2>\n <div className=\"mt-4 flex flex-col items-center gap-4 sm:flex-row\">\n <div className=\"w-full sm:w-1/2\">\n <EventDonutChart\n data={statusBreakdown}\n centerValue={registrationTotal.toLocaleString()}\n centerLabel=\"Registrations\"\n emptyLabel=\"No registrations yet\"\n />\n </div>\n <div className=\"w-full sm:w-1/2\">\n <ChartLegend\n items={statusBreakdown.map((slice) => ({\n label: slice.name,\n color: slice.color ?? 'var(--color-chart-1)',\n value: slice.value.toLocaleString(),\n }))}\n />\n </div>\n </div>\n </GlassCard>\n </div>\n\n {/* Entity totals */}\n <GlassCard treatment=\"insight\" className=\"p-5\">\n <h2 className=\"text-base font-semibold text-text-primary\">Portfolio totals</h2>\n <p className=\"mt-0.5 text-xs text-text-muted\">Live counts across every entity you manage.</p>\n <div className=\"mt-4\">\n <EventBarChart data={entityCounts} emptyLabel=\"No operational data yet\" />\n </div>\n </GlassCard>\n\n {/* BOFF-3999 — check-in throughput by hour, scoped to one event. */}\n <GlassCard treatment=\"insight\" className=\"p-5\">\n <div className=\"flex flex-wrap items-center justify-between gap-3\">\n <div>\n <h2 className=\"text-base font-semibold text-text-primary\">Check-in throughput</h2>\n <p className=\"mt-0.5 text-xs text-text-muted\">Scans per hour at the door for the selected event.</p>\n </div>\n {events.length > 0 ? (\n <Select value={throughputEventId} onValueChange={setThroughputEventIdOverride}>\n <SelectTrigger className=\"w-full sm:w-56\" aria-label=\"Select event for check-in throughput\">\n <SelectValue placeholder=\"Select event\" />\n </SelectTrigger>\n <SelectContent>\n {events.map((event) => (\n <SelectItem key={event.id} value={event.id}>\n {event.name}\n </SelectItem>\n ))}\n </SelectContent>\n </Select>\n ) : null}\n </div>\n <div className=\"mt-4\">\n <EventBarChart\n data={throughputSeries}\n emptyLabel={\n throughputEventId ? 'No check-ins recorded yet for this event' : 'Select an event to see throughput'\n }\n />\n </div>\n </GlassCard>\n </div>\n\n {/* Saved snapshots rail */}\n <aside className=\"space-y-4\">\n <div className=\"flex items-center justify-between\">\n <h2 className=\"text-base font-semibold text-text-primary\">\n Saved snapshots {total > 0 ? <span className=\"text-text-muted\">({total})</span> : null}\n </h2>\n <BarChart3 className=\"h-4 w-4 text-text-muted\" />\n </div>\n\n {loading && snapshots.length === 0 ? (\n <div className=\"space-y-3\">\n {Array.from({ length: 3 }).map((_, index) => (\n <Skeleton key={index} className=\"h-24 rounded-card\" />\n ))}\n </div>\n ) : snapshots.length === 0 ? (\n <GlassCard treatment=\"plain\" className=\"border-border-seam\">\n <IllustratedEmptyState\n illustration=\"empty-data\"\n title=\"No snapshots yet\"\n description=\"Generate your first snapshot to freeze the current metrics.\"\n className=\"py-8\"\n />\n </GlassCard>\n ) : (\n <div className=\"space-y-3\">\n {snapshots.map((snapshot) => {\n const generatedAt =\n formatGeneratedAt(snapshot.metrics?.generatedAt) ?? formatGeneratedAt(snapshot.createdAt);\n const captured = METRIC_FIELDS.map((field) => {\n const raw = snapshot.metrics?.[field.key];\n return { label: field.label, value: typeof raw === 'number' ? raw : null };\n }).filter((entry) => entry.value !== null);\n return (\n <GlassCard key={snapshot.id} treatment=\"plain\" className=\"border-border-seam p-4\">\n <div className=\"flex items-start justify-between gap-2\">\n <div className=\"min-w-0\">\n <h3 className=\"truncate text-sm font-semibold text-text-primary\">\n {snapshot.title ?? snapshot.name ?? `Snapshot ${snapshot.id}`}\n </h3>\n {generatedAt ? <p className=\"mt-0.5 text-xs text-text-muted\">{generatedAt}</p> : null}\n </div>\n {snapshot.status ? (\n <Badge variant={statusVariant(snapshot.status)} className=\"shrink-0 uppercase\">\n {snapshot.status}\n </Badge>\n ) : null}\n </div>\n {captured.length > 0 ? (\n <dl className=\"mt-3 space-y-1.5\">\n {captured.map((entry) => (\n <div key={entry.label} className=\"flex items-center justify-between text-xs\">\n <dt className=\"text-text-secondary\">{entry.label}</dt>\n <dd className=\"font-semibold tabular-nums text-text-primary\">\n {(entry.value ?? 0).toLocaleString()}\n </dd>\n </div>\n ))}\n </dl>\n ) : (\n <p className=\"mt-3 text-xs text-text-muted\">No metrics captured.</p>\n )}\n </GlassCard>\n );\n })}\n\n <Pagination\n offset={pagination.offset}\n limit={pagination.limit}\n loadedCount={snapshots.length}\n total={total}\n onPrev={pagination.prevPage}\n onNext={pagination.nextPage}\n itemLabel=\"snapshots\"\n loading={loading}\n />\n </div>\n )}\n </aside>\n </div>\n </div>\n );\n}\n"],"mappings":";;;;;;;;;;;;;;AAoDA,IAAME,IAAyC,CAAG;;;;;;;;;;;;;;GAwC5CC,IAAiE;CACrE;EAAE,KAAK;EAAe,OAAO;CAAS;CACtC;EAAE,KAAK;EAAgB,OAAO;CAAS;CACvC;EAAE,KAAK;EAAsB,OAAO;CAAgB;CACpD;EAAE,KAAK;EAAkB,OAAO;CAAY;CAC5C;EAAE,KAAK;EAAe,OAAO;CAAS;CACtC;EAAE,KAAK;EAAiB,OAAO;CAAW;CAC1C;EAAE,KAAK;EAAoB,OAAO;CAAoB;AACxD;AAEA,SAASC,EAAc,GAA8D;CACnF,IAAMC,IAAQC,EAAO,YAAY;CAIjC,OAHI;EAAC;EAAU;EAAa;CAAW,CAAC,CAAC,SAASD,CAAK,IAAU,YAC7D;EAAC;EAAY;EAAa;EAAY;CAAS,CAAC,CAAC,SAASA,CAAK,IAAU,YACzE;EAAC;EAAS;EAAW;EAAW;CAAW,CAAC,CAAC,SAASA,CAAK,IAAU,SAClE;AACT;AAEA,SAASE,EAAkB,GAAsC;CAC/D,IAAI,CAACF,GAAO,OAAO;CACnB,IAAMG,IAAS,IAAI,KAAKH,CAAK;CAC7B,OAAO,OAAO,MAAMG,EAAO,QAAQ,CAAC,IAAI,OAAOA,EAAO,eAAe;AACvE;AAEA,SAASC,EAAU,GAA+B;CAChD,IAAI,CAACJ,GAAO,OAAO;CACnB,IAAMG,IAAS,IAAI,KAAKH,CAAK;CAE7B,OADI,OAAO,MAAMG,EA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B,CAAA,CAE5D;OA5BK,GAAAvD,EAAS,EA4Bd;MAEf,CAAC,GAED,kBAACwD,IAAD;OACE,QAAQzF,EAAW;OACnB,OAAOA,EAAW;OAClB,aAAawB,EAAU;OAChB;OACP,QAAQxB,EAAW;OACnB,QAAQA,EAAW;OACnB,WAAU;OACD;MACV,CAAA,CACE;KAEF,CAAA,CAAA;IACJ,CAAA,CAAA;;EACF;;AAET"}
|
|
1
|
+
{"version":3,"file":"AnalyticsPage.js","names":["Badge","Badge$1","ANALYTICS_SNAPSHOTS_WITH_METRICS_QUERY","METRIC_FIELDS","statusVariant","value","status","formatGeneratedAt","parsed","shortDate","humanizeStatus","word","MetricTile","Icon","GlassCard","label","AnalyticsPage","pagination","usePagination","useQuery","summaryQuery","useDashboardSummaryQuery","upsertSnapshot","creating","useUpsertAnalyticsSnapshotMutation","snapshotName","setSnapshotName","useState","eventsQuery","useEventsQuery","events","useMemo","throughputEventIdOverride","setThroughputEventIdOverride","throughputEventId","throughputQuery","useCheckInThroughputQuery","throughputTimezone","throughputSeries","point","snapshots","data","total","summary","checkInCount","registrationsSeries","at","snapshot","a","b","statusBreakdown","entry","CHART_SERIES_COLORS","index","registrationTotal","entityCounts","onCreate","trimmed","response","mutationSucceeded","notify","refetch","error","describeError","summaryLoading","PagePurpose","EmphasisPanel","GradientText","Input","Button","Sparkles","AttendanceForecast","fetchMoreResult","previous","event","EventDraftAssistant","Skeleton","CalendarDays","ClipboardList","Users","QrCode","MapPin","Trophy","Ticket","EventAreaChart","EventDonutChart","ChartLegend","slice","EventBarChart","Select","SelectTrigger","SelectValue","SelectContent","SelectItem","BarChart3","loading","IllustratedEmptyState","generatedAt","captured","raw","field","Pagination"],"sources":["../../../../src/eventfullymanaged/pages/modules/AnalyticsPage.tsx"],"sourcesContent":["import { BarChart3, CalendarDays, ClipboardList, MapPin, QrCode, Sparkles, Ticket, Trophy, Users } from 'lucide-react';\nimport type { LucideIcon } from 'lucide-react';\nimport { gql } from '@apollo/client';\nimport { useQuery } from '@apollo/client/react';\nimport {\n Badge,\n Button,\n EmphasisPanel,\n GlassCard,\n GradientText,\n IllustratedEmptyState,\n Input,\n PagePurpose,\n Select,\n SelectContent,\n SelectItem,\n SelectTrigger,\n SelectValue,\n Skeleton,\n} from '@burdenoff/fe-libs/ui';\nimport { useMemo, useState } from 'react';\n\nimport {\n CHART_SERIES_COLORS,\n ChartLegend,\n EventAreaChart,\n EventBarChart,\n EventDonutChart,\n type AreaPoint,\n type BarDatum,\n type DonutSlice,\n} from '../../components/EventCharts';\nimport { Pagination, usePagination } from '../../components/Pagination';\nimport { AttendanceForecast } from '../../components/AttendanceForecast';\nimport { EventDraftAssistant } from '../../components/EventDraftAssistant';\nimport {\n useCheckInThroughputQuery,\n useDashboardSummaryQuery,\n useEventsQuery,\n useUpsertAnalyticsSnapshotMutation,\n} from '../../api/eventApi';\nimport { describeError, mutationSucceeded } from '../../lib/mutationResult';\nimport { notify } from '../../lib/toast';\n\n/**\n * Snapshot metrics are computed server-side at generation time and returned on\n * the `metrics` JSON field of an analytics snapshot. The shared\n * `useAnalyticsSnapshotsQuery` hook does not select `metrics`, so this page owns\n * a dedicated query (distinct operation name) that pulls the metric payload in\n * addition to the identity fields.\n */\nconst ANALYTICS_SNAPSHOTS_WITH_METRICS_QUERY = gql`\n query EventfullymanagedAnalyticsSnapshotsWithMetrics($limit: Int, $offset: Int) {\n analyticsSnapshots: eventfullyManagedAnalyticsSnapshots(limit: $limit, offset: $offset) {\n total\n items {\n id\n name\n title\n status\n metrics\n createdAt\n }\n }\n }\n`;\n\ntype SnapshotMetrics = {\n totalEvents?: number | null;\n activeEvents?: number | null;\n totalRegistrations?: number | null;\n totalAttendees?: number | null;\n totalVenues?: number | null;\n totalSponsors?: number | null;\n upcomingSessions?: number | null;\n generatedAt?: string | null;\n};\n\ntype SnapshotRow = {\n id: string;\n name?: string | null;\n title?: string | null;\n status?: string | null;\n createdAt?: string | null;\n metrics?: SnapshotMetrics | null;\n};\n\ntype SnapshotsResponse = {\n analyticsSnapshots: { total: number; items: SnapshotRow[] };\n};\n\nconst METRIC_FIELDS: { key: keyof SnapshotMetrics; label: string }[] = [\n { key: 'totalEvents', label: 'Events' },\n { key: 'activeEvents', label: 'Active' },\n { key: 'totalRegistrations', label: 'Registrations' },\n { key: 'totalAttendees', label: 'Attendees' },\n { key: 'totalVenues', label: 'Venues' },\n { key: 'totalSponsors', label: 'Sponsors' },\n { key: 'upcomingSessions', label: 'Upcoming Sessions' },\n];\n\nfunction statusVariant(status: string): 'success' | 'warning' | 'secondary' | 'info' {\n const value = status.toLowerCase();\n if (['active', 'published', 'completed'].includes(value)) return 'success';\n if (['inactive', 'cancelled', 'archived', 'expired'].includes(value)) return 'warning';\n if (['draft', 'created', 'pending', 'scheduled'].includes(value)) return 'info';\n return 'secondary';\n}\n\nfunction formatGeneratedAt(value?: string | null): string | null {\n if (!value) return null;\n const parsed = new Date(value);\n return Number.isNaN(parsed.getTime()) ? null : parsed.toLocaleString();\n}\n\nfunction shortDate(value?: string | null): string {\n if (!value) return '—';\n const parsed = new Date(value);\n if (Number.isNaN(parsed.getTime())) return '—';\n return parsed.toLocaleDateString(undefined, { month: 'short', day: 'numeric' });\n}\n\n/** Humanise a registration status token (e.g. `checked_in` → `Checked In`). */\nfunction humanizeStatus(status: string): string {\n return status\n .replace(/[_-]+/g, ' ')\n .split(' ')\n .filter(Boolean)\n .map((word) => word.charAt(0).toUpperCase() + word.slice(1).toLowerCase())\n .join(' ');\n}\n\nfunction MetricTile({ icon: Icon, label, value }: { icon: LucideIcon; label: string; value: number }) {\n return (\n <GlassCard treatment=\"metric\" className=\"p-4\">\n <div className=\"flex items-center gap-2 text-text-secondary\">\n <Icon className=\"h-4 w-4 text-accent-primary\" />\n <p className=\"text-xs font-medium uppercase tracking-wide\">{label}</p>\n </div>\n <p className=\"mt-2 text-2xl font-bold tabular-nums text-text-primary\">{value.toLocaleString()}</p>\n </GlassCard>\n );\n}\n\nexport default function AnalyticsPage() {\n const pagination = usePagination({ pageSize: 8 });\n const { data, loading, refetch } = useQuery<SnapshotsResponse, { limit: number; offset: number }>(\n ANALYTICS_SNAPSHOTS_WITH_METRICS_QUERY,\n { variables: { limit: pagination.limit, offset: pagination.offset } }\n );\n const summaryQuery = useDashboardSummaryQuery();\n const [upsertSnapshot, { loading: creating }] = useUpsertAnalyticsSnapshotMutation();\n const [snapshotName, setSnapshotName] = useState('overview');\n\n // BOFF-3999 — check-in throughput is scoped to one event; default to the\n // first event once the list loads.\n const eventsQuery = useEventsQuery({ limit: 50, offset: 0 });\n const events = useMemo(() => eventsQuery.data?.events.items ?? [], [eventsQuery.data]);\n // Derived (not effect-synced): an explicit user pick wins, otherwise fall\n // back to the first loaded event — avoids a setState-in-effect render.\n const [throughputEventIdOverride, setThroughputEventIdOverride] = useState('');\n const throughputEventId = throughputEventIdOverride || events[0]?.id || '';\n const throughputQuery = useCheckInThroughputQuery({ eventId: throughputEventId });\n // BOFF-11389 — the server buckets `hour` in the event's own IANA timezone\n // (returned per-point as `timezone`); label each bar in that same zone\n // instead of the viewer's browser zone, or bucket and label disagree.\n const throughputTimezone = throughputQuery.data?.checkInThroughput[0]?.timezone ?? null;\n const throughputSeries = useMemo<BarDatum[]>(() => {\n return (throughputQuery.data?.checkInThroughput ?? []).map((point) => ({\n name: new Date(point.hour).toLocaleTimeString(undefined, { hour: 'numeric', timeZone: point.timezone }),\n value: point.count,\n }));\n }, [throughputQuery.data]);\n\n const snapshots = useMemo(() => data?.analyticsSnapshots.items ?? [], [data]);\n const total = data?.analyticsSnapshots.total ?? 0;\n\n const summary = summaryQuery.data?.dashboardSummary;\n\n // BOFF-11386 — checked-in count comes from the server aggregate (same live-\n // registration population as totalRegistrations), not a 200-row sample.\n const checkInCount = summary?.checkedInRegistrations ?? 0;\n\n // Registrations over time: the totalRegistrations captured on each snapshot,\n // ordered oldest → newest. Purely real, snapshot-derived — never synthesised.\n const registrationsSeries = useMemo<AreaPoint[]>(() => {\n return snapshots\n .map((snapshot) => {\n const at = snapshot.metrics?.generatedAt ?? snapshot.createdAt ?? null;\n const parsed = at ? new Date(at) : null;\n const value =\n typeof snapshot.metrics?.totalRegistrations === 'number' ? snapshot.metrics.totalRegistrations : null;\n return parsed && !Number.isNaN(parsed.getTime()) && value !== null\n ? { time: parsed.getTime(), label: shortDate(at), value }\n : null;\n })\n .filter((point): point is { time: number; label: string; value: number } => point !== null)\n .sort((a, b) => a.time - b.time)\n .map(({ label, value }) => ({ label, value }));\n }, [snapshots]);\n\n // BOFF-11386 — registrations-by-status donut, from the server aggregate\n // (same live-registration population as totalRegistrations), not a\n // 200-row client-side sample.\n const statusBreakdown = useMemo<DonutSlice[]>(() => {\n return (summary?.registrationsByStatus ?? [])\n .slice()\n .sort((a, b) => b.count - a.count)\n .map((entry, index) => ({\n name: humanizeStatus(entry.status || 'unknown'),\n value: entry.count,\n color: CHART_SERIES_COLORS[index % CHART_SERIES_COLORS.length],\n }));\n }, [summary]);\n\n const registrationTotal = summary?.totalRegistrations ?? 0;\n\n // Entity-count bar chart from the real dashboard summary + derived check-ins.\n const entityCounts = useMemo<BarDatum[]>(() => {\n if (!summary) return [];\n return [\n { name: 'Events', value: summary.totalEvents },\n { name: 'Regs', value: summary.totalRegistrations },\n { name: 'Attendees', value: summary.totalAttendees },\n { name: 'Check-ins', value: checkInCount },\n { name: 'Venues', value: summary.totalVenues },\n { name: 'Sponsors', value: summary.totalSponsors },\n { name: 'Sessions', value: summary.upcomingSessions },\n ];\n }, [summary, checkInCount]);\n\n // BOFF-11388 — the mutation always inserts (no lookup by name), so an\n // unvalidated name let two clicks, or two uses of the same label, produce\n // duplicate snapshots. Block a name already in the loaded page instead.\n const onCreate = async () => {\n const trimmed = snapshotName.trim();\n if (!trimmed) return;\n if (snapshots.some((snapshot) => (snapshot.name ?? '').toLowerCase() === trimmed.toLowerCase())) {\n notify.error('Snapshot name already used', 'Pick a different name, or delete the existing snapshot first.');\n return;\n }\n try {\n const response = await upsertSnapshot({\n variables: {\n input: {\n name: trimmed,\n title: trimmed,\n status: 'created',\n metadata: {},\n },\n },\n });\n if (!mutationSucceeded(response, response.data?.upsertAnalyticsSnapshot?.id, 'Could not generate snapshot')) {\n return;\n }\n notify.success('Snapshot generated');\n await refetch();\n } catch (error) {\n notify.error('Could not generate snapshot', describeError(error));\n }\n };\n\n const summaryLoading = summaryQuery.loading && !summary;\n\n return (\n <div className=\"space-y-6 p-6\">\n <PagePurpose>\n Analytics shows current totals across every entity you manage, how registrations break down by status, and a\n trend line built from your saved snapshots. Generate a snapshot to record today's numbers for the\n workspace; each one is kept on its own and does not get replaced by later snapshots.\n </PagePurpose>\n\n <EmphasisPanel>\n <div className=\"flex flex-col gap-4 sm:flex-row sm:items-end sm:justify-between\">\n <div>\n <h1 className=\"text-2xl font-bold text-text-primary\">\n <GradientText>Analytics</GradientText>\n </h1>\n <p className=\"mt-1 text-sm text-text-secondary\">\n Current metrics from live event operations, loaded when the page opens, plus point-in-time snapshots you\n control.\n </p>\n </div>\n <div className=\"flex w-full flex-col gap-2 sm:w-auto sm:flex-row\">\n <Input\n value={snapshotName}\n onChange={(e) => setSnapshotName(e.target.value)}\n placeholder=\"daily-summary\"\n aria-label=\"Snapshot name\"\n className=\"sm:w-48\"\n />\n <Button type=\"button\" disabled={creating} onClick={onCreate}>\n <Sparkles className=\"h-4 w-4\" />\n {creating ? 'Generating...' : 'Generate snapshot'}\n </Button>\n </div>\n </div>\n </EmphasisPanel>\n\n <AttendanceForecast\n events={events}\n total={eventsQuery.data?.events.total ?? 0}\n loading={eventsQuery.loading}\n failed={Boolean(eventsQuery.error)}\n reload={() => eventsQuery.refetch()}\n loadMore={() =>\n eventsQuery.fetchMore({\n variables: { limit: 50, offset: events.length },\n updateQuery: (previous, { fetchMoreResult }) => ({\n events: {\n total: fetchMoreResult.events.total,\n items: Array.from(\n new Map(\n [...previous.events.items, ...fetchMoreResult.events.items].map((event) => [event.id, event])\n ).values()\n ),\n },\n }),\n })\n }\n />\n\n <EventDraftAssistant events={events} />\n\n <div className=\"grid grid-cols-1 gap-6 xl:grid-cols-[minmax(0,1fr)_320px]\">\n <div className=\"space-y-6\">\n {/* Live metric tiles */}\n {summaryLoading ? (\n <div className=\"grid grid-cols-2 gap-4 sm:grid-cols-3 xl:grid-cols-4\">\n {Array.from({ length: 7 }).map((_, index) => (\n <Skeleton key={index} className=\"h-[92px] rounded-card\" />\n ))}\n </div>\n ) : summary ? (\n <div className=\"grid grid-cols-2 gap-4 sm:grid-cols-3 xl:grid-cols-4\">\n <MetricTile icon={CalendarDays} label=\"Events\" value={summary.totalEvents} />\n <MetricTile icon={ClipboardList} label=\"Registrations\" value={summary.totalRegistrations} />\n <MetricTile icon={Users} label=\"Attendees\" value={summary.totalAttendees} />\n <MetricTile icon={QrCode} label=\"Check-ins\" value={checkInCount} />\n <MetricTile icon={MapPin} label=\"Venues\" value={summary.totalVenues} />\n <MetricTile icon={Trophy} label=\"Sponsors\" value={summary.totalSponsors} />\n <MetricTile icon={Ticket} label=\"Upcoming Sessions\" value={summary.upcomingSessions} />\n </div>\n ) : null}\n\n {/* Registrations over time + by status */}\n <div className=\"grid grid-cols-1 gap-6 lg:grid-cols-2\">\n <GlassCard treatment=\"insight\" className=\"p-5\">\n <div className=\"flex items-center justify-between\">\n <h2 className=\"text-base font-semibold text-text-primary\">Registrations over time</h2>\n <span className=\"text-xs text-text-muted\">By snapshot</span>\n </div>\n <div className=\"mt-4\">\n <EventAreaChart data={registrationsSeries} emptyLabel=\"Generate a few snapshots to chart the trend\" />\n </div>\n </GlassCard>\n\n <GlassCard treatment=\"insight\" className=\"p-5\">\n <h2 className=\"text-base font-semibold text-text-primary\">Registrations by status</h2>\n <div className=\"mt-4 flex flex-col items-center gap-4 sm:flex-row\">\n <div className=\"w-full sm:w-1/2\">\n <EventDonutChart\n data={statusBreakdown}\n centerValue={registrationTotal.toLocaleString()}\n centerLabel=\"Registrations\"\n emptyLabel=\"No registrations yet\"\n />\n </div>\n <div className=\"w-full sm:w-1/2\">\n <ChartLegend\n items={statusBreakdown.map((slice) => ({\n label: slice.name,\n color: slice.color ?? 'var(--color-chart-1)',\n value: slice.value.toLocaleString(),\n }))}\n />\n </div>\n </div>\n </GlassCard>\n </div>\n\n {/* Entity totals */}\n <GlassCard treatment=\"insight\" className=\"p-5\">\n <h2 className=\"text-base font-semibold text-text-primary\">Portfolio totals</h2>\n <p className=\"mt-0.5 text-xs text-text-muted\">Live counts across every entity you manage.</p>\n <div className=\"mt-4\">\n <EventBarChart data={entityCounts} emptyLabel=\"No operational data yet\" />\n </div>\n </GlassCard>\n\n {/* BOFF-3999 — check-in throughput by hour, scoped to one event. */}\n <GlassCard treatment=\"insight\" className=\"p-5\">\n <div className=\"flex flex-wrap items-center justify-between gap-3\">\n <div>\n <h2 className=\"text-base font-semibold text-text-primary\">Check-in throughput</h2>\n <p className=\"mt-0.5 text-xs text-text-muted\">\n Scans per hour at the door for the selected event\n {throughputTimezone ? ` (${throughputTimezone})` : ''}.\n </p>\n </div>\n {events.length > 0 ? (\n <Select value={throughputEventId} onValueChange={setThroughputEventIdOverride}>\n <SelectTrigger className=\"w-full sm:w-56\" aria-label=\"Select event for check-in throughput\">\n <SelectValue placeholder=\"Select event\" />\n </SelectTrigger>\n <SelectContent>\n {events.map((event) => (\n <SelectItem key={event.id} value={event.id}>\n {event.name}\n </SelectItem>\n ))}\n </SelectContent>\n </Select>\n ) : null}\n </div>\n <div className=\"mt-4\">\n <EventBarChart\n data={throughputSeries}\n emptyLabel={\n throughputEventId ? 'No check-ins recorded yet for this event' : 'Select an event to see throughput'\n }\n />\n </div>\n </GlassCard>\n </div>\n\n {/* Saved snapshots rail */}\n <aside className=\"space-y-4\">\n <div className=\"flex items-center justify-between\">\n <h2 className=\"text-base font-semibold text-text-primary\">\n Saved snapshots {total > 0 ? <span className=\"text-text-muted\">({total})</span> : null}\n </h2>\n <BarChart3 className=\"h-4 w-4 text-text-muted\" />\n </div>\n\n {loading && snapshots.length === 0 ? (\n <div className=\"space-y-3\">\n {Array.from({ length: 3 }).map((_, index) => (\n <Skeleton key={index} className=\"h-24 rounded-card\" />\n ))}\n </div>\n ) : snapshots.length === 0 ? (\n <GlassCard treatment=\"plain\" className=\"border-border-seam\">\n <IllustratedEmptyState\n illustration=\"empty-data\"\n title=\"No snapshots yet\"\n description=\"Generate your first snapshot to freeze the current metrics.\"\n className=\"py-8\"\n />\n </GlassCard>\n ) : (\n <div className=\"space-y-3\">\n {snapshots.map((snapshot) => {\n const generatedAt =\n formatGeneratedAt(snapshot.metrics?.generatedAt) ?? formatGeneratedAt(snapshot.createdAt);\n const captured = METRIC_FIELDS.map((field) => {\n const raw = snapshot.metrics?.[field.key];\n return { label: field.label, value: typeof raw === 'number' ? raw : null };\n }).filter((entry) => entry.value !== null);\n return (\n <GlassCard key={snapshot.id} treatment=\"plain\" className=\"border-border-seam p-4\">\n <div className=\"flex items-start justify-between gap-2\">\n <div className=\"min-w-0\">\n <h3 className=\"truncate text-sm font-semibold text-text-primary\">\n {snapshot.title ?? snapshot.name ?? `Snapshot ${snapshot.id}`}\n </h3>\n {generatedAt ? <p className=\"mt-0.5 text-xs text-text-muted\">{generatedAt}</p> : null}\n </div>\n {snapshot.status ? (\n <Badge variant={statusVariant(snapshot.status)} className=\"shrink-0 uppercase\">\n {snapshot.status}\n </Badge>\n ) : null}\n </div>\n {captured.length > 0 ? (\n <dl className=\"mt-3 space-y-1.5\">\n {captured.map((entry) => (\n <div key={entry.label} className=\"flex items-center justify-between text-xs\">\n <dt className=\"text-text-secondary\">{entry.label}</dt>\n <dd className=\"font-semibold tabular-nums text-text-primary\">\n {(entry.value ?? 0).toLocaleString()}\n </dd>\n </div>\n ))}\n </dl>\n ) : (\n <p className=\"mt-3 text-xs text-text-muted\">No metrics captured.</p>\n )}\n </GlassCard>\n );\n })}\n\n <Pagination\n offset={pagination.offset}\n limit={pagination.limit}\n loadedCount={snapshots.length}\n total={total}\n onPrev={pagination.prevPage}\n onNext={pagination.nextPage}\n itemLabel=\"snapshots\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