payload-plugin-newsletter 0.13.1 → 0.13.2
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/CHANGELOG.md +14 -0
- package/dist/components.cjs +3 -3
- package/dist/components.cjs.map +1 -1
- package/dist/components.js +3 -3
- package/dist/components.js.map +1 -1
- package/dist/index.cjs +15 -15
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +15 -15
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -3793,11 +3793,19 @@ var createBroadcastsCollection = (pluginConfig) => {
|
|
|
3793
3793
|
plural: "Broadcasts"
|
|
3794
3794
|
},
|
|
3795
3795
|
admin: {
|
|
3796
|
-
useAsTitle: "
|
|
3796
|
+
useAsTitle: "subject",
|
|
3797
3797
|
description: "Individual email campaigns sent to subscribers",
|
|
3798
|
-
defaultColumns: ["
|
|
3798
|
+
defaultColumns: ["subject", "status", "sentAt", "recipientCount", "actions"]
|
|
3799
3799
|
},
|
|
3800
3800
|
fields: [
|
|
3801
|
+
{
|
|
3802
|
+
name: "subject",
|
|
3803
|
+
type: "text",
|
|
3804
|
+
required: true,
|
|
3805
|
+
admin: {
|
|
3806
|
+
description: "Email subject line"
|
|
3807
|
+
}
|
|
3808
|
+
},
|
|
3801
3809
|
{
|
|
3802
3810
|
type: "row",
|
|
3803
3811
|
fields: [
|
|
@@ -3812,14 +3820,6 @@ var createBroadcastsCollection = (pluginConfig) => {
|
|
|
3812
3820
|
}
|
|
3813
3821
|
},
|
|
3814
3822
|
fields: [
|
|
3815
|
-
{
|
|
3816
|
-
name: "subject",
|
|
3817
|
-
type: "text",
|
|
3818
|
-
required: true,
|
|
3819
|
-
admin: {
|
|
3820
|
-
description: "Email subject line"
|
|
3821
|
-
}
|
|
3822
|
-
},
|
|
3823
3823
|
{
|
|
3824
3824
|
name: "preheader",
|
|
3825
3825
|
type: "text",
|
|
@@ -4030,9 +4030,9 @@ var createBroadcastsCollection = (pluginConfig) => {
|
|
|
4030
4030
|
const provider = new BroadcastApiProvider2(providerConfig);
|
|
4031
4031
|
const htmlContent = await convertToEmailSafeHtml(doc.contentSection?.content);
|
|
4032
4032
|
const providerBroadcast = await provider.create({
|
|
4033
|
-
name: doc.
|
|
4033
|
+
name: doc.subject,
|
|
4034
4034
|
// Use subject as name since we removed the name field
|
|
4035
|
-
subject: doc.
|
|
4035
|
+
subject: doc.subject,
|
|
4036
4036
|
preheader: doc.contentSection?.preheader,
|
|
4037
4037
|
content: htmlContent,
|
|
4038
4038
|
trackOpens: doc.settings?.trackOpens,
|
|
@@ -4077,9 +4077,9 @@ var createBroadcastsCollection = (pluginConfig) => {
|
|
|
4077
4077
|
return data;
|
|
4078
4078
|
}
|
|
4079
4079
|
const updates = {};
|
|
4080
|
-
if (data.
|
|
4081
|
-
updates.name = data.
|
|
4082
|
-
updates.subject = data.
|
|
4080
|
+
if (data.subject !== originalDoc.subject) {
|
|
4081
|
+
updates.name = data.subject;
|
|
4082
|
+
updates.subject = data.subject;
|
|
4083
4083
|
}
|
|
4084
4084
|
if (data.contentSection?.preheader !== originalDoc.contentSection?.preheader) updates.preheader = data.contentSection?.preheader;
|
|
4085
4085
|
if (data.contentSection?.content !== originalDoc.contentSection?.content) {
|