@burdenoff/microfe-eventfullymanaged 2026.1123.4 → 2026.1123.6
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/api/eventApi.js +1 -0
- package/dist/eventfullymanaged/api/eventApi.js.map +1 -1
- package/dist/eventfullymanaged/api/virtualEngagementApi.d.ts +74 -0
- package/dist/eventfullymanaged/api/virtualEngagementApi.js +87 -0
- package/dist/eventfullymanaged/api/virtualEngagementApi.js.map +1 -0
- package/dist/eventfullymanaged/components/CampaignAudiencePicker.js +1 -1
- package/dist/eventfullymanaged/components/CampaignAudiencePicker.js.map +1 -1
- package/dist/eventfullymanaged/pages/events/VirtualEngagementPanel.d.ts +4 -0
- package/dist/eventfullymanaged/pages/events/VirtualEngagementPanel.js +324 -0
- package/dist/eventfullymanaged/pages/events/VirtualEngagementPanel.js.map +1 -0
- package/dist/eventfullymanaged/pages/events/VirtualSessionPage.js +151 -146
- package/dist/eventfullymanaged/pages/events/VirtualSessionPage.js.map +1 -1
- package/dist/eventfullymanaged/pages/modules/CommunicationPage.js +154 -110
- package/dist/eventfullymanaged/pages/modules/CommunicationPage.js.map +1 -1
- package/package.json +1 -1
|
@@ -5,11 +5,12 @@ import { describeError as l, mutationSucceeded as u } from "../../lib/mutationRe
|
|
|
5
5
|
import { notify as d } from "../../lib/toast.js";
|
|
6
6
|
import { useMemo as f, useState as p } from "react";
|
|
7
7
|
import { useI18n as te } from "@burdenoff/fe-libs/shared/providers/shell/I18nProvider";
|
|
8
|
-
import { jsx as m, jsxs as h } from "react/jsx-runtime";
|
|
9
|
-
import { Mail as
|
|
10
|
-
import { Badge as
|
|
8
|
+
import { Fragment as ne, jsx as m, jsxs as h } from "react/jsx-runtime";
|
|
9
|
+
import { Mail as re, Megaphone as ie, Plus as g, Send as ae, Upload as oe } from "lucide-react";
|
|
10
|
+
import { Badge as _, Button as v, GlassCard as y, GradientText as se, IllustratedEmptyState as b, Input as x, PagePurpose as ce, Select as le, SelectContent as S, SelectItem as C, SelectTrigger as ue, SelectValue as de, Textarea as fe } from "@burdenoff/fe-libs/ui";
|
|
11
11
|
// src/eventfullymanaged/pages/modules/CommunicationPage.tsx
|
|
12
12
|
function pe(e) {
|
|
13
|
+
if (e.status !== "scheduled") return null;
|
|
13
14
|
let t = e.metadata?.schedule;
|
|
14
15
|
if (!t || typeof t != "object" || Array.isArray(t)) return null;
|
|
15
16
|
let n = t.sendAt;
|
|
@@ -27,7 +28,7 @@ function me(e) {
|
|
|
27
28
|
};
|
|
28
29
|
});
|
|
29
30
|
}
|
|
30
|
-
function
|
|
31
|
+
function he(e) {
|
|
31
32
|
return {
|
|
32
33
|
targetAudience: { segments: e.map(({ id: e }) => e) },
|
|
33
34
|
audienceTagLabels: Object.fromEntries(e.map(({ id: e, label: t }) => [e, t]))
|
|
@@ -49,7 +50,8 @@ function w(e) {
|
|
|
49
50
|
"draft",
|
|
50
51
|
"created",
|
|
51
52
|
"pending",
|
|
52
|
-
"scheduled"
|
|
53
|
+
"scheduled",
|
|
54
|
+
"queued"
|
|
53
55
|
].includes(t) ? "info" : "secondary";
|
|
54
56
|
}
|
|
55
57
|
var T = (e) => {
|
|
@@ -66,54 +68,55 @@ function D() {
|
|
|
66
68
|
}), M = t({
|
|
67
69
|
limit: A.limit,
|
|
68
70
|
offset: A.offset
|
|
69
|
-
}), [
|
|
71
|
+
}), [ge, { loading: _e }] = a(), [ve, { loading: ye }] = r(), [N, { loading: P }] = ee(), [be, { loading: F }] = i(), { data: xe } = n({
|
|
70
72
|
limit: 100,
|
|
71
73
|
offset: 0
|
|
72
|
-
}),
|
|
73
|
-
|
|
74
|
-
},
|
|
75
|
-
if (!
|
|
74
|
+
}), Se = xe?.events?.items ?? [], [I, L] = p("announcement"), [R, z] = p("EMAIL"), [B, V] = p(""), [H, U] = p(""), [W, Ce] = p(""), [G, we] = p([]), [K, q] = p(null), [J, Te] = p(""), [Y, Ee] = p(""), X = f(() => j.data?.announcements.items ?? [], [j.data]), Z = j.data?.announcements.total ?? 0, Q = f(() => M.data?.communicationCampaigns.items ?? [], [M.data]), $ = M.data?.communicationCampaigns.total ?? 0, De = I === "announcement" ? _e : P, Oe = () => {
|
|
75
|
+
V(""), U(""), Ce(""), we([]), z("EMAIL"), Te(""), Ee("");
|
|
76
|
+
}, ke = async () => {
|
|
77
|
+
if (!H.trim()) {
|
|
76
78
|
d.error(O("eventfullymanaged.communication.subjectRequired", "Subject required"), "");
|
|
77
79
|
return;
|
|
78
80
|
}
|
|
79
81
|
if (I === "announcement") {
|
|
80
82
|
let e = {};
|
|
81
|
-
|
|
83
|
+
J.trim() && (e.body = J.trim()), W.trim() && (e.audience = W.trim());
|
|
82
84
|
let t = O("eventfullymanaged.communication.errors.create", "Could not create announcement");
|
|
83
85
|
try {
|
|
84
|
-
let n = await
|
|
85
|
-
title:
|
|
86
|
-
name:
|
|
86
|
+
let n = await ge({ variables: { input: {
|
|
87
|
+
title: H,
|
|
88
|
+
name: H,
|
|
87
89
|
status: "draft",
|
|
88
|
-
eventId:
|
|
90
|
+
eventId: B || void 0,
|
|
89
91
|
metadata: e
|
|
90
92
|
} } });
|
|
91
93
|
if (!u(n, n.data?.upsertAnnouncement?.id, t)) return;
|
|
92
|
-
|
|
94
|
+
Oe(), d.success(O("eventfullymanaged.communication.created", "Announcement created")), await j.refetch();
|
|
93
95
|
} catch (e) {
|
|
94
96
|
d.error(t, l(e));
|
|
95
97
|
}
|
|
96
98
|
return;
|
|
97
99
|
}
|
|
98
100
|
let e = {};
|
|
99
|
-
|
|
101
|
+
J.trim() && (e.content = { body: J.trim() }), G.length > 0 && Object.assign(e, he(G)), Y && (e.schedule = { sendAt: new Date(Y).toISOString() });
|
|
100
102
|
let t = O("eventfullymanaged.communication.errors.createCampaign", "Could not create campaign");
|
|
101
103
|
try {
|
|
102
104
|
let n = await N({ variables: { input: {
|
|
103
|
-
title:
|
|
104
|
-
name:
|
|
105
|
+
title: H,
|
|
106
|
+
name: H,
|
|
105
107
|
status: "draft",
|
|
106
|
-
eventId:
|
|
108
|
+
eventId: B || void 0,
|
|
109
|
+
...R === "IN_APP" ? { campaignChannel: R } : {},
|
|
107
110
|
metadata: e
|
|
108
111
|
} } });
|
|
109
112
|
if (!u(n, n.data?.upsertCommunicationCampaign?.id, t)) return;
|
|
110
|
-
|
|
113
|
+
Oe(), d.success(O("eventfullymanaged.communication.campaignCreated", "Campaign created")), await M.refetch();
|
|
111
114
|
} catch (e) {
|
|
112
115
|
d.error(t, l(e));
|
|
113
116
|
}
|
|
114
|
-
},
|
|
115
|
-
if (!
|
|
116
|
-
let { row: e, tags: t } =
|
|
117
|
+
}, Ae = async () => {
|
|
118
|
+
if (!K?.changed) return;
|
|
119
|
+
let { row: e, tags: t } = K, n = O("eventfullymanaged.communication.errors.saveAudience", "Could not save campaign audience");
|
|
117
120
|
try {
|
|
118
121
|
let r = await N({ variables: {
|
|
119
122
|
id: e.id,
|
|
@@ -124,34 +127,34 @@ function D() {
|
|
|
124
127
|
eventId: e.eventId ?? void 0,
|
|
125
128
|
metadata: {
|
|
126
129
|
...e.metadata,
|
|
127
|
-
...
|
|
130
|
+
...he(t)
|
|
128
131
|
}
|
|
129
132
|
}
|
|
130
133
|
} });
|
|
131
134
|
if (!u(r, r.data?.upsertCommunicationCampaign?.id, n)) return;
|
|
132
|
-
|
|
135
|
+
q(null), d.success(O("eventfullymanaged.communication.audienceSaved", "Campaign audience saved")), await M.refetch();
|
|
133
136
|
} catch (e) {
|
|
134
137
|
d.error(n, l(e));
|
|
135
138
|
}
|
|
136
|
-
},
|
|
139
|
+
}, je = async (e) => {
|
|
137
140
|
let t = O("eventfullymanaged.communication.errors.publish", "Could not publish announcement");
|
|
138
141
|
try {
|
|
139
|
-
let n = await
|
|
142
|
+
let n = await ve({ variables: { id: e.id } });
|
|
140
143
|
if (!u(n, n.data?.publishAnnouncement?.id, t)) return;
|
|
141
144
|
d.success(O("eventfullymanaged.communication.published", "Announcement published")), await j.refetch();
|
|
142
145
|
} catch (e) {
|
|
143
146
|
d.error(t, l(e));
|
|
144
147
|
}
|
|
145
|
-
},
|
|
148
|
+
}, Me = async (e) => {
|
|
146
149
|
let t = O("eventfullymanaged.communication.errors.send", "Could not send campaign");
|
|
147
150
|
try {
|
|
148
|
-
let n = await
|
|
151
|
+
let n = await be({ variables: { id: e.id } });
|
|
149
152
|
if (!u(n, n.data?.sendCommunicationCampaign?.id, t)) return;
|
|
150
|
-
n.data?.sendCommunicationCampaign?.status === "scheduled" ? d.success(O("eventfullymanaged.communication.scheduledAutoSend", "Campaign scheduled. It will be sent automatically at its send time; cancel the schedule to stop it.")) : d.success(O("eventfullymanaged.communication.sent", "Campaign delivery started")), await M.refetch();
|
|
153
|
+
n.data?.sendCommunicationCampaign?.status === "scheduled" ? d.success(O("eventfullymanaged.communication.scheduledAutoSend", "Campaign scheduled. It will be sent automatically at its send time; cancel the schedule to stop it.")) : n.data?.sendCommunicationCampaign?.status === "queued" ? d.success(O("eventfullymanaged.communication.queued", "In-app campaign queued")) : d.success(O("eventfullymanaged.communication.sent", "Campaign delivery started")), await M.refetch();
|
|
151
154
|
} catch (e) {
|
|
152
155
|
d.error(t, l(e));
|
|
153
156
|
}
|
|
154
|
-
},
|
|
157
|
+
}, Ne = async (e) => {
|
|
155
158
|
let t = e.metadata ?? {}, n = Object.fromEntries(Object.entries(t).filter(([e]) => e !== "schedule")), r = O("eventfullymanaged.communication.errors.cancelSchedule", "Could not cancel schedule");
|
|
156
159
|
try {
|
|
157
160
|
let t = await N({ variables: {
|
|
@@ -170,31 +173,31 @@ function D() {
|
|
|
170
173
|
return /* @__PURE__ */ h("div", {
|
|
171
174
|
className: "space-y-6 p-6",
|
|
172
175
|
children: [
|
|
173
|
-
/* @__PURE__ */ m(
|
|
176
|
+
/* @__PURE__ */ m(ce, { children: O("eventfullymanaged.communication.audiencePurpose", "Publish announcements and compose campaigns for an event or workspace. In-app campaigns can target eligible workspace members by attendee tag.") }),
|
|
174
177
|
/* @__PURE__ */ h("div", {
|
|
175
178
|
className: "flex flex-col gap-4 sm:flex-row sm:items-center sm:justify-between",
|
|
176
179
|
children: [/* @__PURE__ */ h("div", { children: [/* @__PURE__ */ m("h1", {
|
|
177
180
|
className: "text-2xl font-bold text-text-primary",
|
|
178
|
-
children: /* @__PURE__ */ m(
|
|
181
|
+
children: /* @__PURE__ */ m(se, { children: O("eventfullymanaged.communication.title", "Communications") })
|
|
179
182
|
}), /* @__PURE__ */ m("p", {
|
|
180
183
|
className: "mt-1 text-sm text-text-secondary",
|
|
181
184
|
children: O("eventfullymanaged.communication.description", "Draft, publish and send from one place.")
|
|
182
185
|
})] }), /* @__PURE__ */ h("div", {
|
|
183
186
|
className: "flex flex-col gap-2 sm:flex-row",
|
|
184
|
-
children: [/* @__PURE__ */ h(
|
|
187
|
+
children: [/* @__PURE__ */ h(v, {
|
|
185
188
|
type: "button",
|
|
186
189
|
variant: I === "announcement" ? "default" : "outline",
|
|
187
190
|
onClick: () => L("announcement"),
|
|
188
|
-
children: [/* @__PURE__ */ m(
|
|
189
|
-
}), /* @__PURE__ */ h(
|
|
191
|
+
children: [/* @__PURE__ */ m(g, { className: "h-4 w-4" }), O("eventfullymanaged.communication.actions.newAnnouncement", "New announcement")]
|
|
192
|
+
}), /* @__PURE__ */ h(v, {
|
|
190
193
|
type: "button",
|
|
191
194
|
variant: I === "campaign" ? "default" : "outline",
|
|
192
195
|
onClick: () => L("campaign"),
|
|
193
|
-
children: [/* @__PURE__ */ m(
|
|
196
|
+
children: [/* @__PURE__ */ m(g, { className: "h-4 w-4" }), O("eventfullymanaged.communication.actions.newCampaign", "New campaign")]
|
|
194
197
|
})]
|
|
195
198
|
})]
|
|
196
199
|
}),
|
|
197
|
-
/* @__PURE__ */ m(
|
|
200
|
+
/* @__PURE__ */ m(y, {
|
|
198
201
|
treatment: "glass",
|
|
199
202
|
glow: !0,
|
|
200
203
|
className: "p-5",
|
|
@@ -205,7 +208,7 @@ function D() {
|
|
|
205
208
|
children: [
|
|
206
209
|
/* @__PURE__ */ h("div", {
|
|
207
210
|
className: "flex items-center gap-2",
|
|
208
|
-
children: [m(I === "announcement" ?
|
|
211
|
+
children: [m(I === "announcement" ? ie : re, { className: "h-4 w-4 text-accent-primary" }), /* @__PURE__ */ m("h2", {
|
|
209
212
|
className: "text-base font-semibold text-text-primary",
|
|
210
213
|
children: I === "announcement" ? O("eventfullymanaged.communication.compose.announcement", "Compose announcement") : O("eventfullymanaged.communication.compose.campaign", "Compose campaign")
|
|
211
214
|
})]
|
|
@@ -217,13 +220,13 @@ function D() {
|
|
|
217
220
|
className: "font-medium text-text-primary",
|
|
218
221
|
children: O("eventfullymanaged.communication.fields.event", "Event (optional)")
|
|
219
222
|
}),
|
|
220
|
-
/* @__PURE__ */ h(
|
|
221
|
-
value:
|
|
222
|
-
onValueChange:
|
|
223
|
+
/* @__PURE__ */ h(le, {
|
|
224
|
+
value: B,
|
|
225
|
+
onValueChange: V,
|
|
223
226
|
children: [/* @__PURE__ */ m(ue, {
|
|
224
227
|
"aria-label": O("eventfullymanaged.communication.fields.event", "Event (optional)"),
|
|
225
228
|
children: /* @__PURE__ */ m(de, { placeholder: O("eventfullymanaged.communication.fields.eventPlaceholder", "All events (workspace-wide)") })
|
|
226
|
-
}), /* @__PURE__ */ m(
|
|
229
|
+
}), /* @__PURE__ */ m(S, { children: Se.map((e) => /* @__PURE__ */ m(C, {
|
|
227
230
|
value: e.id,
|
|
228
231
|
children: e.name
|
|
229
232
|
}, e.id)) })]
|
|
@@ -239,26 +242,52 @@ function D() {
|
|
|
239
242
|
children: [/* @__PURE__ */ m("span", {
|
|
240
243
|
className: "font-medium text-text-primary",
|
|
241
244
|
children: O("eventfullymanaged.communication.fields.subject", "Subject")
|
|
242
|
-
}), /* @__PURE__ */ m(
|
|
243
|
-
value:
|
|
244
|
-
onChange: (e) =>
|
|
245
|
+
}), /* @__PURE__ */ m(x, {
|
|
246
|
+
value: H,
|
|
247
|
+
onChange: (e) => U(e.target.value),
|
|
245
248
|
placeholder: O("eventfullymanaged.communication.fields.subjectPlaceholder", "Q4 Product Roadmap Update"),
|
|
246
249
|
"aria-label": O("eventfullymanaged.communication.fields.subject", "Subject")
|
|
247
250
|
})]
|
|
248
251
|
}),
|
|
249
|
-
I === "campaign" ? /* @__PURE__ */
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
252
|
+
I === "campaign" ? /* @__PURE__ */ h(ne, { children: [/* @__PURE__ */ h("div", {
|
|
253
|
+
className: "block space-y-1 text-sm",
|
|
254
|
+
children: [
|
|
255
|
+
/* @__PURE__ */ m("span", {
|
|
256
|
+
className: "font-medium text-text-primary",
|
|
257
|
+
children: O("eventfullymanaged.communication.fields.channel", "Delivery channel")
|
|
258
|
+
}),
|
|
259
|
+
/* @__PURE__ */ h(le, {
|
|
260
|
+
value: R,
|
|
261
|
+
onValueChange: (e) => z(e === "IN_APP" ? "IN_APP" : "EMAIL"),
|
|
262
|
+
children: [/* @__PURE__ */ m(ue, {
|
|
263
|
+
"aria-label": O("eventfullymanaged.communication.fields.channel", "Delivery channel"),
|
|
264
|
+
children: /* @__PURE__ */ m(de, {})
|
|
265
|
+
}), /* @__PURE__ */ h(S, { children: [/* @__PURE__ */ m(C, {
|
|
266
|
+
value: "EMAIL",
|
|
267
|
+
children: O("eventfullymanaged.communication.channels.email", "Email")
|
|
268
|
+
}), /* @__PURE__ */ m(C, {
|
|
269
|
+
value: "IN_APP",
|
|
270
|
+
children: O("eventfullymanaged.communication.channels.inApp", "In-app")
|
|
271
|
+
})] })]
|
|
272
|
+
}),
|
|
273
|
+
R === "IN_APP" ? /* @__PURE__ */ m("p", {
|
|
274
|
+
className: "text-xs text-text-muted",
|
|
275
|
+
children: O("eventfullymanaged.communication.fields.inAppAudienceHint", "Attendees with active workspace membership and a matching verified account can receive this campaign.")
|
|
276
|
+
}) : null
|
|
277
|
+
]
|
|
278
|
+
}), /* @__PURE__ */ m(o, {
|
|
279
|
+
selected: G,
|
|
280
|
+
onChange: we
|
|
281
|
+
})] }) : /* @__PURE__ */ h("label", {
|
|
253
282
|
className: "block space-y-1 text-sm",
|
|
254
283
|
children: [
|
|
255
284
|
/* @__PURE__ */ m("span", {
|
|
256
285
|
className: "font-medium text-text-primary",
|
|
257
286
|
children: O("eventfullymanaged.communication.fields.announcementAudience", "Audience labels (optional)")
|
|
258
287
|
}),
|
|
259
|
-
/* @__PURE__ */ m(
|
|
260
|
-
value:
|
|
261
|
-
onChange: (e) =>
|
|
288
|
+
/* @__PURE__ */ m(x, {
|
|
289
|
+
value: W,
|
|
290
|
+
onChange: (e) => Ce(e.target.value),
|
|
262
291
|
placeholder: O("eventfullymanaged.communication.fields.audienceSegmentsPlaceholder", "vip, early-bird, speakers (comma-separated segments)"),
|
|
263
292
|
"aria-label": O("eventfullymanaged.communication.fields.announcementAudience", "Audience labels (optional)")
|
|
264
293
|
}),
|
|
@@ -274,8 +303,8 @@ function D() {
|
|
|
274
303
|
className: "font-medium text-text-primary",
|
|
275
304
|
children: O("eventfullymanaged.communication.fields.body", "Message")
|
|
276
305
|
}), /* @__PURE__ */ m(fe, {
|
|
277
|
-
value:
|
|
278
|
-
onChange: (e) =>
|
|
306
|
+
value: J,
|
|
307
|
+
onChange: (e) => Te(e.target.value),
|
|
279
308
|
rows: 5,
|
|
280
309
|
placeholder: O("eventfullymanaged.communication.fields.bodyPlaceholder", "Hi there, here are the latest updates…"),
|
|
281
310
|
"aria-label": O("eventfullymanaged.communication.fields.body", "Message")
|
|
@@ -288,25 +317,25 @@ function D() {
|
|
|
288
317
|
className: "font-medium text-text-primary",
|
|
289
318
|
children: O("eventfullymanaged.communication.fields.scheduleAt", "Schedule send (optional)")
|
|
290
319
|
}),
|
|
291
|
-
/* @__PURE__ */ m(
|
|
320
|
+
/* @__PURE__ */ m(x, {
|
|
292
321
|
type: "datetime-local",
|
|
293
322
|
value: Y,
|
|
294
|
-
onChange: (e) =>
|
|
323
|
+
onChange: (e) => Ee(e.target.value),
|
|
295
324
|
"aria-label": O("eventfullymanaged.communication.fields.scheduleAt", "Schedule send (optional)")
|
|
296
325
|
}),
|
|
297
326
|
/* @__PURE__ */ m("span", {
|
|
298
327
|
className: "block text-xs text-text-muted",
|
|
299
|
-
children: O("eventfullymanaged.communication.fields.
|
|
328
|
+
children: O("eventfullymanaged.communication.fields.automaticScheduleHint", "Click Send campaign to arm the schedule. The campaign starts at the chosen local time. Leave it blank to send now.")
|
|
300
329
|
})
|
|
301
330
|
]
|
|
302
331
|
}) : null,
|
|
303
332
|
/* @__PURE__ */ m("div", {
|
|
304
333
|
className: "flex justify-end",
|
|
305
|
-
children: /* @__PURE__ */ m(
|
|
334
|
+
children: /* @__PURE__ */ m(v, {
|
|
306
335
|
type: "button",
|
|
307
|
-
disabled:
|
|
308
|
-
onClick:
|
|
309
|
-
children:
|
|
336
|
+
disabled: De,
|
|
337
|
+
onClick: ke,
|
|
338
|
+
children: De ? O("eventfullymanaged.communication.actions.saving", "Saving…") : O(I === "announcement" ? "eventfullymanaged.communication.actions.createAnnouncement" : "eventfullymanaged.communication.actions.createCampaign", "Create draft")
|
|
310
339
|
})
|
|
311
340
|
})
|
|
312
341
|
]
|
|
@@ -316,8 +345,8 @@ function D() {
|
|
|
316
345
|
className: "flex items-center justify-between border-b border-border-seam pb-2",
|
|
317
346
|
children: [/* @__PURE__ */ h("span", {
|
|
318
347
|
className: "flex items-center gap-2 text-xs font-medium uppercase tracking-wide text-text-muted",
|
|
319
|
-
children: [/* @__PURE__ */ m(
|
|
320
|
-
}), /* @__PURE__ */ m(
|
|
348
|
+
children: [/* @__PURE__ */ m(re, { className: "h-3.5 w-3.5" }), O("eventfullymanaged.communication.preview.label", "Preview")]
|
|
349
|
+
}), /* @__PURE__ */ m(_, {
|
|
321
350
|
variant: "info",
|
|
322
351
|
className: "uppercase",
|
|
323
352
|
children: O("eventfullymanaged.communication.preview.draft", "Draft")
|
|
@@ -327,20 +356,20 @@ function D() {
|
|
|
327
356
|
children: [
|
|
328
357
|
/* @__PURE__ */ m("p", {
|
|
329
358
|
className: "text-base font-semibold text-text-primary",
|
|
330
|
-
children:
|
|
359
|
+
children: H.trim() || O("eventfullymanaged.communication.preview.noSubject", "Your subject line")
|
|
331
360
|
}),
|
|
332
|
-
(I === "campaign" ?
|
|
361
|
+
(I === "campaign" ? G.length > 0 : W.trim()) ? /* @__PURE__ */ h("p", {
|
|
333
362
|
className: "text-xs text-text-secondary",
|
|
334
363
|
children: [
|
|
335
364
|
O("eventfullymanaged.communication.preview.to", "To"),
|
|
336
365
|
":",
|
|
337
366
|
" ",
|
|
338
|
-
I === "campaign" ?
|
|
367
|
+
I === "campaign" ? G.map(({ label: e }) => e).join(", ") : W.trim()
|
|
339
368
|
]
|
|
340
369
|
}) : null,
|
|
341
370
|
/* @__PURE__ */ m("p", {
|
|
342
371
|
className: "whitespace-pre-wrap text-sm text-text-secondary",
|
|
343
|
-
children:
|
|
372
|
+
children: J.trim() || O("eventfullymanaged.communication.preview.noBody", "Start typing to see your message preview here.")
|
|
344
373
|
})
|
|
345
374
|
]
|
|
346
375
|
})]
|
|
@@ -349,7 +378,7 @@ function D() {
|
|
|
349
378
|
}),
|
|
350
379
|
/* @__PURE__ */ h("div", {
|
|
351
380
|
className: "grid grid-cols-1 gap-6 lg:grid-cols-2",
|
|
352
|
-
children: [/* @__PURE__ */ h(
|
|
381
|
+
children: [/* @__PURE__ */ h(y, {
|
|
353
382
|
treatment: "plain",
|
|
354
383
|
className: "border-border-seam p-5",
|
|
355
384
|
children: [/* @__PURE__ */ h("div", {
|
|
@@ -366,7 +395,7 @@ function D() {
|
|
|
366
395
|
children: [j.loading && X.length === 0 ? /* @__PURE__ */ m("p", {
|
|
367
396
|
className: "py-8 text-center text-sm text-text-secondary",
|
|
368
397
|
children: O("eventfullymanaged.communication.announcements.loading", "Loading announcements…")
|
|
369
|
-
}) : X.length === 0 ? /* @__PURE__ */ m(
|
|
398
|
+
}) : X.length === 0 ? /* @__PURE__ */ m(b, {
|
|
370
399
|
illustration: "empty-data",
|
|
371
400
|
title: O("eventfullymanaged.communication.announcements.empty", "No announcements yet."),
|
|
372
401
|
className: "py-8"
|
|
@@ -379,16 +408,16 @@ function D() {
|
|
|
379
408
|
children: E(e, O("eventfullymanaged.communication.announcements.itemPrefix", "Announcement"))
|
|
380
409
|
}), /* @__PURE__ */ h("div", {
|
|
381
410
|
className: "flex shrink-0 items-center gap-2",
|
|
382
|
-
children: [e.status ? /* @__PURE__ */ m(
|
|
411
|
+
children: [e.status ? /* @__PURE__ */ m(_, {
|
|
383
412
|
variant: w(e.status),
|
|
384
413
|
className: "uppercase",
|
|
385
414
|
children: e.status
|
|
386
|
-
}) : null, T(e.status) ? /* @__PURE__ */ h(
|
|
415
|
+
}) : null, T(e.status) ? /* @__PURE__ */ h(v, {
|
|
387
416
|
type: "button",
|
|
388
417
|
size: "sm",
|
|
389
|
-
disabled:
|
|
390
|
-
onClick: () => void
|
|
391
|
-
children: [/* @__PURE__ */ m(
|
|
418
|
+
disabled: ye,
|
|
419
|
+
onClick: () => void je(e),
|
|
420
|
+
children: [/* @__PURE__ */ m(oe, { className: "h-3.5 w-3.5" }), O("eventfullymanaged.communication.actions.publish", "Publish")]
|
|
392
421
|
}) : null]
|
|
393
422
|
})]
|
|
394
423
|
}, e.id))
|
|
@@ -403,7 +432,7 @@ function D() {
|
|
|
403
432
|
loading: j.loading
|
|
404
433
|
})]
|
|
405
434
|
})]
|
|
406
|
-
}), /* @__PURE__ */ h(
|
|
435
|
+
}), /* @__PURE__ */ h(y, {
|
|
407
436
|
treatment: "plain",
|
|
408
437
|
className: "border-border-seam p-5",
|
|
409
438
|
children: [/* @__PURE__ */ h("div", {
|
|
@@ -418,32 +447,32 @@ function D() {
|
|
|
418
447
|
}), /* @__PURE__ */ h("div", {
|
|
419
448
|
className: "mt-4",
|
|
420
449
|
children: [
|
|
421
|
-
|
|
450
|
+
K ? /* @__PURE__ */ h("div", {
|
|
422
451
|
className: "mb-4 space-y-3 rounded-card border border-border-seam bg-bg-surface p-4",
|
|
423
452
|
children: [
|
|
424
453
|
/* @__PURE__ */ m("p", {
|
|
425
454
|
className: "font-medium text-text-primary",
|
|
426
|
-
children: E(
|
|
455
|
+
children: E(K.row, "Campaign")
|
|
427
456
|
}),
|
|
428
457
|
/* @__PURE__ */ m(o, {
|
|
429
|
-
selected:
|
|
430
|
-
onChange: (e) =>
|
|
431
|
-
...
|
|
458
|
+
selected: K.tags,
|
|
459
|
+
onChange: (e) => q({
|
|
460
|
+
...K,
|
|
432
461
|
tags: e,
|
|
433
462
|
changed: !0
|
|
434
463
|
})
|
|
435
|
-
},
|
|
464
|
+
}, K.row.id),
|
|
436
465
|
/* @__PURE__ */ h("div", {
|
|
437
466
|
className: "flex flex-wrap gap-2",
|
|
438
|
-
children: [/* @__PURE__ */ m(
|
|
467
|
+
children: [/* @__PURE__ */ m(v, {
|
|
439
468
|
type: "button",
|
|
440
|
-
disabled: P || !
|
|
441
|
-
onClick: () => void
|
|
469
|
+
disabled: P || !K.changed,
|
|
470
|
+
onClick: () => void Ae(),
|
|
442
471
|
children: O("eventfullymanaged.communication.actions.saveAudience", "Save audience")
|
|
443
|
-
}), /* @__PURE__ */ m(
|
|
472
|
+
}), /* @__PURE__ */ m(v, {
|
|
444
473
|
type: "button",
|
|
445
474
|
variant: "outline",
|
|
446
|
-
onClick: () =>
|
|
475
|
+
onClick: () => q(null),
|
|
447
476
|
children: O("eventfullymanaged.communication.actions.dismissAudience", "Close audience editor")
|
|
448
477
|
})]
|
|
449
478
|
})
|
|
@@ -452,61 +481,76 @@ function D() {
|
|
|
452
481
|
M.loading && Q.length === 0 ? /* @__PURE__ */ m("p", {
|
|
453
482
|
className: "py-8 text-center text-sm text-text-secondary",
|
|
454
483
|
children: O("eventfullymanaged.communication.campaigns.loading", "Loading campaigns…")
|
|
455
|
-
}) : Q.length === 0 ? /* @__PURE__ */ m(
|
|
484
|
+
}) : Q.length === 0 ? /* @__PURE__ */ m(b, {
|
|
456
485
|
illustration: "empty-data",
|
|
457
486
|
title: O("eventfullymanaged.communication.campaigns.empty", "No campaigns yet."),
|
|
458
487
|
className: "py-8"
|
|
459
488
|
}) : /* @__PURE__ */ m("ul", {
|
|
460
489
|
className: "space-y-2.5",
|
|
461
490
|
children: Q.map((e) => {
|
|
462
|
-
let t = pe(e);
|
|
491
|
+
let t = pe(e), n = e.metrics?.lastDispatch, r = n && typeof n == "object" && "deliveredCount" in n ? n.deliveredCount : void 0, i = n && typeof n == "object" && "failedCount" in n ? n.failedCount : void 0;
|
|
463
492
|
return /* @__PURE__ */ h("li", {
|
|
464
493
|
className: "flex items-center justify-between gap-3 rounded-card border border-border-seam bg-bg-surface p-3 transition-[box-shadow,border-color] duration-200 hover:border-border-strong hover:shadow-elevation-1",
|
|
465
494
|
children: [/* @__PURE__ */ h("div", {
|
|
466
495
|
className: "min-w-0",
|
|
467
|
-
children: [
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
496
|
+
children: [
|
|
497
|
+
/* @__PURE__ */ m("p", {
|
|
498
|
+
className: "truncate font-medium text-text-primary",
|
|
499
|
+
children: E(e, O("eventfullymanaged.communication.campaigns.itemPrefix", "Campaign"))
|
|
500
|
+
}),
|
|
501
|
+
t ? /* @__PURE__ */ h("p", {
|
|
502
|
+
className: "truncate text-xs text-text-muted",
|
|
503
|
+
children: [
|
|
504
|
+
O("eventfullymanaged.communication.campaigns.scheduledFor", "Scheduled for"),
|
|
505
|
+
" ",
|
|
506
|
+
new Date(t).toLocaleString()
|
|
507
|
+
]
|
|
508
|
+
}) : null,
|
|
509
|
+
typeof r == "number" && typeof i == "number" ? /* @__PURE__ */ h("p", {
|
|
510
|
+
className: "text-xs text-text-muted",
|
|
511
|
+
children: [
|
|
512
|
+
O("eventfullymanaged.communication.campaigns.deliveredCount", "Delivered"),
|
|
513
|
+
" ",
|
|
514
|
+
r,
|
|
515
|
+
" · ",
|
|
516
|
+
O("eventfullymanaged.communication.campaigns.failedCount", "Failed"),
|
|
517
|
+
" ",
|
|
518
|
+
i
|
|
519
|
+
]
|
|
520
|
+
}) : null
|
|
521
|
+
]
|
|
478
522
|
}), /* @__PURE__ */ h("div", {
|
|
479
523
|
className: "flex shrink-0 items-center gap-2",
|
|
480
524
|
children: [
|
|
481
|
-
e.status ? /* @__PURE__ */ m(
|
|
525
|
+
e.status ? /* @__PURE__ */ m(_, {
|
|
482
526
|
variant: w(e.status),
|
|
483
527
|
className: "uppercase",
|
|
484
528
|
children: e.status
|
|
485
529
|
}) : null,
|
|
486
|
-
e.status?.toLowerCase() === "draft" ? /* @__PURE__ */ m(
|
|
530
|
+
e.status?.toLowerCase() === "draft" ? /* @__PURE__ */ m(v, {
|
|
487
531
|
type: "button",
|
|
488
532
|
size: "sm",
|
|
489
533
|
variant: "outline",
|
|
490
534
|
disabled: P || F,
|
|
491
|
-
onClick: () =>
|
|
535
|
+
onClick: () => q({
|
|
492
536
|
row: e,
|
|
493
537
|
tags: me(e),
|
|
494
538
|
changed: !1
|
|
495
539
|
}),
|
|
496
540
|
children: O("eventfullymanaged.communication.actions.editAudience", "Edit audience")
|
|
497
541
|
}) : null,
|
|
498
|
-
T(e.status) ? /* @__PURE__ */ h(
|
|
542
|
+
T(e.status) ? /* @__PURE__ */ h(v, {
|
|
499
543
|
type: "button",
|
|
500
544
|
size: "sm",
|
|
501
|
-
disabled: F ||
|
|
502
|
-
onClick: () => void
|
|
503
|
-
children: [/* @__PURE__ */ m(
|
|
545
|
+
disabled: F || K?.row.id === e.id,
|
|
546
|
+
onClick: () => void Me(e),
|
|
547
|
+
children: [/* @__PURE__ */ m(ae, { className: "h-3.5 w-3.5" }), O("eventfullymanaged.communication.actions.send", "Send campaign")]
|
|
504
548
|
}) : null,
|
|
505
|
-
(e.status ?? "").toLowerCase() === "scheduled" ? /* @__PURE__ */ m(
|
|
549
|
+
(e.status ?? "").toLowerCase() === "scheduled" ? /* @__PURE__ */ m(v, {
|
|
506
550
|
type: "button",
|
|
507
551
|
size: "sm",
|
|
508
552
|
variant: "outline",
|
|
509
|
-
onClick: () => void
|
|
553
|
+
onClick: () => void Ne(e),
|
|
510
554
|
children: O("eventfullymanaged.communication.actions.cancelSchedule", "Cancel schedule")
|
|
511
555
|
}) : null
|
|
512
556
|
]
|