@burdenoff/microfe-eventfullymanaged 2026.803.1 → 2026.825.1

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