@bigbinary/neeto-email-delivery-frontend 1.0.1
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 +150 -0
- package/app/javascript/src/translations/ar.json +5 -0
- package/app/javascript/src/translations/bg.json +5 -0
- package/app/javascript/src/translations/ca.json +5 -0
- package/app/javascript/src/translations/cs.json +5 -0
- package/app/javascript/src/translations/da.json +5 -0
- package/app/javascript/src/translations/de.json +5 -0
- package/app/javascript/src/translations/en.json +80 -0
- package/app/javascript/src/translations/es-MX.json +5 -0
- package/app/javascript/src/translations/es.json +5 -0
- package/app/javascript/src/translations/et.json +5 -0
- package/app/javascript/src/translations/fi.json +5 -0
- package/app/javascript/src/translations/fil.json +5 -0
- package/app/javascript/src/translations/fr.json +5 -0
- package/app/javascript/src/translations/hi.json +5 -0
- package/app/javascript/src/translations/hr.json +5 -0
- package/app/javascript/src/translations/id.json +5 -0
- package/app/javascript/src/translations/index.js +3 -0
- package/app/javascript/src/translations/it.json +5 -0
- package/app/javascript/src/translations/ja.json +5 -0
- package/app/javascript/src/translations/ko.json +5 -0
- package/app/javascript/src/translations/nl.json +5 -0
- package/app/javascript/src/translations/pl.json +5 -0
- package/app/javascript/src/translations/pt-BR.json +5 -0
- package/app/javascript/src/translations/pt.json +5 -0
- package/app/javascript/src/translations/ro.json +5 -0
- package/app/javascript/src/translations/ru.json +5 -0
- package/app/javascript/src/translations/sk.json +5 -0
- package/app/javascript/src/translations/sl.json +5 -0
- package/app/javascript/src/translations/sv.json +5 -0
- package/app/javascript/src/translations/th.json +5 -0
- package/app/javascript/src/translations/tr.json +5 -0
- package/app/javascript/src/translations/uk.json +5 -0
- package/app/javascript/src/translations/vi.json +5 -0
- package/app/javascript/src/translations/zh-CN.json +5 -0
- package/app/javascript/src/translations/zh-TW.json +5 -0
- package/dist/EmailDeliveryScreen.js +419 -0
- package/dist/EmailDeliveryScreen.js.map +1 -0
- package/dist/SparkpostDomainSetup.js +119 -0
- package/dist/SparkpostDomainSetup.js.map +1 -0
- package/dist/SparkpostDomainVerify.js +265 -0
- package/dist/SparkpostDomainVerify.js.map +1 -0
- package/dist/cjs/EmailDeliveryScreen.js +421 -0
- package/dist/cjs/EmailDeliveryScreen.js.map +1 -0
- package/dist/cjs/SparkpostDomainSetup.js +121 -0
- package/dist/cjs/SparkpostDomainSetup.js.map +1 -0
- package/dist/cjs/SparkpostDomainVerify.js +267 -0
- package/dist/cjs/SparkpostDomainVerify.js.map +1 -0
- package/dist/cjs/index.js +46 -0
- package/dist/cjs/index.js.map +1 -0
- package/dist/constants-9aNca_br.js +67 -0
- package/dist/constants-9aNca_br.js.map +1 -0
- package/dist/constants-DcHGgJC2.js +94 -0
- package/dist/constants-DcHGgJC2.js.map +1 -0
- package/dist/index.js +38 -0
- package/dist/index.js.map +1 -0
- package/dist/useSparkpostDomain-ByWd7ekp.js +183 -0
- package/dist/useSparkpostDomain-ByWd7ekp.js.map +1 -0
- package/dist/useSparkpostDomain-DogzCozg.js +193 -0
- package/dist/useSparkpostDomain-DogzCozg.js.map +1 -0
- package/package.json +235 -0
- package/types.d.ts +22 -0
package/README.md
ADDED
|
@@ -0,0 +1,150 @@
|
|
|
1
|
+
# neeto-email-delivery-nano
|
|
2
|
+
|
|
3
|
+
The `neeto-email-delivery-nano` acts as the source of truth for the new nano's
|
|
4
|
+
structure, configs, data etc.
|
|
5
|
+
|
|
6
|
+
## Contents
|
|
7
|
+
|
|
8
|
+
1. [Development with Host Application](#development-with-host-application)
|
|
9
|
+
- [Engine](#engine)
|
|
10
|
+
- [Installation](#installation)
|
|
11
|
+
- [Usage](#usage)
|
|
12
|
+
- [Frontend package](#frontend-package)
|
|
13
|
+
- [Installation](#installation-1)
|
|
14
|
+
- [Instructions for development](#instructions-for-development)
|
|
15
|
+
- [Usage](#usage-1)
|
|
16
|
+
2. [Instructions for Publishing](#instructions-for-publishing)
|
|
17
|
+
|
|
18
|
+
## Development with Host Application
|
|
19
|
+
|
|
20
|
+
### Engine
|
|
21
|
+
|
|
22
|
+
#### Installation
|
|
23
|
+
|
|
24
|
+
1. Add this line to your application's Gemfile:
|
|
25
|
+
|
|
26
|
+
```ruby
|
|
27
|
+
source "NEETO_GEM_SERVER_URL" do
|
|
28
|
+
# ..existing gems
|
|
29
|
+
|
|
30
|
+
gem 'neeto-email-delivery-engine'
|
|
31
|
+
end
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
2. And then execute:
|
|
35
|
+
|
|
36
|
+
```shell
|
|
37
|
+
bundle install
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
3. Add this line to your application's `config/routes.rb` file
|
|
41
|
+
|
|
42
|
+
```ruby
|
|
43
|
+
mount NeetoEmailDeliveryEngine::Engine, at: "/neeto_email_delivery"
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
**NOTE: The mount point must be `/neeto_email_delivery` and cannot be changed
|
|
47
|
+
to any other path.**
|
|
48
|
+
|
|
49
|
+
4. Add required migrations in the `db/migrate` folder. Run the following
|
|
50
|
+
commands to copy the migrations from the engine to the host application.
|
|
51
|
+
|
|
52
|
+
```shell
|
|
53
|
+
bundle exec rails neeto_email_delivery_engine:install:migrations
|
|
54
|
+
bundle exec rails db:migrate
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
5. Include NeetoEmailDeliveryEngine::DeliveryMethodSelector in the host's
|
|
58
|
+
application_mailer.rb
|
|
59
|
+
|
|
60
|
+
````diff
|
|
61
|
+
class ApplicationMailer < NeetoCommonsBackend::ApplicationMailer
|
|
62
|
+
+ include NeetoEmailDeliveryEngine::DeliveryMethodSelector
|
|
63
|
+
|
|
64
|
+
# ...
|
|
65
|
+
end
|
|
66
|
+
|
|
67
|
+
6. Include NeetoEmailDeliveryEngine::HasEmailIntegrations in the host's owner model
|
|
68
|
+
|
|
69
|
+
```diff
|
|
70
|
+
class Form < ApplicationRecord
|
|
71
|
+
# ...
|
|
72
|
+
+ include NeetoEmailDeliveryEngine::HasEmailIntegrations
|
|
73
|
+
# ...
|
|
74
|
+
end
|
|
75
|
+
````
|
|
76
|
+
|
|
77
|
+
7. Add `config/initializers/neeto_email_delivery_engine.rb` and add the owner
|
|
78
|
+
class. Example:
|
|
79
|
+
|
|
80
|
+
```ruby
|
|
81
|
+
NeetoEmailDeliveryEngine.owner_class = "Form"
|
|
82
|
+
```
|
|
83
|
+
|
|
84
|
+
8. The following env variables need to be added to the host application.
|
|
85
|
+
|
|
86
|
+
```
|
|
87
|
+
GOOGLE_OAUTH_CLIENT_ID
|
|
88
|
+
GOOGLE_OAUTH_CLIENT_SECRET
|
|
89
|
+
MICROSOFT_OAUTH_CLIENT_ID
|
|
90
|
+
MICROSOFT_OAUTH_CLIENT_SECRET
|
|
91
|
+
SPARKPOST_SENDING_DOMAINS_KEY
|
|
92
|
+
|
|
93
|
+
## The following are needed, but they should already be present in the host application. So ensure that they are present.
|
|
94
|
+
APP_LOCAL_TO_INTERNET_PROXY_URL
|
|
95
|
+
CONNECT_PRIVATE_KEY
|
|
96
|
+
CONNECT_PUBLIC_KEY
|
|
97
|
+
```
|
|
98
|
+
|
|
99
|
+
### Frontend package
|
|
100
|
+
|
|
101
|
+
#### Installation
|
|
102
|
+
|
|
103
|
+
1. Add the `neeto-email-delivery-frontend` package to the `package.json`
|
|
104
|
+
|
|
105
|
+
```shell
|
|
106
|
+
yarn add @bigbinary/neeto-email-delivery-frontend
|
|
107
|
+
```
|
|
108
|
+
|
|
109
|
+
### Instructions for development
|
|
110
|
+
|
|
111
|
+
Check the
|
|
112
|
+
[Frontend package development guide](https://neeto-engineering.neetokb.com/p/a-d34cb4b0)
|
|
113
|
+
for step-by-step instructions to develop the frontend package.
|
|
114
|
+
|
|
115
|
+
#### Usage
|
|
116
|
+
|
|
117
|
+
##### Exported components
|
|
118
|
+
|
|
119
|
+
###### EmailDeliveryScreen
|
|
120
|
+
|
|
121
|
+
| Prop | Type | Description |
|
|
122
|
+
| ----------------------- | ----------- | ------------------------------------------------------------ |
|
|
123
|
+
| `canManageIntegrations` | boolean | Authorization/permission check for this feature. |
|
|
124
|
+
| `ownerId` | uuid/string | ID of the owner record. |
|
|
125
|
+
| `indexRoute` | string | Index route for the email delivery page. |
|
|
126
|
+
| `ownDomainSetupRoute` | string | Nested route for the SparkPost "Own Domain" setup component. |
|
|
127
|
+
|
|
128
|
+
###### SparkpostDomainSetup
|
|
129
|
+
|
|
130
|
+
| Prop | Type | Description |
|
|
131
|
+
| ----------------------- | ----------- | ---------------------------------------------------------------------------- |
|
|
132
|
+
| `canManageIntegrations` | boolean | Authorization/permission check for this feature. |
|
|
133
|
+
| `ownerId` | uuid/string | ID of the owner record. |
|
|
134
|
+
| `alreadyVerifiedRoute` | string | Route for the "already verified" page; typically the email delivery index. |
|
|
135
|
+
| `verifyRoute` | string | Route for the verification page that shows DKIM records. |
|
|
136
|
+
| `onCancelRoute` | string | Route to redirect users on cancellation; typically the email delivery index. |
|
|
137
|
+
|
|
138
|
+
###### SparkpostDomainVerify
|
|
139
|
+
|
|
140
|
+
| Prop | Type | Description |
|
|
141
|
+
| ------------------------- | ----------- | ------------------------------------------------ |
|
|
142
|
+
| `canManageIntegrations` | boolean | Authorization/permission check for this feature. |
|
|
143
|
+
| `ownerId` | uuid/string | ID of the owner record. |
|
|
144
|
+
| `emailDeliveryIndexRoute` | string | Index route for the email delivery page. |
|
|
145
|
+
|
|
146
|
+
## Instructions for Publishing
|
|
147
|
+
|
|
148
|
+
Consult the
|
|
149
|
+
[building and releasing packages](https://neeto-engineering.neetokb.com/articles/building-and-releasing-packages)
|
|
150
|
+
guide for details on how to publish.
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
{
|
|
2
|
+
"neetoEmailDelivery": {
|
|
3
|
+
"settings": "Settings",
|
|
4
|
+
"gmail": {
|
|
5
|
+
"title": "Gmail",
|
|
6
|
+
"description": "Connect your Gmail account so that all emails are sent from your Gmail account and not from Neeto.",
|
|
7
|
+
"permissionNotGiven": "You have not given permission to access your Gmail account.",
|
|
8
|
+
"connectGmail": "Connect Gmail",
|
|
9
|
+
"gmailConfigured": "Gmail is configured for sending emails."
|
|
10
|
+
},
|
|
11
|
+
"outlook": {
|
|
12
|
+
"title": "Outlook",
|
|
13
|
+
"description": "Connect your Outlook account so that all emails are sent from your Outlook account and not from Neeto.",
|
|
14
|
+
"permissionNotGiven": "You have not given permission to access your Outlook account.",
|
|
15
|
+
"invalidClient": "Invalid client error from Outlook.",
|
|
16
|
+
"nilJsonWebToken": "The account is not configured for sending emails from Outlook.",
|
|
17
|
+
"connectOutlook": "Connect Outlook",
|
|
18
|
+
"outlookConfigured": "Outlook is configured for sending emails."
|
|
19
|
+
},
|
|
20
|
+
"sparkpost": {
|
|
21
|
+
"ownDomainConfigured": "Own domain is configured for sending emails.",
|
|
22
|
+
"customDomain": "Custom domain",
|
|
23
|
+
"setup": {
|
|
24
|
+
"title": "Setup own domain for outgoing emails",
|
|
25
|
+
"description": "Enter the email address you want to use for sending emails",
|
|
26
|
+
"emailLabel": "Email address",
|
|
27
|
+
"emailPlaceholder": "notifications@example.com",
|
|
28
|
+
"emailHelp": "This email will be used as the sender address for outgoing emails. We'll automatically verify the domain ({{domain}}).",
|
|
29
|
+
"setupEmail": "Setup email",
|
|
30
|
+
"note": "Note: You'll need access to your domain's DNS settings to complete the verification process.",
|
|
31
|
+
"validation": {
|
|
32
|
+
"emailRequired": "Please enter an email address",
|
|
33
|
+
"emailInvalid": "Please enter a valid email address",
|
|
34
|
+
"setupFailed": "Failed to setup domain. Please try again."
|
|
35
|
+
}
|
|
36
|
+
},
|
|
37
|
+
"verify": {
|
|
38
|
+
"title": "Verify your domain",
|
|
39
|
+
"description": "Add these DNS records to verify <strong>{{domain}}</strong>",
|
|
40
|
+
"verifying": "Verifying...",
|
|
41
|
+
"verifyDomain": "Verify domain",
|
|
42
|
+
"cancel": "Cancel"
|
|
43
|
+
},
|
|
44
|
+
"dnsRecords": {
|
|
45
|
+
"title": "Required DNS Records",
|
|
46
|
+
"nameLabel": "Name",
|
|
47
|
+
"valueLabel": "Value",
|
|
48
|
+
"dkimSigning": "DKIM signing",
|
|
49
|
+
"alreadyVerified": "Domain is already verified!",
|
|
50
|
+
"loading": "Loading DNS records..."
|
|
51
|
+
},
|
|
52
|
+
"status": {
|
|
53
|
+
"successTitle": "Domain verified successfully!",
|
|
54
|
+
"successDescription": "Your domain is now configured for sending emails. Redirecting...",
|
|
55
|
+
"errorTitle": "Verification failed",
|
|
56
|
+
"errorDescription": "Could not verify your domain. Please check your DNS records and try again.",
|
|
57
|
+
"pendingTitle": "DNS records not found",
|
|
58
|
+
"pendingDescription": "We couldn't find the required DNS records. Please ensure they are properly configured and try again."
|
|
59
|
+
},
|
|
60
|
+
"instructions": {
|
|
61
|
+
"fullText": "Note: After adding these DNS records to your domain provider, it may take up to 48 hours for the changes to propagate. You can verify the records immediately or check back later.\n\nInstructions:\n1. Log in to your domain registrar or DNS provider\n2. Add the TXT records above to your DNS settings\n3. Wait for DNS propagation (can take up to 24 hours)\n4. Click \"Verify domain\" to check the configuration"
|
|
62
|
+
},
|
|
63
|
+
"emailDelivery": {
|
|
64
|
+
"ownDomainTitle": "Custom email provider",
|
|
65
|
+
"ownDomainDescription": "You need to configure your DKIM and your DNS settings to send emails from your custom email provider.",
|
|
66
|
+
"connectedEmail": "Connected email: {{email}}",
|
|
67
|
+
"connected": "Connected",
|
|
68
|
+
"disconnect": "Disconnect",
|
|
69
|
+
"setupDomain": "Setup domain"
|
|
70
|
+
},
|
|
71
|
+
"toasts": {
|
|
72
|
+
"domainVerifiedConnected": "Domain verified and connected successfully!",
|
|
73
|
+
"domainCreated": "Domain created! Please verify DNS records.",
|
|
74
|
+
"domainVerified": "Domain verified successfully!",
|
|
75
|
+
"verificationPending": "Verification in progress. DNS records propagation may take up to 24 hours.",
|
|
76
|
+
"domainDisconnected": "Domain disconnected successfully!"
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
}
|