@burdenoff/microfe-eventfullymanaged 2026.1102.2 → 2026.1102.4

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.
@@ -1,31 +1,23 @@
1
- import { gql as e } from "../../../node_modules/graphql-tag/lib/index.js";
2
- import { useQuery as t } from "../../../node_modules/@apollo/client/react/hooks/useQuery.js";
3
- import { useEventsQuery as n, useSponsorsQuery as r, useVenuesQuery as i } from "../../api/eventApi.js";
1
+ import { useEventPortfolioQuery as e } from "../../api/eventApi.js";
4
2
  import "../../hooks/index.js";
5
- import { ActionMenu as a } from "../../components/ActionMenu.js";
6
- import { useEventDelete as o } from "../../hooks/useEventDelete.js";
7
- import { Pagination as s, usePagination as c } from "../../components/Pagination.js";
8
- import { useEventfullyManaged as l } from "../../context/EventfullyManagedContext.js";
9
- import { formatDateTime as u } from "../events/eventFormUtils.js";
10
- import { useMemo as d, useState as f } from "react";
11
- import { useI18n as ee } from "@burdenoff/fe-libs/shared/providers/shell/I18nProvider";
12
- import { jsx as p, jsxs as m } from "react/jsx-runtime";
13
- import { Award as te, CalendarClock as h, CalendarDays as ne, CalendarPlus as g, LayoutGrid as re, MapPin as _, Rows3 as ie, Search as ae, Ticket as oe, UserCheck as v, Users as y } from "lucide-react";
14
- import { Badge as b, Button as x, EmphasisPanel as S, GlassCard as C, GradientText as w, IllustratedEmptyState as T, Input as se, NextSteps as ce, PagePurpose as le, Skeleton as E, Table as ue, TableBody as D, TableCell as O, TableHead as k, TableHeader as de, TableRow as A, Tabs as fe, TabsList as pe, TabsTrigger as j } from "@burdenoff/fe-libs/ui";
3
+ import { ActionMenu as t } from "../../components/ActionMenu.js";
4
+ import { useEventDelete as n } from "../../hooks/useEventDelete.js";
5
+ import { Pagination as r, usePagination as ee } from "../../components/Pagination.js";
6
+ import { useEventfullyManaged as i } from "../../context/EventfullyManagedContext.js";
7
+ import { formatDateTime as a } from "../events/eventFormUtils.js";
8
+ import { useMemo as te, useState as o } from "react";
9
+ import { useI18n as ne } from "@burdenoff/fe-libs/shared/providers/shell/I18nProvider";
10
+ import { jsx as s, jsxs as c } from "react/jsx-runtime";
11
+ import { Award as re, CalendarClock as l, CalendarDays as u, CalendarPlus as d, CircleCheck as f, LayoutGrid as ie, MapPin as p, Rows3 as m, Search as h, Ticket as g, Users as _ } from "lucide-react";
12
+ import { Badge as v, Button as y, EmphasisPanel as ae, GlassCard as b, GradientText as oe, IllustratedEmptyState as se, Input as ce, NextSteps as x, PagePurpose as S, Skeleton as C, Table as le, TableBody as ue, TableCell as w, TableHead as T, TableHeader as E, TableRow as D, Tabs as de, TabsList as fe, TabsTrigger as O } from "@burdenoff/fe-libs/ui";
15
13
  // src/eventfullymanaged/pages/modules/EventsPage.tsx
