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 CHANGED
@@ -1,3 +1,17 @@
1
+ ## [0.13.2] - 2025-07-21
2
+
3
+ ### Fixed
4
+ - Fixed `useAsTitle` configuration error in Broadcasts collection
5
+ - Moved `subject` field to top level as Payload v3 doesn't support nested field references in `useAsTitle`
6
+ - Updated all component references from `contentSection.subject` to `subject`
7
+ - Maintained split-screen layout with subject field appearing above the content sections
8
+
9
+ ### Breaking Changes
10
+ - The `subject` field location has changed in the data structure:
11
+ - Old: `broadcast.contentSection.subject`
12
+ - New: `broadcast.subject`
13
+ - If you have existing broadcasts, you may need to migrate the subject field data
14
+
1
15
  ## [0.13.1] - 2025-07-21
2
16
 
3
17
  ### Fixed
@@ -1447,7 +1447,7 @@ var EmailPreviewField = () => {
1447
1447
  const [validationSummary, setValidationSummary] = (0, import_react6.useState)("");
1448
1448
  const fields = (0, import_ui.useFormFields)(([fields2]) => ({
1449
1449
  content: fields2["contentSection.content"],
1450
- subject: fields2["contentSection.subject"],
1450
+ subject: fields2["subject"],
1451
1451
  preheader: fields2["contentSection.preheader"],
1452
1452
  channel: fields2.channel
1453
1453
  }));
@@ -1588,7 +1588,7 @@ 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["contentSection.subject"],
1591
+ subject: fields2["subject"],
1592
1592
  preheader: fields2["contentSection.preheader"]
1593
1593
  }));
1594
1594
  const handleValidation = (0, import_react7.useCallback)((result) => {
@@ -2031,7 +2031,7 @@ 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["contentSection.subject"]?.value,
2034
+ subject: fields2["subject"]?.value,
2035
2035
  preheader: fields2["contentSection.preheader"]?.value,
2036
2036
  content: fields2["contentSection.content"]?.value
2037
2037
  }));