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.
@@ -1394,9 +1394,9 @@ var EmailPreviewField = () => {
1394
1394
  const [isValid, setIsValid] = useState6(true);
1395
1395
  const [validationSummary, setValidationSummary] = useState6("");
1396
1396
  const fields = useFormFields(([fields2]) => ({
1397
- content: fields2.content,
1398
- subject: fields2.subject,
1399
- preheader: fields2.preheader,
1397
+ content: fields2["contentSection.content"],
1398
+ subject: fields2["contentSection.subject"],
1399
+ preheader: fields2["contentSection.preheader"],
1400
1400
  channel: fields2.channel
1401
1401
  }));
1402
1402
  const handleValidation = (result) => {
@@ -1536,8 +1536,8 @@ var BroadcastEditor = (props) => {
1536
1536
  const [isValid, setIsValid] = useState7(true);
1537
1537
  const [validationSummary, setValidationSummary] = useState7("");
1538
1538
  const fields = useFormFields2(([fields2]) => ({
1539
- subject: fields2.subject,
1540
- preheader: fields2.preheader
1539
+ subject: fields2["contentSection.subject"],
1540
+ preheader: fields2["contentSection.preheader"]
1541
1541
  }));
1542
1542
  const handleValidation = useCallback2((result) => {
1543
1543
  setIsValid(result.valid);
@@ -1989,9 +1989,9 @@ var BroadcastInlinePreview = () => {
1989
1989
  const [previewData, setPreviewData] = useState9(null);
1990
1990
  const [error, setError] = useState9(null);
1991
1991
  const fields = useFormFields3(([fields2]) => ({
1992
- subject: fields2.subject?.value,
1993
- preheader: fields2.preheader?.value,
1994
- content: fields2.content?.value
1992
+ subject: fields2["contentSection.subject"]?.value,
1993
+ preheader: fields2["contentSection.preheader"]?.value,
1994
+ content: fields2["contentSection.content"]?.value
1995
1995
  }));
1996
1996
  const updatePreview = useCallback4(async () => {
1997
1997
  if (!fields.content) {
@@ -2022,10 +2022,12 @@ var BroadcastInlinePreview = () => {
2022
2022
  }
2023
2023
  }, [fields]);
2024
2024
  const containerStyle = {
2025
- marginTop: "2rem",
2026
2025
  border: "1px solid #e5e7eb",
2027
2026
  borderRadius: "8px",
2028
- overflow: "hidden"
2027
+ overflow: "hidden",
2028
+ height: "100%",
2029
+ display: "flex",
2030
+ flexDirection: "column"
2029
2031
  };
2030
2032
  const headerStyle = {
2031
2033
  display: "flex",
@@ -2042,10 +2044,11 @@ var BroadcastInlinePreview = () => {
2042
2044
  margin: 0
2043
2045
  };
2044
2046
  const previewContainerStyle = {
2045
- height: "600px",
2047
+ flex: 1,
2046
2048
  display: "flex",
2047
2049
  flexDirection: "column",
2048
- background: "#f3f4f6"
2050
+ background: "#f3f4f6",
2051
+ minHeight: "600px"
2049
2052
  };
2050
2053
  const errorStyle = {
2051
2054
  padding: "2rem",