payload-plugin-newsletter 0.12.2 → 0.12.3

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.
@@ -2,7 +2,7 @@ export { MagicLinkVerify, MagicLinkVerifyProps, NewsletterForm, PreferencesForm,
2
2
  export { PreferencesFormProps, SignupFormProps, Subscriber } from './types.cjs';
3
3
  import React from 'react';
4
4
  import { SerializedEditorState } from 'lexical';
5
- import { RichTextField } from 'payload';
5
+ import { RichTextField, DefaultCellComponentProps } from 'payload';
6
6
 
7
7
  interface EmailPreviewProps {
8
8
  content: SerializedEditorState | null;
@@ -50,6 +50,12 @@ interface EmailRendererProps {
50
50
  }
51
51
  declare const EmailRenderer: React.FC<EmailRendererProps>;
52
52
 
53
+ declare const StatusBadge: React.FC<DefaultCellComponentProps>;
54
+
55
+ declare const ActionsCell: React.FC<DefaultCellComponentProps>;
56
+
57
+ declare const EmptyField: React.FC;
58
+
53
59
  interface BroadcastTemplateProps {
54
60
  subject: string;
55
61
  preheader?: string;
@@ -57,4 +63,4 @@ interface BroadcastTemplateProps {
57
63
  }
58
64
  declare const DefaultBroadcastTemplate: React.FC<BroadcastTemplateProps>;
59
65
 
60
- export { BroadcastEditor, BroadcastInlinePreview, BroadcastPreviewField, type BroadcastTemplateProps, DefaultBroadcastTemplate, EmailPreview, EmailPreviewField, EmailRenderer, PreviewControls };
66
+ export { ActionsCell, BroadcastEditor, BroadcastInlinePreview, BroadcastPreviewField, type BroadcastTemplateProps, DefaultBroadcastTemplate, EmailPreview, EmailPreviewField, EmailRenderer, EmptyField, PreviewControls, StatusBadge };
@@ -2,7 +2,7 @@ export { MagicLinkVerify, MagicLinkVerifyProps, NewsletterForm, PreferencesForm,
2
2
  export { PreferencesFormProps, SignupFormProps, Subscriber } from './types.js';
3
3
  import React from 'react';
4
4
  import { SerializedEditorState } from 'lexical';
5
- import { RichTextField } from 'payload';
5
+ import { RichTextField, DefaultCellComponentProps } from 'payload';
6
6
 
7
7
  interface EmailPreviewProps {
8
8
  content: SerializedEditorState | null;
@@ -50,6 +50,12 @@ interface EmailRendererProps {
50
50
  }
51
51
  declare const EmailRenderer: React.FC<EmailRendererProps>;
52
52
 
53
+ declare const StatusBadge: React.FC<DefaultCellComponentProps>;
54
+
55
+ declare const ActionsCell: React.FC<DefaultCellComponentProps>;
56
+
57
+ declare const EmptyField: React.FC;
58
+
53
59
  interface BroadcastTemplateProps {
54
60
  subject: string;
55
61
  preheader?: string;
@@ -57,4 +63,4 @@ interface BroadcastTemplateProps {
57
63
  }
58
64
  declare const DefaultBroadcastTemplate: React.FC<BroadcastTemplateProps>;
59
65
 
60
- export { BroadcastEditor, BroadcastInlinePreview, BroadcastPreviewField, type BroadcastTemplateProps, DefaultBroadcastTemplate, EmailPreview, EmailPreviewField, EmailRenderer, PreviewControls };
66
+ export { ActionsCell, BroadcastEditor, BroadcastInlinePreview, BroadcastPreviewField, type BroadcastTemplateProps, DefaultBroadcastTemplate, EmailPreview, EmailPreviewField, EmailRenderer, EmptyField, PreviewControls, StatusBadge };
@@ -2124,7 +2124,516 @@ var BroadcastPreviewField = () => {
2124
2124
  color: "#6b7280"
2125
2125
  }, children: "Email preview is available inline below the content editor." });
2126
2126
  };
2127
+
2128
+ // src/components/Broadcasts/StatusBadge.tsx
2129
+ import { jsx as jsx12 } from "react/jsx-runtime";
2130
+ var statusConfig = {
2131
+ ["draft" /* DRAFT */]: {
2132
+ label: "Draft",
2133
+ color: "#6B7280",
2134
+ // gray
2135
+ backgroundColor: "#F3F4F6"
2136
+ },
2137
+ ["scheduled" /* SCHEDULED */]: {
2138
+ label: "Scheduled",
2139
+ color: "#2563EB",
2140
+ // blue
2141
+ backgroundColor: "#DBEAFE"
2142
+ },
2143
+ ["sending" /* SENDING */]: {
2144
+ label: "Sending",
2145
+ color: "#D97706",
2146
+ // yellow/orange
2147
+ backgroundColor: "#FEF3C7"
2148
+ },
2149
+ ["sent" /* SENT */]: {
2150
+ label: "Sent",
2151
+ color: "#059669",
2152
+ // green
2153
+ backgroundColor: "#D1FAE5"
2154
+ },
2155
+ ["failed" /* FAILED */]: {
2156
+ label: "Failed",
2157
+ color: "#DC2626",
2158
+ // red
2159
+ backgroundColor: "#FEE2E2"
2160
+ },
2161
+ ["paused" /* PAUSED */]: {
2162
+ label: "Paused",
2163
+ color: "#9333EA",
2164
+ // purple
2165
+ backgroundColor: "#EDE9FE"
2166
+ },
2167
+ ["canceled" /* CANCELED */]: {
2168
+ label: "Canceled",
2169
+ color: "#6B7280",
2170
+ // gray
2171
+ backgroundColor: "#F3F4F6"
2172
+ }
2173
+ };
2174
+ var StatusBadge = ({ cellData }) => {
2175
+ const status = cellData;
2176
+ const config = statusConfig[status] || statusConfig["draft" /* DRAFT */];
2177
+ return /* @__PURE__ */ jsx12(
2178
+ "span",
2179
+ {
2180
+ style: {
2181
+ display: "inline-flex",
2182
+ alignItems: "center",
2183
+ padding: "2px 10px",
2184
+ borderRadius: "12px",
2185
+ fontSize: "12px",
2186
+ fontWeight: "500",
2187
+ color: config.color,
2188
+ backgroundColor: config.backgroundColor
2189
+ },
2190
+ children: config.label
2191
+ }
2192
+ );
2193
+ };
2194
+
2195
+ // src/components/Broadcasts/ActionsCell.tsx
2196
+ import { useState as useState11 } from "react";
2197
+
2198
+ // src/components/Broadcasts/SendBroadcastModal.tsx
2199
+ import { useState as useState10, useEffect as useEffect6 } from "react";
2200
+ import { Fragment as Fragment3, jsx as jsx13, jsxs as jsxs11 } from "react/jsx-runtime";
2201
+ var SendBroadcastModal = ({
2202
+ broadcast,
2203
+ onClose,
2204
+ onSuccess
2205
+ }) => {
2206
+ const [loading, setLoading] = useState10(false);
2207
+ const [error, setError] = useState10(null);
2208
+ const [selectedAudiences, setSelectedAudiences] = useState10([]);
2209
+ const [audiences, setAudiences] = useState10([]);
2210
+ const [providerCapabilities, setProviderCapabilities] = useState10(null);
2211
+ const [sendMode, setSendMode] = useState10("now");
2212
+ const [scheduledDate, setScheduledDate] = useState10("");
2213
+ const [scheduledTime, setScheduledTime] = useState10("");
2214
+ useEffect6(() => {
2215
+ const fetchData = async () => {
2216
+ try {
2217
+ setAudiences([
2218
+ { id: "all", name: "All Subscribers", subscriberCount: 1e3 },
2219
+ { id: "active", name: "Active Subscribers", subscriberCount: 850 }
2220
+ ]);
2221
+ if (broadcast.channel?.providerType === "broadcast") {
2222
+ setProviderCapabilities({ supportsScheduling: true });
2223
+ } else {
2224
+ setProviderCapabilities({ supportsScheduling: false });
2225
+ }
2226
+ } catch (err) {
2227
+ console.error("Failed to fetch modal data:", err);
2228
+ }
2229
+ };
2230
+ fetchData();
2231
+ }, [broadcast.channel]);
2232
+ const handleSubmit = async (e) => {
2233
+ e.preventDefault();
2234
+ setError(null);
2235
+ setLoading(true);
2236
+ try {
2237
+ if (sendMode === "now") {
2238
+ const response = await fetch(`/api/broadcasts/${broadcast.id}/send`, {
2239
+ method: "POST",
2240
+ headers: {
2241
+ "Content-Type": "application/json"
2242
+ },
2243
+ body: JSON.stringify({
2244
+ audienceIds: selectedAudiences.length > 0 ? selectedAudiences : void 0
2245
+ })
2246
+ });
2247
+ if (!response.ok) {
2248
+ const data = await response.json();
2249
+ throw new Error(data.error || "Failed to send broadcast");
2250
+ }
2251
+ alert(`Broadcast "${broadcast.name}" has been sent successfully`);
2252
+ } else {
2253
+ if (!scheduledDate || !scheduledTime) {
2254
+ throw new Error("Please select both date and time for scheduling");
2255
+ }
2256
+ const scheduledAt = (/* @__PURE__ */ new Date(`${scheduledDate}T${scheduledTime}`)).toISOString();
2257
+ const response = await fetch(`/api/broadcasts/${broadcast.id}/schedule`, {
2258
+ method: "POST",
2259
+ headers: {
2260
+ "Content-Type": "application/json"
2261
+ },
2262
+ body: JSON.stringify({
2263
+ scheduledAt,
2264
+ audienceIds: selectedAudiences.length > 0 ? selectedAudiences : void 0
2265
+ })
2266
+ });
2267
+ if (!response.ok) {
2268
+ const data = await response.json();
2269
+ throw new Error(data.error || "Failed to schedule broadcast");
2270
+ }
2271
+ alert(`Broadcast "${broadcast.name}" has been scheduled successfully`);
2272
+ }
2273
+ onSuccess();
2274
+ } catch (err) {
2275
+ setError(err instanceof Error ? err.message : "An error occurred");
2276
+ } finally {
2277
+ setLoading(false);
2278
+ }
2279
+ };
2280
+ const handleAudienceToggle = (audienceId) => {
2281
+ setSelectedAudiences(
2282
+ (prev) => prev.includes(audienceId) ? prev.filter((id) => id !== audienceId) : [...prev, audienceId]
2283
+ );
2284
+ };
2285
+ const now = /* @__PURE__ */ new Date();
2286
+ const minDate = now.toISOString().split("T")[0];
2287
+ const minTime = now.toTimeString().slice(0, 5);
2288
+ return /* @__PURE__ */ jsx13("div", { style: {
2289
+ position: "fixed",
2290
+ top: 0,
2291
+ left: 0,
2292
+ right: 0,
2293
+ bottom: 0,
2294
+ backgroundColor: "rgba(0, 0, 0, 0.5)",
2295
+ display: "flex",
2296
+ alignItems: "center",
2297
+ justifyContent: "center",
2298
+ zIndex: 9999
2299
+ }, children: /* @__PURE__ */ jsxs11("div", { style: {
2300
+ backgroundColor: "white",
2301
+ borderRadius: "8px",
2302
+ padding: "32px",
2303
+ maxWidth: "500px",
2304
+ width: "90%",
2305
+ maxHeight: "90vh",
2306
+ overflowY: "auto"
2307
+ }, children: [
2308
+ /* @__PURE__ */ jsxs11("h2", { style: { marginTop: 0, marginBottom: "24px" }, children: [
2309
+ "Send Broadcast: ",
2310
+ broadcast.name
2311
+ ] }),
2312
+ /* @__PURE__ */ jsxs11("form", { onSubmit: handleSubmit, children: [
2313
+ /* @__PURE__ */ jsxs11("div", { style: { marginBottom: "24px" }, children: [
2314
+ /* @__PURE__ */ jsx13("label", { style: { fontWeight: "bold", display: "block", marginBottom: "8px" }, children: "When to send:" }),
2315
+ /* @__PURE__ */ jsxs11("div", { style: { display: "flex", gap: "16px" }, children: [
2316
+ /* @__PURE__ */ jsxs11("label", { style: { display: "flex", alignItems: "center", cursor: "pointer" }, children: [
2317
+ /* @__PURE__ */ jsx13(
2318
+ "input",
2319
+ {
2320
+ type: "radio",
2321
+ value: "now",
2322
+ checked: sendMode === "now",
2323
+ onChange: (e) => setSendMode(e.target.value),
2324
+ style: { marginRight: "8px" }
2325
+ }
2326
+ ),
2327
+ "Send Now"
2328
+ ] }),
2329
+ providerCapabilities?.supportsScheduling && /* @__PURE__ */ jsxs11("label", { style: { display: "flex", alignItems: "center", cursor: "pointer" }, children: [
2330
+ /* @__PURE__ */ jsx13(
2331
+ "input",
2332
+ {
2333
+ type: "radio",
2334
+ value: "schedule",
2335
+ checked: sendMode === "schedule",
2336
+ onChange: (e) => setSendMode(e.target.value),
2337
+ style: { marginRight: "8px" }
2338
+ }
2339
+ ),
2340
+ "Schedule for Later"
2341
+ ] })
2342
+ ] })
2343
+ ] }),
2344
+ sendMode === "schedule" && /* @__PURE__ */ jsxs11("div", { style: { marginBottom: "24px" }, children: [
2345
+ /* @__PURE__ */ jsx13("label", { style: { fontWeight: "bold", display: "block", marginBottom: "8px" }, children: "Schedule Date & Time:" }),
2346
+ /* @__PURE__ */ jsxs11("div", { style: { display: "flex", gap: "8px" }, children: [
2347
+ /* @__PURE__ */ jsx13(
2348
+ "input",
2349
+ {
2350
+ type: "date",
2351
+ value: scheduledDate,
2352
+ onChange: (e) => setScheduledDate(e.target.value),
2353
+ min: minDate,
2354
+ required: sendMode === "schedule",
2355
+ style: {
2356
+ padding: "8px 12px",
2357
+ border: "1px solid #D1D5DB",
2358
+ borderRadius: "4px",
2359
+ flex: 1
2360
+ }
2361
+ }
2362
+ ),
2363
+ /* @__PURE__ */ jsx13(
2364
+ "input",
2365
+ {
2366
+ type: "time",
2367
+ value: scheduledTime,
2368
+ onChange: (e) => setScheduledTime(e.target.value),
2369
+ min: scheduledDate === minDate ? minTime : void 0,
2370
+ required: sendMode === "schedule",
2371
+ style: {
2372
+ padding: "8px 12px",
2373
+ border: "1px solid #D1D5DB",
2374
+ borderRadius: "4px",
2375
+ flex: 1
2376
+ }
2377
+ }
2378
+ )
2379
+ ] })
2380
+ ] }),
2381
+ audiences.length > 0 && /* @__PURE__ */ jsxs11("div", { style: { marginBottom: "24px" }, children: [
2382
+ /* @__PURE__ */ jsx13("label", { style: { fontWeight: "bold", display: "block", marginBottom: "8px" }, children: "Target Audiences (optional):" }),
2383
+ /* @__PURE__ */ jsx13("div", { style: {
2384
+ border: "1px solid #D1D5DB",
2385
+ borderRadius: "4px",
2386
+ maxHeight: "200px",
2387
+ overflowY: "auto"
2388
+ }, children: audiences.map((audience) => /* @__PURE__ */ jsxs11(
2389
+ "label",
2390
+ {
2391
+ style: {
2392
+ display: "flex",
2393
+ alignItems: "center",
2394
+ padding: "12px",
2395
+ borderBottom: "1px solid #E5E7EB",
2396
+ cursor: "pointer",
2397
+ backgroundColor: selectedAudiences.includes(audience.id) ? "#F3F4F6" : "transparent"
2398
+ },
2399
+ children: [
2400
+ /* @__PURE__ */ jsx13(
2401
+ "input",
2402
+ {
2403
+ type: "checkbox",
2404
+ checked: selectedAudiences.includes(audience.id),
2405
+ onChange: () => handleAudienceToggle(audience.id),
2406
+ style: { marginRight: "12px" }
2407
+ }
2408
+ ),
2409
+ /* @__PURE__ */ jsxs11("div", { style: { flex: 1 }, children: [
2410
+ /* @__PURE__ */ jsx13("div", { style: { fontWeight: 500 }, children: audience.name }),
2411
+ /* @__PURE__ */ jsxs11("div", { style: { fontSize: "14px", color: "#6B7280" }, children: [
2412
+ audience.subscriberCount.toLocaleString(),
2413
+ " subscribers"
2414
+ ] })
2415
+ ] })
2416
+ ]
2417
+ },
2418
+ audience.id
2419
+ )) }),
2420
+ selectedAudiences.length === 0 && /* @__PURE__ */ jsx13("p", { style: { fontSize: "14px", color: "#6B7280", marginTop: "8px" }, children: "If no audiences are selected, the broadcast will be sent to all subscribers." })
2421
+ ] }),
2422
+ /* @__PURE__ */ jsxs11("div", { style: {
2423
+ backgroundColor: "#F3F4F6",
2424
+ padding: "16px",
2425
+ borderRadius: "4px",
2426
+ marginBottom: "24px"
2427
+ }, children: [
2428
+ /* @__PURE__ */ jsx13("h4", { style: { marginTop: 0, marginBottom: "8px" }, children: "Summary" }),
2429
+ /* @__PURE__ */ jsxs11("p", { style: { margin: 0, fontSize: "14px" }, children: [
2430
+ /* @__PURE__ */ jsx13("strong", { children: "Subject:" }),
2431
+ " ",
2432
+ broadcast.subject,
2433
+ /* @__PURE__ */ jsx13("br", {}),
2434
+ /* @__PURE__ */ jsx13("strong", { children: "Channel:" }),
2435
+ " ",
2436
+ broadcast.channel?.name || "Unknown",
2437
+ /* @__PURE__ */ jsx13("br", {}),
2438
+ /* @__PURE__ */ jsx13("strong", { children: "Provider:" }),
2439
+ " ",
2440
+ broadcast.channel?.providerType || "Unknown",
2441
+ /* @__PURE__ */ jsx13("br", {}),
2442
+ /* @__PURE__ */ jsx13("strong", { children: "When:" }),
2443
+ " ",
2444
+ sendMode === "now" ? "Immediately" : `${scheduledDate} at ${scheduledTime}`,
2445
+ /* @__PURE__ */ jsx13("br", {}),
2446
+ selectedAudiences.length > 0 && /* @__PURE__ */ jsxs11(Fragment3, { children: [
2447
+ /* @__PURE__ */ jsx13("strong", { children: "Audiences:" }),
2448
+ " ",
2449
+ selectedAudiences.length,
2450
+ " selected"
2451
+ ] })
2452
+ ] })
2453
+ ] }),
2454
+ error && /* @__PURE__ */ jsx13("div", { style: {
2455
+ backgroundColor: "#FEE2E2",
2456
+ border: "1px solid #FCA5A5",
2457
+ color: "#DC2626",
2458
+ padding: "12px",
2459
+ borderRadius: "4px",
2460
+ marginBottom: "24px"
2461
+ }, children: error }),
2462
+ /* @__PURE__ */ jsxs11("div", { style: { display: "flex", justifyContent: "flex-end", gap: "12px" }, children: [
2463
+ /* @__PURE__ */ jsx13(
2464
+ "button",
2465
+ {
2466
+ type: "button",
2467
+ onClick: onClose,
2468
+ disabled: loading,
2469
+ style: {
2470
+ padding: "8px 24px",
2471
+ backgroundColor: "#E5E7EB",
2472
+ color: "#1F2937",
2473
+ border: "none",
2474
+ borderRadius: "4px",
2475
+ fontSize: "16px",
2476
+ cursor: loading ? "not-allowed" : "pointer",
2477
+ opacity: loading ? 0.6 : 1
2478
+ },
2479
+ children: "Cancel"
2480
+ }
2481
+ ),
2482
+ /* @__PURE__ */ jsx13(
2483
+ "button",
2484
+ {
2485
+ type: "submit",
2486
+ disabled: loading,
2487
+ style: {
2488
+ padding: "8px 24px",
2489
+ backgroundColor: "#2563EB",
2490
+ color: "white",
2491
+ border: "none",
2492
+ borderRadius: "4px",
2493
+ fontSize: "16px",
2494
+ cursor: loading ? "not-allowed" : "pointer",
2495
+ opacity: loading ? 0.6 : 1
2496
+ },
2497
+ children: loading ? "Processing..." : sendMode === "now" ? "Send Now" : "Schedule"
2498
+ }
2499
+ )
2500
+ ] })
2501
+ ] })
2502
+ ] }) });
2503
+ };
2504
+
2505
+ // src/components/Broadcasts/ActionsCell.tsx
2506
+ import { Fragment as Fragment4, jsx as jsx14, jsxs as jsxs12 } from "react/jsx-runtime";
2507
+ var ActionsCell = ({ rowData }) => {
2508
+ const [loading, setLoading] = useState11(false);
2509
+ const [showSendModal, setShowSendModal] = useState11(false);
2510
+ const broadcast = rowData;
2511
+ const handleSend = () => {
2512
+ if (!broadcast.providerId) {
2513
+ alert("This broadcast has not been synced with the provider yet");
2514
+ return;
2515
+ }
2516
+ setShowSendModal(true);
2517
+ };
2518
+ const handleSchedule = () => {
2519
+ if (!broadcast.providerId) {
2520
+ alert("This broadcast has not been synced with the provider yet");
2521
+ return;
2522
+ }
2523
+ setShowSendModal(true);
2524
+ };
2525
+ const handleDuplicate = async () => {
2526
+ try {
2527
+ setLoading(true);
2528
+ const response = await fetch(`/api/broadcasts/${broadcast.id}`);
2529
+ const data = await response.json();
2530
+ delete data.id;
2531
+ delete data.createdAt;
2532
+ delete data.updatedAt;
2533
+ delete data.providerId;
2534
+ delete data.sentAt;
2535
+ delete data.scheduledAt;
2536
+ delete data.analytics;
2537
+ data.name = `${data.name} (Copy)`;
2538
+ data.status = "draft" /* DRAFT */;
2539
+ const createResponse = await fetch("/api/broadcasts", {
2540
+ method: "POST",
2541
+ headers: {
2542
+ "Content-Type": "application/json"
2543
+ },
2544
+ body: JSON.stringify(data)
2545
+ });
2546
+ if (!createResponse.ok) {
2547
+ throw new Error("Failed to duplicate broadcast");
2548
+ }
2549
+ alert("Broadcast duplicated successfully");
2550
+ window.location.reload();
2551
+ } catch (error) {
2552
+ alert(error instanceof Error ? error.message : "Failed to duplicate broadcast");
2553
+ } finally {
2554
+ setLoading(false);
2555
+ }
2556
+ };
2557
+ const canSend = broadcast.status === "draft" /* DRAFT */;
2558
+ const canSchedule = broadcast.status === "draft" /* DRAFT */;
2559
+ const canDuplicate = true;
2560
+ return /* @__PURE__ */ jsxs12(Fragment4, { children: [
2561
+ /* @__PURE__ */ jsxs12("div", { style: { display: "flex", gap: "8px", alignItems: "center" }, children: [
2562
+ canSend && /* @__PURE__ */ jsx14(
2563
+ "button",
2564
+ {
2565
+ onClick: handleSend,
2566
+ disabled: loading,
2567
+ style: {
2568
+ padding: "4px 12px",
2569
+ backgroundColor: "#2563EB",
2570
+ color: "white",
2571
+ border: "none",
2572
+ borderRadius: "4px",
2573
+ fontSize: "12px",
2574
+ cursor: loading ? "not-allowed" : "pointer",
2575
+ opacity: loading ? 0.6 : 1
2576
+ },
2577
+ children: "Send"
2578
+ }
2579
+ ),
2580
+ canSchedule && /* @__PURE__ */ jsx14(
2581
+ "button",
2582
+ {
2583
+ onClick: handleSchedule,
2584
+ disabled: loading,
2585
+ style: {
2586
+ padding: "4px 12px",
2587
+ backgroundColor: "#6366F1",
2588
+ color: "white",
2589
+ border: "none",
2590
+ borderRadius: "4px",
2591
+ fontSize: "12px",
2592
+ cursor: loading ? "not-allowed" : "pointer",
2593
+ opacity: loading ? 0.6 : 1
2594
+ },
2595
+ children: "Schedule"
2596
+ }
2597
+ ),
2598
+ canDuplicate && /* @__PURE__ */ jsx14(
2599
+ "button",
2600
+ {
2601
+ onClick: handleDuplicate,
2602
+ disabled: loading,
2603
+ style: {
2604
+ padding: "4px 12px",
2605
+ backgroundColor: "#6B7280",
2606
+ color: "white",
2607
+ border: "none",
2608
+ borderRadius: "4px",
2609
+ fontSize: "12px",
2610
+ cursor: loading ? "not-allowed" : "pointer",
2611
+ opacity: loading ? 0.6 : 1
2612
+ },
2613
+ children: "Duplicate"
2614
+ }
2615
+ )
2616
+ ] }),
2617
+ showSendModal && /* @__PURE__ */ jsx14(
2618
+ SendBroadcastModal,
2619
+ {
2620
+ broadcast,
2621
+ onClose: () => setShowSendModal(false),
2622
+ onSuccess: () => {
2623
+ setShowSendModal(false);
2624
+ window.location.reload();
2625
+ }
2626
+ }
2627
+ )
2628
+ ] });
2629
+ };
2630
+
2631
+ // src/components/Broadcasts/EmptyField.tsx
2632
+ var EmptyField = () => {
2633
+ return null;
2634
+ };
2127
2635
  export {
2636
+ ActionsCell,
2128
2637
  BroadcastEditor,
2129
2638
  BroadcastInlinePreview,
2130
2639
  BroadcastPreviewField,
@@ -2132,10 +2641,12 @@ export {
2132
2641
  EmailPreview,
2133
2642
  EmailPreviewField,
2134
2643
  EmailRenderer,
2644
+ EmptyField,
2135
2645
  MagicLinkVerify,
2136
2646
  NewsletterForm,
2137
2647
  PreferencesForm,
2138
2648
  PreviewControls,
2649
+ StatusBadge,
2139
2650
  createMagicLinkVerify,
2140
2651
  createNewsletterForm,
2141
2652
  createPreferencesForm,