payload-plugin-newsletter 0.14.2 → 0.15.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 +33 -0
- package/README.md +45 -0
- package/dist/collections.cjs +1952 -0
- package/dist/collections.cjs.map +1 -0
- package/dist/collections.d.cts +8 -0
- package/dist/collections.d.ts +8 -0
- package/dist/collections.js +1956 -0
- package/dist/collections.js.map +1 -0
- package/dist/fields.cjs +330 -123
- package/dist/fields.cjs.map +1 -1
- package/dist/fields.d.cts +15 -4
- package/dist/fields.d.ts +15 -4
- package/dist/fields.js +317 -123
- package/dist/fields.js.map +1 -1
- package/dist/index.cjs +146 -128
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +146 -128
- package/dist/index.js.map +1 -1
- package/dist/types.d.cts +15 -2
- package/dist/types.d.ts +15 -2
- package/package.json +11 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,36 @@
|
|
|
1
|
+
## [0.15.0] - 2025-07-27
|
|
2
|
+
|
|
3
|
+
### Added
|
|
4
|
+
- **Plugin Extensibility System** - New customization API for extending the Broadcasts collection
|
|
5
|
+
- `additionalFields` - Add custom fields to the Broadcasts collection
|
|
6
|
+
- `customBlocks` - Extend the email content editor with custom blocks
|
|
7
|
+
- `fieldOverrides` - Override default field configurations (e.g., content field customization)
|
|
8
|
+
- Full TypeScript support for all customization options
|
|
9
|
+
- **New Export Paths** for advanced usage
|
|
10
|
+
- `payload-plugin-newsletter/fields` - Access field factories and configurations
|
|
11
|
+
- `payload-plugin-newsletter/collections` - Access collection factories
|
|
12
|
+
- Export `createEmailSafeFeatures` function for custom rich text configurations
|
|
13
|
+
- **Comprehensive Documentation** - New extension points guide with examples and best practices
|
|
14
|
+
- Email-safe block creation guidelines
|
|
15
|
+
- TypeScript support documentation
|
|
16
|
+
- Migration and backward compatibility information
|
|
17
|
+
|
|
18
|
+
### Improved
|
|
19
|
+
- Enhanced `createEmailContentField` to accept `additionalBlocks` parameter
|
|
20
|
+
- Maintained full backward compatibility with existing installations
|
|
21
|
+
- Added examples for e-commerce, SaaS, and content marketing use cases
|
|
22
|
+
|
|
23
|
+
### Technical
|
|
24
|
+
- Updated build configuration to include new export paths
|
|
25
|
+
- Added proper TypeScript interfaces for customization options
|
|
26
|
+
- Enhanced field and collection factories for better extensibility
|
|
27
|
+
|
|
28
|
+
## [0.14.3] - 2025-07-23
|
|
29
|
+
|
|
30
|
+
### Fixed
|
|
31
|
+
- Sign-in emails now use the magic link subject line from Newsletter Settings
|
|
32
|
+
- Broadcast provider now properly sends the from name along with the email address
|
|
33
|
+
|
|
1
34
|
## [0.14.2] - 2025-07-22
|
|
2
35
|
|
|
3
36
|
### Added
|
package/README.md
CHANGED
|
@@ -725,6 +725,51 @@ newsletterPlugin({
|
|
|
725
725
|
})
|
|
726
726
|
```
|
|
727
727
|
|
|
728
|
+
### Extending the Broadcasts Collection (v0.15.0+)
|
|
729
|
+
|
|
730
|
+
You can extend the Broadcasts collection with additional fields and custom blocks:
|
|
731
|
+
|
|
732
|
+
```typescript
|
|
733
|
+
import type { Block } from 'payload'
|
|
734
|
+
|
|
735
|
+
const customBlock: Block = {
|
|
736
|
+
slug: 'product-spotlight',
|
|
737
|
+
labels: { singular: 'Product Spotlight', plural: 'Product Spotlights' },
|
|
738
|
+
fields: [
|
|
739
|
+
{ name: 'product', type: 'relationship', relationTo: 'products', required: true },
|
|
740
|
+
{ name: 'description', type: 'textarea' }
|
|
741
|
+
]
|
|
742
|
+
}
|
|
743
|
+
|
|
744
|
+
newsletterPlugin({
|
|
745
|
+
// ... existing config
|
|
746
|
+
customizations: {
|
|
747
|
+
broadcasts: {
|
|
748
|
+
additionalFields: [
|
|
749
|
+
{
|
|
750
|
+
name: 'slug',
|
|
751
|
+
type: 'text',
|
|
752
|
+
required: true,
|
|
753
|
+
admin: { position: 'sidebar' }
|
|
754
|
+
}
|
|
755
|
+
],
|
|
756
|
+
customBlocks: [customBlock],
|
|
757
|
+
fieldOverrides: {
|
|
758
|
+
content: (defaultField) => ({
|
|
759
|
+
...defaultField,
|
|
760
|
+
admin: {
|
|
761
|
+
...defaultField.admin,
|
|
762
|
+
description: 'Custom description'
|
|
763
|
+
}
|
|
764
|
+
})
|
|
765
|
+
}
|
|
766
|
+
}
|
|
767
|
+
}
|
|
768
|
+
})
|
|
769
|
+
```
|
|
770
|
+
|
|
771
|
+
For complete extensibility documentation, see the [Extension Points Guide](./docs/architecture/extension-points.md).
|
|
772
|
+
|
|
728
773
|
## Troubleshooting
|
|
729
774
|
|
|
730
775
|
### Common Issues
|