payload-plugin-newsletter 0.12.3 → 0.13.0

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 CHANGED
@@ -1,3 +1,17 @@
1
+ ## [0.13.0] - 2025-07-21
2
+
3
+ ### Changed
4
+ - **BREAKING**: Broadcasts collection field structure has been updated for improved layout
5
+ - Fields `subject`, `preheader`, and `content` are now nested under `contentSection` group
6
+ - Email preview is now displayed side-by-side with content fields on desktop screens
7
+ - Responsive design switches to vertical layout on screens smaller than 1024px
8
+
9
+ ### Migration Guide
10
+ If you have existing broadcast data, you'll need to migrate the field structure:
11
+ - `subject` → `contentSection.subject`
12
+ - `preheader` → `contentSection.preheader`
13
+ - `content` → `contentSection.content`
14
+
1
15
  ## [0.12.3] - 2025-07-20
2
16
 
3
17
  ### Fixed
@@ -1446,9 +1446,9 @@ var EmailPreviewField = () => {
1446
1446
  const [isValid, setIsValid] = (0, import_react6.useState)(true);
1447
1447
  const [validationSummary, setValidationSummary] = (0, import_react6.useState)("");
1448
1448
  const fields = (0, import_ui.useFormFields)(([fields2]) => ({
1449
- content: fields2.content,
1450
- subject: fields2.subject,
1451
- preheader: fields2.preheader,
1449
+ content: fields2["contentSection.content"],
1450
+ subject: fields2["contentSection.subject"],
1451
+ preheader: fields2["contentSection.preheader"],
1452
1452
  channel: fields2.channel
1453
1453
  }));
1454
1454
  const handleValidation = (result) => {
@@ -1588,8 +1588,8 @@ var BroadcastEditor = (props) => {
1588
1588
  const [isValid, setIsValid] = (0, import_react7.useState)(true);
1589
1589
  const [validationSummary, setValidationSummary] = (0, import_react7.useState)("");
1590
1590
  const fields = (0, import_ui2.useFormFields)(([fields2]) => ({
1591
- subject: fields2.subject,
1592
- preheader: fields2.preheader
1591
+ subject: fields2["contentSection.subject"],
1592
+ preheader: fields2["contentSection.preheader"]
1593
1593
  }));
1594
1594
  const handleValidation = (0, import_react7.useCallback)((result) => {
1595
1595
  setIsValid(result.valid);
@@ -2031,9 +2031,9 @@ var BroadcastInlinePreview = () => {
2031
2031
  const [previewData, setPreviewData] = (0, import_react9.useState)(null);
2032
2032
  const [error, setError] = (0, import_react9.useState)(null);
2033
2033
  const fields = (0, import_ui3.useFormFields)(([fields2]) => ({
2034
- subject: fields2.subject?.value,
2035
- preheader: fields2.preheader?.value,
2036
- content: fields2.content?.value
2034
+ subject: fields2["contentSection.subject"]?.value,
2035
+ preheader: fields2["contentSection.preheader"]?.value,
2036
+ content: fields2["contentSection.content"]?.value
2037
2037
  }));
2038
2038
  const updatePreview = (0, import_react9.useCallback)(async () => {
2039
2039
  if (!fields.content) {
@@ -2064,10 +2064,12 @@ var BroadcastInlinePreview = () => {
2064
2064
  }
2065
2065
  }, [fields]);
2066
2066
  const containerStyle = {
2067
- marginTop: "2rem",
2068
2067
  border: "1px solid #e5e7eb",
2069
2068
  borderRadius: "8px",
2070
- overflow: "hidden"
2069
+ overflow: "hidden",
2070
+ height: "100%",
2071
+ display: "flex",
2072
+ flexDirection: "column"
2071
2073
  };
2072
2074
  const headerStyle = {
2073
2075
  display: "flex",
@@ -2084,10 +2086,11 @@ var BroadcastInlinePreview = () => {
2084
2086
  margin: 0
2085
2087
  };
2086
2088
  const previewContainerStyle = {
2087
- height: "600px",
2089
+ flex: 1,
2088
2090
  display: "flex",
2089
2091
  flexDirection: "column",
2090
- background: "#f3f4f6"
2092
+ background: "#f3f4f6",
2093
+ minHeight: "600px"
2091
2094
  };
2092
2095
  const errorStyle = {
2093
2096
  padding: "2rem",