@aglyn/plugins-email 1.0.0-beta.143 → 1.0.0-beta.145
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/README.md +84 -6
- package/package.json +17 -17
package/README.md
CHANGED
|
@@ -1,7 +1,85 @@
|
|
|
1
|
-
# @aglyn/plugins-
|
|
1
|
+
# @aglyn/plugins-email
|
|
2
2
|
|
|
3
|
-
The
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
3
|
+
The Email plugin for Aglyn: email designs built in Besigner from email-safe blocks, plus the topics, audience lists, sending domains and suppressions that mail rides on. Install it if you are running or building on the Aglyn platform and want designed email.
|
|
4
|
+
|
|
5
|
+
> Beta. Published from the Aglyn monorepo under the `beta` dist-tag; APIs can change between beta releases.
|
|
6
|
+
|
|
7
|
+
## Install
|
|
8
|
+
|
|
9
|
+
npm install @aglyn/plugins-email@beta
|
|
10
|
+
|
|
11
|
+
Peer dependencies:
|
|
12
|
+
|
|
13
|
+
- `@mui/material`
|
|
14
|
+
- `@mui/x-data-grid`
|
|
15
|
+
- `firebase`
|
|
16
|
+
- `firebase-admin`
|
|
17
|
+
- `next`
|
|
18
|
+
- `react`
|
|
19
|
+
|
|
20
|
+
None is optional. `firebase-admin` and `next` are used by the server half (`@aglyn/plugins-email/server`).
|
|
21
|
+
|
|
22
|
+
## What's in it
|
|
23
|
+
|
|
24
|
+
This package is a first-party Aglyn plugin. It is loaded through Aglyn's plugin manager: the apps read its entry in the monorepo's `plugins.config.json`, import the module each surface names, and call the registrar declared for that surface. It is not a standalone library; installing it on its own loads nothing.
|
|
25
|
+
|
|
26
|
+
This plugin owns email designs, the topic catalog, lists, sending identities and domains, and suppressions. It does not own campaigns: sending a campaign, and the message list, report and composer pages, belong to the marketing plugin (`@aglyn/plugins-marketing`). The two meet through zones each hosts for the other, described below.
|
|
27
|
+
|
|
28
|
+
### In Besigner
|
|
29
|
+
|
|
30
|
+
`registerEmailPlugin()` registers the email blocks as canvas components: `emailSection`, `emailText`, `emailRichtext`, `emailImage`, `emailButton`, `emailDivider`, `emailSpacer`, `emailProduct` and `emailHtml`. An email is designed like any screen, and the core's email renderer turns the same node tree into inline-styled table HTML and plain text at send time.
|
|
31
|
+
|
|
32
|
+
### In the console
|
|
33
|
+
|
|
34
|
+
`registerEmailConsole()` registers:
|
|
35
|
+
|
|
36
|
+
- An **Emails** nav item and page at `/emails`, with the sections Messages, Templates, Audiences, Topics, Sending and Suppressions as routes. It requires the `data.manage` permission and is code-split.
|
|
37
|
+
- Two zones this plugin hosts for the plugin that owns campaigns: the whole body of the Messages section, and the recipients table under a template's report. This package draws neither.
|
|
38
|
+
- Five widgets drawn in zones the campaign owner's pages host: `campaignTopicSelect`, `campaignTopicOptions`, `campaignSenderEditor`, `campaignDesignCreate` and `campaignDesignPreview`. Each reports back through a callback; none writes a campaign.
|
|
39
|
+
|
|
40
|
+
### On the server
|
|
41
|
+
|
|
42
|
+
`@aglyn/plugins-email/server` imports `firebase-admin` and is kept out of the client entry point.
|
|
43
|
+
|
|
44
|
+
- `registerEmailApi()` (the `tenantApi` surface) registers the recipient-facing pages behind signed links: `email/unsubscribe`, `email/resubscribe`, `email/preferences` and `email/confirm`.
|
|
45
|
+
- `registerEmailConsoleApi()` (the `consoleApi` surface) registers list membership routes (`email/list-rule-preview`, `email/list-members-preview`, `email/list-members-add`), the staged list import routes, the suppression routes, and an email design draft writer on the core's resource-drafts seam.
|
|
46
|
+
|
|
47
|
+
Routes are served by the host app's API dispatcher under `/api/`.
|
|
48
|
+
|
|
49
|
+
### Entry points
|
|
50
|
+
|
|
51
|
+
| import | contents |
|
|
52
|
+
| -- | -- |
|
|
53
|
+
| `@aglyn/plugins-email` | `BUNDLE_ID`, the email block components and their schemas, `registerEmailConsole`, the site half, and the model (template reports, sending-domain status, and report types re-exported from `@aglyn/shared-ui-email-campaigns`) |
|
|
54
|
+
| `@aglyn/plugins-email/site` | `registerEmailPlugin` and `EMAIL_BUNDLE` only, with no console code |
|
|
55
|
+
| `@aglyn/plugins-email/server` | `registerEmailApi`, `registerEmailConsoleApi` and the list handlers |
|
|
56
|
+
| `@aglyn/plugins-email/*` | any module under `src/lib/`. Console components are deep-imported from `@aglyn/plugins-email/components/...` and are deliberately not re-exported from the root |
|
|
57
|
+
|
|
58
|
+
## Usage
|
|
59
|
+
|
|
60
|
+
The registrars are normally called by Aglyn's generated plugin loaders. Called directly:
|
|
61
|
+
|
|
62
|
+
```ts
|
|
63
|
+
// Canvas half
|
|
64
|
+
import { registerEmailPlugin } from '@aglyn/plugins-email/site'
|
|
65
|
+
registerEmailPlugin()
|
|
66
|
+
|
|
67
|
+
// Console app
|
|
68
|
+
import { registerEmailConsole } from '@aglyn/plugins-email'
|
|
69
|
+
registerEmailConsole()
|
|
70
|
+
|
|
71
|
+
// Server-only API dispatcher
|
|
72
|
+
import {
|
|
73
|
+
registerEmailApi,
|
|
74
|
+
registerEmailConsoleApi,
|
|
75
|
+
} from '@aglyn/plugins-email/server'
|
|
76
|
+
registerEmailApi()
|
|
77
|
+
```
|
|
78
|
+
|
|
79
|
+
## How it fits
|
|
80
|
+
|
|
81
|
+
A plugin may import the tenant runtime, the renderer, the Besigner logic, the core and the shared packages. It never imports another plugin, and the core never imports a plugin. Email depends on `@aglyn/aglyn`, `@aglyn/tenant-data-admin`, `@aglyn/tenant-feature-instance` and `@aglyn/shared-*` packages, including `@aglyn/shared-ui-email-campaigns` and `@aglyn/shared-util-email`. Its relationship with the marketing plugin runs entirely through plugin zones and widget slots registered with the core, so neither package imports the other.
|
|
82
|
+
|
|
83
|
+
## License
|
|
84
|
+
|
|
85
|
+
Apache-2.0. Source: https://github.com/aglyn/aglyn/tree/main/libs/plugins/email
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aglyn/plugins-email",
|
|
3
|
-
"version": "1.0.0-beta.
|
|
3
|
+
"version": "1.0.0-beta.145",
|
|
4
4
|
"license": "Apache-2.0",
|
|
5
5
|
"homepage": "https://aglyn.com",
|
|
6
6
|
"repository": {
|
|
@@ -25,22 +25,22 @@
|
|
|
25
25
|
"./package.json": "./package.json"
|
|
26
26
|
},
|
|
27
27
|
"dependencies": {
|
|
28
|
-
"@aglyn/aglyn": "1.0.0-beta.
|
|
29
|
-
"@aglyn/shared-data-enums": "1.0.0-beta.
|
|
30
|
-
"@aglyn/shared-data-mdi": "1.0.0-beta.
|
|
31
|
-
"@aglyn/shared-data-types": "1.0.0-beta.
|
|
32
|
-
"@aglyn/shared-ui-email-campaigns": "1.0.0-beta.
|
|
33
|
-
"@aglyn/shared-ui-jsx": "1.0.0-beta.
|
|
34
|
-
"@aglyn/shared-ui-jsx-forms": "1.0.0-beta.
|
|
35
|
-
"@aglyn/shared-ui-next": "1.0.0-beta.
|
|
36
|
-
"@aglyn/shared-ui-snackstack": "1.0.0-beta.
|
|
37
|
-
"@aglyn/shared-ui-theme": "1.0.0-beta.
|
|
38
|
-
"@aglyn/shared-util-email": "1.0.0-beta.
|
|
39
|
-
"@aglyn/shared-util-http": "1.0.0-beta.
|
|
40
|
-
"@aglyn/shared-util-timestamp": "1.0.0-beta.
|
|
41
|
-
"@aglyn/shared-util-tools": "1.0.0-beta.
|
|
42
|
-
"@aglyn/tenant-data-admin": "1.0.0-beta.
|
|
43
|
-
"@aglyn/tenant-feature-instance": "1.0.0-beta.
|
|
28
|
+
"@aglyn/aglyn": "1.0.0-beta.145",
|
|
29
|
+
"@aglyn/shared-data-enums": "1.0.0-beta.145",
|
|
30
|
+
"@aglyn/shared-data-mdi": "1.0.0-beta.145",
|
|
31
|
+
"@aglyn/shared-data-types": "1.0.0-beta.145",
|
|
32
|
+
"@aglyn/shared-ui-email-campaigns": "1.0.0-beta.145",
|
|
33
|
+
"@aglyn/shared-ui-jsx": "1.0.0-beta.145",
|
|
34
|
+
"@aglyn/shared-ui-jsx-forms": "1.0.0-beta.145",
|
|
35
|
+
"@aglyn/shared-ui-next": "1.0.0-beta.145",
|
|
36
|
+
"@aglyn/shared-ui-snackstack": "1.0.0-beta.145",
|
|
37
|
+
"@aglyn/shared-ui-theme": "1.0.0-beta.145",
|
|
38
|
+
"@aglyn/shared-util-email": "1.0.0-beta.145",
|
|
39
|
+
"@aglyn/shared-util-http": "1.0.0-beta.145",
|
|
40
|
+
"@aglyn/shared-util-timestamp": "1.0.0-beta.145",
|
|
41
|
+
"@aglyn/shared-util-tools": "1.0.0-beta.145",
|
|
42
|
+
"@aglyn/tenant-data-admin": "1.0.0-beta.145",
|
|
43
|
+
"@aglyn/tenant-feature-instance": "1.0.0-beta.145",
|
|
44
44
|
"@swc/helpers": "0.5.23"
|
|
45
45
|
},
|
|
46
46
|
"peerDependencies": {
|