16
- var me = e`
17
- query EventfullymanagedEventsRegistrations($limit: Int) {
18
- registrations: eventfullyManagedRegistrations(limit: $limit, offset: 0) {
19
- total
20
- items {
21
- id
22
- eventId
23
- checkedInAt
24
- }
25
- }
26
- }
27
- `;
28
- function M(e) {
14
+ var pe = {
15
+ all: void 0,
16
+ upcoming: "UPCOMING",
17
+ live: "LIVE",
18
+ past: "PAST"
19
+ };
20
+ function k(e) {
29
21
  let t = e.toLowerCase();
30
22
  return [
31
23
  "active",
@@ -47,29 +39,31 @@ function M(e) {
47
39
  "scheduled"
48
40
  ].includes(t) ? "info" : "secondary";
49
41
  }
50
- function N(e, t) {
51
- let n = e ? u(e) : "", r = t ? u(t) : "";
42
+ function A(e) {
43
+ return e === "LIVE" ? "success" : e === "UPCOMING" ? "info" : "secondary";
44
+ }
45
+ function j(e, t) {
46
+ let n = e ? a(e) : "", r = t ? a(t) : "";
52
47
  return n && r ? `${n} — ${r}` : n || r || "No schedule set";
53
48
  }
54
- function P(e, t) {
55
- let n = Date.now(), r = e ? new Date(e).getTime() : NaN, i = t ? new Date(t).getTime() : NaN, a = !Number.isNaN(r), o = !Number.isNaN(i);
56
- return !a && !o ? null : a && n < r ? "upcoming" : o && n > i ? "past" : a ? "live" : "upcoming";
49
+ function M(e) {
50
+ return e.checkInRate === null || e.checkInRate === void 0 ? null : Math.round(e.checkInRate * 100);
57
51
  }
58
- function F({ icon: e, label: t, value: n, loading: r }) {
59
- return /* @__PURE__ */ p(C, {
52
+ function N({ icon: e, label: t, value: n, loading: r }) {
53
+ return /* @__PURE__ */ s(b, {
60
54
  treatment: "plain",
61
55
  className: "border-border-seam p-4",
62
- children: /* @__PURE__ */ m("div", {
56
+ children: /* @__PURE__ */ c("div", {
63
57
  className: "flex items-center gap-3",
64
- children: [/* @__PURE__ */ p("span", {
58
+ children: [/* @__PURE__ */ s("span", {
65
59
  className: "flex h-9 w-9 shrink-0 items-center justify-center rounded-button bg-bg-sunken text-text-secondary",
66
- children: /* @__PURE__ */ p(e, { className: "h-4 w-4" })
67
- }), /* @__PURE__ */ m("div", {
60
+ children: /* @__PURE__ */ s(e, { className: "h-4 w-4" })
61
+ }), /* @__PURE__ */ c("div", {
68
62
  className: "min-w-0",
69
- children: [r ? /* @__PURE__ */ p(E, { className: "h-6 w-12" }) : /* @__PURE__ */ p("p", {
63
+ children: [r ? /* @__PURE__ */ s(C, { className: "h-6 w-12" }) : /* @__PURE__ */ s("p", {
70
64
  className: "truncate text-xl font-bold tabular-nums text-text-primary",
71
65
  children: n
72
- }), /* @__PURE__ */ p("p", {
66
+ }), /* @__PURE__ */ s("p", {
73
67
  className: "truncate text-xs text-text-muted",
74
68
  children: t
75
69
  })]
@@ -77,424 +71,397 @@ function F({ icon: e, label: t, value: n, loading: r }) {
77
71
  })
78
72
  });
79
73
  }
80
- function I({ icon: e, label: t, value: n }) {
81
- return /* @__PURE__ */ m("div", {
82
- className: "flex items-center gap-1.5",
83
- children: [
84
- /* @__PURE__ */ p(e, { className: "h-3.5 w-3.5 text-text-muted" }),
85
- /* @__PURE__ */ p("span", {
86
- className: "tabular-nums font-medium text-text-primary",
74
+ function P({ icon: e, label: t, value: n }) {
75
+ return /* @__PURE__ */ c("div", {
76
+ className: "flex items-start gap-2",
77
+ children: [/* @__PURE__ */ s(e, { className: "mt-0.5 h-4 w-4 shrink-0 text-text-muted" }), /* @__PURE__ */ c("div", {
78
+ className: "min-w-0",
79
+ children: [/* @__PURE__ */ s("p", {
80
+ className: "tabular-nums font-semibold text-text-primary",
87
81
  children: n
88
- }),
89
- /* @__PURE__ */ p("span", {
90
- className: "text-text-muted",
82
+ }), /* @__PURE__ */ s("p", {
83
+ className: "truncate text-xs text-text-muted",
91
84
  children: t
92
- })
93
- ]
85
+ })]
86
+ })]
94
87
  });
95
88
  }
96
- function L() {
97
- let { t: e } = ee(), u = (t, n) => {
98
- let r = e(t);
99
- return r === t ? n : r;
100
- }, { navigate: L } = l(), [R, he] = f(""), [z, ge] = f("all"), [B, V] = f("table"), H = c({ resetKey: R }), { data: U, loading: W, refetch: _e } = n({
101
- search: R,
102
- limit: H.limit,
103
- offset: H.offset
104
- }), { onDeleteEvent: ve } = o(), { data: G, loading: ye } = i({
105
- limit: 100,
106
- offset: 0
107
- }), { data: K, loading: be } = r({
108
- limit: 1,
109
- offset: 0
110
- }), { data: q, loading: xe } = t(me, { variables: { limit: 500 } }), J = U?.events?.total ?? 0, Y = d(() => U?.events?.items ?? [], [U]), Se = q?.registrations?.total ?? 0, Ce = G?.venues?.total ?? 0, we = K?.sponsors?.total ?? 0, X = async (e) => {
111
- await ve(e.id, {
112
- name: e.name,
113
- onSuccess: () => void _e()
89
+ function F() {
90
+ let { t: a } = ne(), F = (e, t) => {
91
+ let n = a(e);
92
+ return n === e ? t : n;
93
+ }, { navigate: I, workspaceId: L } = i(), [R, z] = o(""), [B, me] = o("all"), [V, H] = o("table"), U = ee({ resetKey: `${R}::${B}` }), { data: he, loading: W, refetch: ge } = e({
94
+ workspaceId: L || void 0,
95
+ lifecycle: pe[B],
96
+ search: R.trim() || void 0,
97
+ limit: U.limit,
98
+ offset: U.offset
99
+ }), { onDeleteEvent: _e } = n(), G = he?.portfolio, K = te(() => G?.items ?? [], [G]), ve = G?.total ?? 0, q = G?.counts, J = W && !G, Y = G && G.totalRegistrations > 0 ? Math.round(G.totalCheckedIn / G.totalRegistrations * 100) : null, X = async (e) => {
100
+ await _e(e.event.id, {
101
+ name: e.event.name,
102
+ onSuccess: () => void ge()
114
103
  });
115
- }, Z = d(() => z === "all" ? Y : Y.filter((e) => P(e.startAt, e.endAt) === z), [Y, z]), Q = d(() => {
116
- let e = /* @__PURE__ */ new Map();
117
- for (let t of G?.venues?.items ?? []) e.set(t.id, t.name);
118
- return e;
119
- }, [G]), $ = d(() => {
120
- let e = /* @__PURE__ */ new Map();
121
- for (let t of q?.registrations?.items ?? []) {
122
- let n = e.get(t.eventId) ?? {
123
- registrations: 0,
124
- checkedIn: 0
125
- };
126
- n.registrations += 1, t.checkedInAt && (n.checkedIn += 1), e.set(t.eventId, n);
127
- }
128
- return e;
129
- }, [q]);
130
- return /* @__PURE__ */ m("div", {
104
+ }, Z = (e) => e === "LIVE" ? F("eventfullymanaged.events.filters.live", "Live") : e === "UPCOMING" ? F("eventfullymanaged.events.filters.upcoming", "Upcoming") : F("eventfullymanaged.events.filters.past", "Past"), Q = (e, t) => {
105
+ let n = q?.[e];
106
+ return n === void 0 ? t : `${t} (${n.toLocaleString()})`;
107
+ }, $ = /* @__PURE__ */ s(r, {
108
+ offset: U.offset,
109
+ limit: U.limit,
110
+ loadedCount: K.length,
111
+ total: ve,
112
+ onPrev: U.prevPage,
113
+ onNext: U.nextPage,
114
+ itemLabel: "events",
115
+ loading: W
116
+ }), ye = (q?.all ?? 0) > 0;
117
+ return /* @__PURE__ */ c("div", {
131
118
  className: "space-y-6 p-6",
132
119
  children: [
133
- /* @__PURE__ */ p(le, { children: u("eventfullymanaged.events.purpose", "Events are the heart of the platform — each one is a happening you sell tickets for, register attendees to, and run on the day. Create an event, open it to reveal its agenda, speakers and ticket types, then publish it when it is ready.") }),
134
- /* @__PURE__ */ p(S, { children: /* @__PURE__ */ m("div", {
120
+ /* @__PURE__ */ s(S, { children: F("eventfullymanaged.events.purpose", "Events are the heart of the platform — each one is a happening you sell tickets for, register attendees to, and run on the day. Create an event, open it to reveal its agenda, speakers and ticket types, then publish it when it is ready.") }),
121
+ /* @__PURE__ */ s(ae, { children: /* @__PURE__ */ c("div", {
135
122
  className: "flex flex-col gap-4 sm:flex-row sm:items-center sm:justify-between",
136
- children: [/* @__PURE__ */ m("div", { children: [/* @__PURE__ */ p("h1", {
123
+ children: [/* @__PURE__ */ c("div", { children: [/* @__PURE__ */ s("h1", {
137
124
  className: "text-2xl font-bold text-text-primary",
138
- children: /* @__PURE__ */ p(w, { children: u("eventfullymanaged.events.title", "Events") })
139
- }), /* @__PURE__ */ p("p", {
125
+ children: /* @__PURE__ */ s(oe, { children: F("eventfullymanaged.events.portfolio.title", "All Events") })
126
+ }), /* @__PURE__ */ s("p", {
140
127
  className: "mt-1 text-sm text-text-secondary",
141
- children: u("eventfullymanaged.events.description", "Create and manage live events from the workspace graph.")
142
- })] }), /* @__PURE__ */ m(x, {
128
+ children: F("eventfullymanaged.events.portfolio.scope", "Every event in this workspace. Switch organization or workspace from the context switcher in the top bar.")
129
+ })] }), /* @__PURE__ */ c(y, {
143
130
  type: "button",
144
- onClick: () => L("/events/create"),
145
- children: [/* @__PURE__ */ p(g, { className: "h-4 w-4" }), u("eventfullymanaged.events.actions.create", "Create Event")]
131
+ onClick: () => I("/events/create"),
132
+ children: [/* @__PURE__ */ s(d, { className: "h-4 w-4" }), F("eventfullymanaged.events.actions.create", "Create Event")]
146
133
  })]
147
134
  }) }),
148
- /* @__PURE__ */ m("div", {
149
- className: "grid grid-cols-2 gap-3 sm:grid-cols-4",
135
+ /* @__PURE__ */ c("div", {
136
+ className: "grid grid-cols-2 gap-3 sm:grid-cols-3 lg:grid-cols-5",
137
+ "data-testid": "events-portfolio-stats",
150
138
  children: [
151
- /* @__PURE__ */ p(F, {
152
- icon: ne,
153
- label: u("eventfullymanaged.events.portfolio.events", "Events"),
154
- value: J.toLocaleString(),
155
- loading: W && J === 0
156
- }),
157
- /* @__PURE__ */ p(F, {
158
- icon: y,
159
- label: u("eventfullymanaged.events.portfolio.registrations", "Registrations"),
160
- value: Se.toLocaleString(),
161
- loading: xe && !q
139
+ /* @__PURE__ */ s(N, {
140
+ icon: u,
141
+ label: F("eventfullymanaged.events.portfolio.events", "Events"),
142
+ value: (q?.all ?? 0).toLocaleString(),
143
+ loading: J
162
144
  }),
163
- /* @__PURE__ */ p(F, {
145
+ /* @__PURE__ */ s(N, {
164
146
  icon: _,
165
- label: u("eventfullymanaged.events.portfolio.venues", "Venues"),
166
- value: Ce.toLocaleString(),
167
- loading: ye && !G
147
+ label: F("eventfullymanaged.events.portfolio.registrations", "Registrations"),
148
+ value: (G?.totalRegistrations ?? 0).toLocaleString(),
149
+ loading: J
150
+ }),
151
+ /* @__PURE__ */ s(N, {
152
+ icon: f,
153
+ label: F("eventfullymanaged.events.portfolio.checkIn", "Check-in rate"),
154
+ value: Y === null ? "—" : `${Y}%`,
155
+ loading: J
156
+ }),
157
+ /* @__PURE__ */ s(N, {
158
+ icon: p,
159
+ label: F("eventfullymanaged.events.portfolio.venues", "Venues"),
160
+ value: (G?.totalVenues ?? 0).toLocaleString(),
161
+ loading: J
168
162
  }),
169
- /* @__PURE__ */ p(F, {
170
- icon: te,
171
- label: u("eventfullymanaged.events.portfolio.sponsors", "Sponsors"),
172
- value: we.toLocaleString(),
173
- loading: be && !K
163
+ /* @__PURE__ */ s(N, {
164
+ icon: re,
165
+ label: F("eventfullymanaged.events.portfolio.sponsors", "Sponsors"),
166
+ value: (G?.totalSponsors ?? 0).toLocaleString(),
167
+ loading: J
174
168
  })
175
169
  ]
176
170
  }),
177
- /* @__PURE__ */ m("div", {
178
- className: "flex flex-col gap-3 sm:flex-row sm:items-center sm:justify-between",
171
+ /* @__PURE__ */ c("div", {
172
+ className: "flex flex-col gap-3 lg:flex-row lg:items-center lg:justify-between",
179
173
  children: [
180
- /* @__PURE__ */ m("div", {
174
+ /* @__PURE__ */ c("div", {
181
175
  className: "relative flex-1",
182
- children: [/* @__PURE__ */ p(ae, { className: "pointer-events-none absolute left-3 top-1/2 h-4 w-4 -translate-y-1/2 text-text-muted" }), /* @__PURE__ */ p(se, {
176
+ children: [/* @__PURE__ */ s(h, { className: "pointer-events-none absolute left-3 top-1/2 h-4 w-4 -translate-y-1/2 text-text-muted" }), /* @__PURE__ */ s(ce, {
183
177
  type: "text",
184
178
  value: R,
185
- onChange: (e) => he(e.target.value),
186
- placeholder: u("eventfullymanaged.events.searchPlaceholder", "Search events"),
187
- "aria-label": u("eventfullymanaged.events.searchPlaceholder", "Search events"),
179
+ onChange: (e) => z(e.target.value),
180
+ placeholder: F("eventfullymanaged.events.searchPlaceholder", "Search events"),
181
+ "aria-label": F("eventfullymanaged.events.searchPlaceholder", "Search events"),
188
182
  className: "pl-10"
189
183
  })]
190
184
  }),
191
- /* @__PURE__ */ p(fe, {
192
- value: z,
193
- onValueChange: (e) => ge(e),
194
- className: "w-full sm:w-auto",
195
- children: /* @__PURE__ */ m(pe, {
196
- className: "w-full overflow-x-auto sm:w-auto",
185
+ /* @__PURE__ */ s(de, {
186
+ value: B,
187
+ onValueChange: (e) => me(e),
188
+ className: "w-full lg:w-auto",
189
+ children: /* @__PURE__ */ c(fe, {
190
+ className: "w-full overflow-x-auto lg:w-auto",
197
191
  children: [
198
- /* @__PURE__ */ p(j, {
192
+ /* @__PURE__ */ s(O, {
199
193
  value: "all",
200
- children: u("eventfullymanaged.events.filters.all", "All")
194
+ children: Q("all", F("eventfullymanaged.events.filters.all", "All"))
201
195
  }),
202
- /* @__PURE__ */ p(j, {
196
+ /* @__PURE__ */ s(O, {
203
197
  value: "upcoming",
204
- children: u("eventfullymanaged.events.filters.upcoming", "Upcoming")
198
+ children: Q("upcoming", F("eventfullymanaged.events.filters.upcoming", "Upcoming"))
205
199
  }),
206
- /* @__PURE__ */ p(j, {
200
+ /* @__PURE__ */ s(O, {
207
201
  value: "live",
208
- children: u("eventfullymanaged.events.filters.live", "Live")
202
+ children: Q("live", F("eventfullymanaged.events.filters.live", "Live"))
209
203
  }),
210
- /* @__PURE__ */ p(j, {
204
+ /* @__PURE__ */ s(O, {
211
205
  value: "past",
212
- children: u("eventfullymanaged.events.filters.past", "Past")
206
+ children: Q("past", F("eventfullymanaged.events.filters.past", "Past"))
213
207
  })
214
208
  ]
215
209
  })
216
210
  }),
217
- /* @__PURE__ */ m("div", {
218
- className: "flex shrink-0 items-center gap-1 self-start rounded-button border border-border-seam p-1 sm:self-auto",
219
- children: [/* @__PURE__ */ p(x, {
211
+ /* @__PURE__ */ c("div", {
212
+ className: "flex shrink-0 items-center gap-1 self-start rounded-button border border-border-seam p-1 lg:self-auto",
213
+ children: [/* @__PURE__ */ s(y, {
220
214
  type: "button",
221
- variant: B === "table" ? "default" : "ghost",
215
+ variant: V === "table" ? "default" : "ghost",
222
216
  size: "sm",
223
- "aria-pressed": B === "table",
224
- "aria-label": u("eventfullymanaged.events.view.table", "Table view"),
225
- onClick: () => V("table"),
226
- children: /* @__PURE__ */ p(ie, { className: "h-4 w-4" })
227
- }), /* @__PURE__ */ p(x, {
217
+ "aria-pressed": V === "table",
218
+ "aria-label": F("eventfullymanaged.events.view.table", "Table view"),
219
+ onClick: () => H("table"),
220
+ children: /* @__PURE__ */ s(m, { className: "h-4 w-4" })
221
+ }), /* @__PURE__ */ s(y, {
228
222
  type: "button",
229
- variant: B === "cards" ? "default" : "ghost",
223
+ variant: V === "cards" ? "default" : "ghost",
230
224
  size: "sm",
231
- "aria-pressed": B === "cards",
232
- "aria-label": u("eventfullymanaged.events.view.cards", "Card view"),
233
- onClick: () => V("cards"),
234
- children: /* @__PURE__ */ p(re, { className: "h-4 w-4" })
225
+ "aria-pressed": V === "cards",
226
+ "aria-label": F("eventfullymanaged.events.view.cards", "Card view"),
227
+ onClick: () => H("cards"),
228
+ children: /* @__PURE__ */ s(ie, { className: "h-4 w-4" })
235
229
  })]
236
230
  })
237
231
  ]
238
232
  }),
239
- W ? /* @__PURE__ */ m("div", {
233
+ J ? /* @__PURE__ */ c("div", {
240
234
  className: "space-y-3",
241
235
  children: [
242
- /* @__PURE__ */ p(E, { className: "h-28 w-full rounded-card" }),
243
- /* @__PURE__ */ p(E, { className: "h-28 w-full rounded-card" }),
244
- /* @__PURE__ */ p(E, { className: "h-28 w-full rounded-card" })
236
+ /* @__PURE__ */ s(C, { className: "h-28 w-full rounded-card" }),
237
+ /* @__PURE__ */ s(C, { className: "h-28 w-full rounded-card" }),
238
+ /* @__PURE__ */ s(C, { className: "h-28 w-full rounded-card" })
245
239
  ]
246
- }) : Y.length === 0 ? /* @__PURE__ */ p(C, {
240
+ }) : ye ? K.length === 0 ? /* @__PURE__ */ s(b, {
247
241
  treatment: "plain",
248
242
  className: "border-border-seam",
249
- children: /* @__PURE__ */ p(T, {
250
- illustration: R ? "empty-search" : "empty-data",
251
- title: R ? u("eventfullymanaged.events.list.emptySearch", "No events match your search.") : u("eventfullymanaged.events.list.empty", "No events yet."),
252
- description: R ? u("eventfullymanaged.events.list.emptySearchHint", "Try a different name.") : u("eventfullymanaged.events.list.emptyHint", "Create your first event to get started."),
253
- action: R ? void 0 : /* @__PURE__ */ m(x, {
254
- type: "button",
255
- onClick: () => L("/events/create"),
256
- children: [/* @__PURE__ */ p(g, { className: "h-4 w-4" }), u("eventfullymanaged.events.actions.create", "Create Event")]
257
- })
243
+ children: /* @__PURE__ */ s("p", {
244
+ className: "px-2 py-8 text-center text-sm text-text-secondary",
245
+ children: F("eventfullymanaged.events.filters.emptyBucket", `No ${B} events in this workspace.`)
258
246
  })
259
- }) : Z.length === 0 ? /* @__PURE__ */ m("div", {
260
- className: "space-y-3",
261
- children: [/* @__PURE__ */ p(C, {
262
- treatment: "plain",
263
- className: "border-border-seam",
264
- children: /* @__PURE__ */ p("p", {
265
- className: "px-2 py-8 text-center text-sm text-text-secondary",
266
- children: u("eventfullymanaged.events.filters.empty", `No ${z} events on this page. Switch tabs or move to another page.`)
267
- })
268
- }), /* @__PURE__ */ p(s, {
269
- offset: H.offset,
270
- limit: H.limit,
271
- loadedCount: Y.length,
272
- total: J,
273
- onPrev: H.prevPage,
274
- onNext: H.nextPage,
275
- itemLabel: "events",
276
- loading: W
277
- })]
278
- }) : B === "table" ? /* @__PURE__ */ m("div", {
247
+ }) : V === "table" ? /* @__PURE__ */ c("div", {
279
248
  className: "space-y-3",
280
- children: [/* @__PURE__ */ p("div", {
249
+ children: [/* @__PURE__ */ s("div", {
281
250
  className: "overflow-hidden rounded-card border border-border-seam",
282
- children: /* @__PURE__ */ m(ue, { children: [/* @__PURE__ */ p(de, { children: /* @__PURE__ */ m(A, { children: [
283
- /* @__PURE__ */ p(k, { children: u("eventfullymanaged.events.table.name", "Event") }),
284
- /* @__PURE__ */ p(k, { children: u("eventfullymanaged.events.table.date", "Date") }),
285
- /* @__PURE__ */ p(k, { children: u("eventfullymanaged.events.table.venue", "Venue") }),
286
- /* @__PURE__ */ p(k, { children: u("eventfullymanaged.events.table.status", "Status") }),
287
- /* @__PURE__ */ p(k, {
251
+ children: /* @__PURE__ */ c(le, { children: [/* @__PURE__ */ s(E, { children: /* @__PURE__ */ c(D, { children: [
252
+ /* @__PURE__ */ s(T, { children: F("eventfullymanaged.events.table.name", "Event") }),
253
+ /* @__PURE__ */ s(T, { children: F("eventfullymanaged.events.table.date", "Date") }),
254
+ /* @__PURE__ */ s(T, { children: F("eventfullymanaged.events.table.venue", "Venue") }),
255
+ /* @__PURE__ */ s(T, { children: F("eventfullymanaged.events.table.status", "Status") }),
256
+ /* @__PURE__ */ s(T, {
288
257
  className: "text-right",
289
- children: u("eventfullymanaged.events.table.attendees", "Attendees")
258
+ children: F("eventfullymanaged.events.table.attendees", "Attendees")
290
259
  }),
291
- /* @__PURE__ */ p(k, {
260
+ /* @__PURE__ */ s(T, {
292
261
  className: "w-10",
293
- "aria-label": u("eventfullymanaged.events.table.actions", "Actions")
262
+ "aria-label": F("eventfullymanaged.events.table.actions", "Actions")
294
263
  })
295
- ] }) }), /* @__PURE__ */ p(D, { children: Z.map((e) => {
296
- let t = e.metadata ?? {}, n = typeof t.venueId == "string" ? t.venueId : "", r = n ? Q.get(n) : void 0, i = $.get(e.id), o = i?.registrations ?? 0, s = o > 0 ? Math.round((i?.checkedIn ?? 0) / o * 100) : 0;
297
- return /* @__PURE__ */ m(A, {
264
+ ] }) }), /* @__PURE__ */ s(ue, { children: K.map((e) => {
265
+ let { event: n } = e, r = M(e);
266
+ return /* @__PURE__ */ c(D, {
298
267
  className: "cursor-pointer",
299
268
  tabIndex: 0,
300
- "aria-label": e.name,
301
- onClick: () => L(`/events/${e.id}`),
302
- onKeyDown: (t) => {
303
- (t.key === "Enter" || t.key === " ") && (t.preventDefault(), L(`/events/${e.id}`));
269
+ "aria-label": n.name,
270
+ onClick: () => I(`/events/${n.id}`),
271
+ onKeyDown: (e) => {
272
+ (e.key === "Enter" || e.key === " ") && (e.preventDefault(), I(`/events/${n.id}`));
304
273
  },
305
274
  children: [
306
- /* @__PURE__ */ p(O, {
275
+ /* @__PURE__ */ s(w, {
307
276
  className: "max-w-[18rem]",
308
- children: /* @__PURE__ */ m("div", {
277
+ children: /* @__PURE__ */ c("div", {
309
278
  className: "flex flex-wrap items-center gap-2",
310
- children: [/* @__PURE__ */ p("span", {
279
+ children: [/* @__PURE__ */ s("span", {
311
280
  className: "truncate font-medium text-text-primary",
312
- children: e.name
313
- }), e.type ? /* @__PURE__ */ p(b, {
281
+ children: n.name
282
+ }), n.type ? /* @__PURE__ */ s(v, {
314
283
  variant: "secondary",
315
284
  className: "shrink-0 capitalize",
316
- children: e.type.toLowerCase().replace(/_/g, " ")
285
+ children: n.type.toLowerCase().replace(/_/g, " ")
317
286
  }) : null]
318
287
  })
319
288
  }),
320
- /* @__PURE__ */ p(O, {
289
+ /* @__PURE__ */ s(w, {
321
290
  className: "whitespace-nowrap text-text-secondary",
322
- children: N(e.startAt, e.endAt)
291
+ children: j(n.startAt, n.endAt)
323
292
  }),
324
- /* @__PURE__ */ p(O, {
293
+ /* @__PURE__ */ s(w, {
325
294
  className: "text-text-secondary",
326
- children: r ?? u("eventfullymanaged.events.card.noVenue", "No venue")
295
+ children: e.venueName ?? F("eventfullymanaged.events.card.noVenue", "No venue")
327
296
  }),
328
- /* @__PURE__ */ p(O, { children: e.status ? /* @__PURE__ */ p(b, {
329
- variant: M(e.status),
330
- className: "uppercase",
331
- children: e.status
332
- }) : "—" }),
333
- /* @__PURE__ */ m(O, {
297
+ /* @__PURE__ */ s(w, { children: /* @__PURE__ */ c("div", {
298
+ className: "flex flex-wrap items-center gap-1.5",
299
+ children: [/* @__PURE__ */ s(v, {
300
+ variant: A(e.lifecycle),
301
+ children: Z(e.lifecycle)
302
+ }), n.status ? /* @__PURE__ */ s(v, {
303
+ variant: k(n.status),
304
+ className: "uppercase",
305
+ children: n.status
306
+ }) : null]
307
+ }) }),
308
+ /* @__PURE__ */ c(w, {
334
309
  className: "whitespace-nowrap text-right tabular-nums text-text-primary",
335
- children: [o.toLocaleString(), /* @__PURE__ */ m("span", {
310
+ children: [e.registrations.toLocaleString(), /* @__PURE__ */ c("span", {
336
311
  className: "ml-1 text-xs text-text-muted",
337
312
  children: [
338
313
  "(",
339
- s,
340
- "%)"
314
+ r === null ? "N/A" : `${r}%`,
315
+ ")"
341
316
  ]
342
317
  })]
343
318
  }),
344
- /* @__PURE__ */ p(O, {
319
+ /* @__PURE__ */ s(w, {
345
320
  onClick: (e) => e.stopPropagation(),
346
321
  onKeyDown: (e) => e.stopPropagation(),
347
- children: /* @__PURE__ */ p(a, {
348
- ariaLabel: `Event actions for ${e.name}`,
349
- entityName: e.name,
322
+ children: /* @__PURE__ */ s(t, {
323
+ ariaLabel: `Event actions for ${n.name}`,
324
+ entityName: n.name,
350
325
  deleteLabel: "Delete event",
351
- onView: () => L(`/events/${e.id}`),
352
- onEdit: () => L(`/events/${e.id}/edit`),
326
+ onView: () => I(`/events/${n.id}`),
327
+ onEdit: () => I(`/events/${n.id}/edit`),
353
328
  onDelete: () => X(e)
354
329
  })
355
330
  })
356
331
  ]
357
- }, e.id);
332
+ }, n.id);
358
333
  }) })] })
359
- }), /* @__PURE__ */ p(s, {
360
- offset: H.offset,
361
- limit: H.limit,
362
- loadedCount: Y.length,
363
- total: J,
364
- onPrev: H.prevPage,
365
- onNext: H.nextPage,
366
- itemLabel: "events",
367
- loading: W
368
- })]
369
- }) : /* @__PURE__ */ m("div", {
334
+ }), $]
335
+ }) : /* @__PURE__ */ c("div", {
370
336
  className: "space-y-3",
371
- children: [Z.map((e) => {
372
- let t = e.metadata ?? {}, n = typeof t.venueId == "string" ? t.venueId : "", r = n ? Q.get(n) : void 0, i = $.get(e.id), o = i?.registrations ?? 0, s = o > 0 ? Math.round((i?.checkedIn ?? 0) / o * 100) : 0;
373
- return /* @__PURE__ */ m(C, {
374
- treatment: "plain",
375
- role: "button",
376
- tabIndex: 0,
377
- "aria-label": e.name,
378
- className: "group relative cursor-pointer overflow-hidden border-border-seam p-0 outline-none transition-[box-shadow,border-color] duration-200 hover:border-border-strong hover:shadow-elevation-1 focus-visible:ring-1 focus-visible:ring-[var(--color-focus-ring)]",
379
- onClick: () => L(`/events/${e.id}`),
380
- onKeyDown: (t) => {
381
- (t.key === "Enter" || t.key === " ") && (t.preventDefault(), L(`/events/${e.id}`));
382
- },
383
- children: [/* @__PURE__ */ p("span", {
384
- "aria-hidden": "true",
385
- className: "absolute inset-y-0 left-0 w-1.5 bg-gradient-to-b from-[var(--color-chart-1)] to-[var(--color-chart-2)]"
386
- }), /* @__PURE__ */ m("div", {
387
- className: "flex flex-col gap-3 py-4 pl-5 pr-4 sm:flex-row sm:items-center sm:justify-between",
388
- children: [/* @__PURE__ */ m("div", {
389
- className: "min-w-0 space-y-2",
337
+ children: [/* @__PURE__ */ s("div", {
338
+ className: "grid grid-cols-1 gap-4 md:grid-cols-2 xl:grid-cols-3",
339
+ children: K.map((e) => {
340
+ let { event: n } = e, r = M(e);
341
+ return /* @__PURE__ */ c(b, {
342
+ treatment: "plain",
343
+ role: "button",
344
+ tabIndex: 0,
345
+ "aria-label": n.name,
346
+ className: "group relative cursor-pointer overflow-hidden border-border-seam p-0 outline-none transition-[box-shadow,border-color] duration-200 hover:border-border-strong hover:shadow-elevation-1 focus-visible:ring-1 focus-visible:ring-[var(--color-focus-ring)]",
347
+ onClick: () => I(`/events/${n.id}`),
348
+ onKeyDown: (e) => {
349
+ (e.key === "Enter" || e.key === " ") && (e.preventDefault(), I(`/events/${n.id}`));
350
+ },
351
+ children: [/* @__PURE__ */ s("span", {
352
+ "aria-hidden": "true",
353
+ className: "absolute inset-x-0 top-0 h-1.5 bg-gradient-to-r from-[var(--color-chart-1)] to-[var(--color-chart-2)]"
354
+ }), /* @__PURE__ */ c("div", {
355
+ className: "space-y-3 p-5 pt-6",
390
356
  children: [
391
- /* @__PURE__ */ m("div", {
392
- className: "flex flex-wrap items-center gap-2",
393
- children: [
394
- /* @__PURE__ */ p("p", {
395
- className: "truncate text-lg font-semibold text-text-primary",
396
- children: e.name
397
- }),
398
- e.status ? /* @__PURE__ */ p(b, {
399
- variant: M(e.status),
400
- className: "uppercase",
401
- children: e.status
402
- }) : null,
403
- e.type ? /* @__PURE__ */ p(b, {
404
- variant: "secondary",
405
- className: "capitalize",
406
- children: e.type.toLowerCase().replace(/_/g, " ")
407
- }) : null
408
- ]
357
+ /* @__PURE__ */ c("div", {
358
+ className: "flex items-start justify-between gap-2",
359
+ children: [/* @__PURE__ */ s("p", {
360
+ className: "min-w-0 truncate text-lg font-semibold text-text-primary",
361
+ children: n.name
362
+ }), /* @__PURE__ */ s("div", {
363
+ className: "-mr-2 -mt-1 shrink-0",
364
+ onClick: (e) => e.stopPropagation(),
365
+ onKeyDown: (e) => e.stopPropagation(),
366
+ role: "presentation",
367
+ children: /* @__PURE__ */ s(t, {
368
+ ariaLabel: `Event actions for ${n.name}`,
369
+ entityName: n.name,
370
+ deleteLabel: "Delete event",
371
+ onView: () => I(`/events/${n.id}`),
372
+ onEdit: () => I(`/events/${n.id}/edit`),
373
+ onDelete: () => X(e)
374
+ })
375
+ })]
409
376
  }),
410
- /* @__PURE__ */ m("div", {
411
- className: "flex flex-wrap items-center gap-x-4 gap-y-1 text-sm text-text-secondary",
412
- children: [/* @__PURE__ */ m("span", {
377
+ /* @__PURE__ */ c("div", {
378
+ className: "space-y-1 text-sm text-text-secondary",
379
+ children: [/* @__PURE__ */ c("p", {
413
380
  className: "flex items-center gap-1.5",
414
- children: [/* @__PURE__ */ p(h, { className: "h-4 w-4 shrink-0 text-text-muted" }), N(e.startAt, e.endAt)]
415
- }), /* @__PURE__ */ m("span", {
381
+ children: [/* @__PURE__ */ s(l, { className: "h-4 w-4 shrink-0 text-text-muted" }), /* @__PURE__ */ s("span", {
382
+ className: "truncate",
383
+ children: j(n.startAt, n.endAt)
384
+ })]
385
+ }), /* @__PURE__ */ c("p", {
416
386
  className: "flex items-center gap-1.5",
417
- children: [/* @__PURE__ */ p(_, { className: "h-4 w-4 shrink-0 text-text-muted" }), r ?? u("eventfullymanaged.events.card.noVenue", "No venue")]
387
+ children: [/* @__PURE__ */ s(p, { className: "h-4 w-4 shrink-0 text-text-muted" }), /* @__PURE__ */ s("span", {
388
+ className: "truncate",
389
+ children: e.venueName ?? F("eventfullymanaged.events.card.noVenue", "No venue")
390
+ })]
418
391
  })]
419
392
  }),
420
- /* @__PURE__ */ m("div", {
421
- className: "flex flex-wrap items-center gap-x-4 gap-y-1 text-xs",
422
- children: [
423
- /* @__PURE__ */ p(I, {
424
- icon: v,
425
- label: u("eventfullymanaged.events.card.registered", "registered"),
426
- value: o.toLocaleString()
427
- }),
428
- /* @__PURE__ */ p(I, {
429
- icon: v,
430
- label: u("eventfullymanaged.events.card.checkedIn", "checked in"),
431
- value: `${s}%`
432
- }),
433
- /* @__PURE__ */ p(I, {
434
- icon: y,
435
- label: u("eventfullymanaged.events.card.capacity", "capacity"),
436
- value: e.capacity == null ? "—" : e.capacity.toLocaleString()
437
- })
438
- ]
393
+ /* @__PURE__ */ c("div", {
394
+ className: "flex flex-wrap items-center gap-1.5",
395
+ children: [/* @__PURE__ */ s(v, {
396
+ variant: A(e.lifecycle),
397
+ children: Z(e.lifecycle)
398
+ }), n.status ? /* @__PURE__ */ s(v, {
399
+ variant: k(n.status),
400
+ className: "uppercase",
401
+ children: n.status
402
+ }) : null]
403
+ }),
404
+ /* @__PURE__ */ c("div", {
405
+ className: "grid grid-cols-2 gap-3 border-t border-border-seam pt-3 text-sm",
406
+ children: [/* @__PURE__ */ s(P, {
407
+ icon: _,
408
+ label: F("eventfullymanaged.events.card.registrations", "registrations"),
409
+ value: e.registrations.toLocaleString()
410
+ }), /* @__PURE__ */ s(P, {
411
+ icon: f,
412
+ label: F("eventfullymanaged.events.card.checkIn", "check-in"),
413
+ value: r === null ? "N/A" : `${r}%`
414
+ })]
439
415
  })
440
416
  ]
441
- }), /* @__PURE__ */ p("div", {
442
- className: "flex shrink-0 items-center gap-2 self-start sm:self-center",
443
- onClick: (e) => e.stopPropagation(),
444
- onKeyDown: (e) => e.stopPropagation(),
445
- role: "presentation",
446
- children: /* @__PURE__ */ p(a, {
447
- ariaLabel: `Event actions for ${e.name}`,
448
- entityName: e.name,
449
- deleteLabel: "Delete event",
450
- onView: () => L(`/events/${e.id}`),
451
- onEdit: () => L(`/events/${e.id}/edit`),
452
- onDelete: () => X(e)
453
- })
454
417
  })]
455
- })]
456
- }, e.id);
457
- }), /* @__PURE__ */ p(s, {
458
- offset: H.offset,
459
- limit: H.limit,
460
- loadedCount: Y.length,
461
- total: J,
462
- onPrev: H.prevPage,
463
- onNext: H.nextPage,
464
- itemLabel: "events",
465
- loading: W
466
- })]
418
+ }, n.id);
419
+ })
420
+ }), $]
421
+ }) : /* @__PURE__ */ s(b, {
422
+ treatment: "plain",
423
+ className: "border-border-seam",
424
+ children: /* @__PURE__ */ s(se, {
425
+ illustration: R ? "empty-search" : "empty-data",
426
+ title: R ? F("eventfullymanaged.events.list.emptySearch", "No events match your search.") : F("eventfullymanaged.events.list.empty", "No events yet."),
427
+ description: R ? F("eventfullymanaged.events.list.emptySearchHint", "Try a different name.") : F("eventfullymanaged.events.list.emptyHint", "Create your first event to get started."),
428
+ action: R ? void 0 : /* @__PURE__ */ c(y, {
429
+ type: "button",
430
+ onClick: () => I("/events/create"),
431
+ children: [/* @__PURE__ */ s(d, { className: "h-4 w-4" }), F("eventfullymanaged.events.actions.create", "Create Event")]
432
+ })
433
+ })
467
434
  }),
468
- /* @__PURE__ */ p(ce, {
435
+ /* @__PURE__ */ s(x, {
469
436
  storageKey: "eventfullymanaged-events",
470
- title: u("eventfullymanaged.events.nextSteps.title", "Finish setting up your event"),
437
+ title: F("eventfullymanaged.events.nextSteps.title", "Finish setting up your event"),
471
438
  steps: [
472
439
  {
473
440
  id: "configure-registration",
474
- label: u("eventfullymanaged.events.nextSteps.registration", "Configure registration & tickets"),
475
- description: u("eventfullymanaged.events.nextSteps.registrationDesc", "Open an event and define ticket types so people can register."),
476
- icon: /* @__PURE__ */ p(oe, { className: "h-4 w-4" }),
477
- onClick: () => L("/registration")
441
+ label: F("eventfullymanaged.events.nextSteps.registration", "Configure registration & tickets"),
442
+ description: F("eventfullymanaged.events.nextSteps.registrationDesc", "Open an event and define ticket types so people can register."),
443
+ icon: /* @__PURE__ */ s(g, { className: "h-4 w-4" }),
444
+ onClick: () => I("/registration")
478
445
  },
479
446
  {
480
447
  id: "plan-networking",
481
- label: u("eventfullymanaged.events.nextSteps.networking", "Plan networking & sessions"),
482
- description: u("eventfullymanaged.events.nextSteps.networkingDesc", "Set up attendee matchmaking and meeting schedules."),
483
- icon: /* @__PURE__ */ p(y, { className: "h-4 w-4" }),
484
- onClick: () => L("/networking")
448
+ label: F("eventfullymanaged.events.nextSteps.networking", "Plan networking & sessions"),
449
+ description: F("eventfullymanaged.events.nextSteps.networkingDesc", "Set up attendee matchmaking and meeting schedules."),
450
+ icon: /* @__PURE__ */ s(_, { className: "h-4 w-4" }),
451
+ onClick: () => I("/networking")
485
452
  },
486
453
  {
487
454
  id: "announce",
488
- label: u("eventfullymanaged.events.nextSteps.announce", "Announce to attendees"),
489
- description: u("eventfullymanaged.events.nextSteps.announceDesc", "Send announcements and run communication campaigns."),
490
- icon: /* @__PURE__ */ p(g, { className: "h-4 w-4" }),
491
- onClick: () => L("/communication")
455
+ label: F("eventfullymanaged.events.nextSteps.announce", "Announce to attendees"),
456
+ description: F("eventfullymanaged.events.nextSteps.announceDesc", "Send announcements and run communication campaigns."),
457
+ icon: /* @__PURE__ */ s(d, { className: "h-4 w-4" }),
458
+ onClick: () => I("/communication")
492
459
  }
493
460
  ]
494
461
  })
495
462
  ]
496
463
  });
497
464
  }
498
- export { L as default };
465
+ export { F as default };
499
466
 
500
467
  //# sourceMappingURL=EventsPage.js.map