@emailmaker/emailmaker 1.0.27 → 1.0.29
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 +1 -1
- package/asset-manifest.json +7 -7
- package/emailmaker-esm.js +1 -1
- package/emailmaker.js +1 -1
- package/iframe/{iframe-eblock.a6f6dc81e8b3641d6a36.html → iframe-eblock.b4c76a69e0e281db2c3f.html} +1 -1
- package/iframe/{iframe.a6f6dc81e8b3641d6a36.html → iframe.b4c76a69e0e281db2c3f.html} +1 -1
- package/iframe/js/cssbeautify.js +1 -1
- package/iframe/sandbox-eblock.js +1 -1
- package/iframe/sandbox.js +1 -1
- package/package.json +2 -2
- package/plugin.html +1 -1
- package/plugin_blocks_test.html +1 -1
- package/plugin_default.html +1 -1
- package/plugin_s.html +1 -1
- package/react/index.d.ts +2 -2
- package/react/index.jsx +2 -2
- package/static/js/{1792.216ac039.js → 1792.ed50a51e.js} +1 -1
- package/static/js/{1795.b6d39a75.js → 1795.e9cbb633.js} +1 -1
- package/static/js/{5571.afd3acb0.js → 5571.7c799e8b.js} +1 -1
- package/translations.pot +14 -14
- package/README_eng.md +0 -197
package/translations.pot
CHANGED
|
@@ -710,17 +710,17 @@ msgstr[1] ""
|
|
|
710
710
|
|
|
711
711
|
#: src/helpers/index.js:495
|
|
712
712
|
#: src/modules/components/Atoms/Atoms.jsx:223
|
|
713
|
-
#: src/modules/components/ImageLoaderModal/ImageLoaderModal.jsx:
|
|
713
|
+
#: src/modules/components/ImageLoaderModal/ImageLoaderModal.jsx:334
|
|
714
714
|
msgid "Coming soon"
|
|
715
715
|
msgstr ""
|
|
716
716
|
|
|
717
717
|
#: src/helpers/index.js:496
|
|
718
|
-
#: src/modules/components/ImageLoaderModal/ImageLoaderModal.jsx:
|
|
718
|
+
#: src/modules/components/ImageLoaderModal/ImageLoaderModal.jsx:335
|
|
719
719
|
msgid "The feature is under development."
|
|
720
720
|
msgstr ""
|
|
721
721
|
|
|
722
722
|
#: src/helpers/index.js:497
|
|
723
|
-
#: src/modules/components/ImageLoaderModal/ImageLoaderModal.jsx:
|
|
723
|
+
#: src/modules/components/ImageLoaderModal/ImageLoaderModal.jsx:336
|
|
724
724
|
msgid "Ok. I'll be waiting"
|
|
725
725
|
msgstr ""
|
|
726
726
|
|
|
@@ -2504,51 +2504,51 @@ msgstr ""
|
|
|
2504
2504
|
msgid "Search GIFs"
|
|
2505
2505
|
msgstr ""
|
|
2506
2506
|
|
|
2507
|
-
#: src/modules/components/ImageLoaderModal/ImageLoaderModal.jsx:
|
|
2507
|
+
#: src/modules/components/ImageLoaderModal/ImageLoaderModal.jsx:344
|
|
2508
2508
|
msgid "To preview and edit the uploaded image"
|
|
2509
2509
|
msgstr ""
|
|
2510
2510
|
|
|
2511
|
-
#: src/modules/components/ImageLoaderModal/ImageLoaderModal.jsx:
|
|
2511
|
+
#: src/modules/components/ImageLoaderModal/ImageLoaderModal.jsx:345
|
|
2512
2512
|
msgid "Upload Image"
|
|
2513
2513
|
msgstr ""
|
|
2514
2514
|
|
|
2515
|
-
#: src/modules/components/ImageLoaderModal/ImageLoaderModal.jsx:
|
|
2515
|
+
#: src/modules/components/ImageLoaderModal/ImageLoaderModal.jsx:475
|
|
2516
2516
|
msgid "The image was successfully uploaded."
|
|
2517
2517
|
msgstr ""
|
|
2518
2518
|
|
|
2519
|
-
#: src/modules/components/ImageLoaderModal/ImageLoaderModal.jsx:
|
|
2519
|
+
#: src/modules/components/ImageLoaderModal/ImageLoaderModal.jsx:614
|
|
2520
2520
|
#: src/modules/components/UploadBgImage/UploadBgImage.jsx:215
|
|
2521
2521
|
msgid "Upload"
|
|
2522
2522
|
msgstr ""
|
|
2523
2523
|
|
|
2524
|
-
#: src/modules/components/ImageLoaderModal/ImageLoaderModal.jsx:
|
|
2524
|
+
#: src/modules/components/ImageLoaderModal/ImageLoaderModal.jsx:630
|
|
2525
2525
|
msgid "Click to select, paste from the clipboard, or drag and drop"
|
|
2526
2526
|
msgstr ""
|
|
2527
2527
|
|
|
2528
|
-
#: src/modules/components/ImageLoaderModal/ImageLoaderModal.jsx:
|
|
2528
|
+
#: src/modules/components/ImageLoaderModal/ImageLoaderModal.jsx:634
|
|
2529
2529
|
msgid "Accepted formats: PNG, JPG, WEBP, SVG or GIF."
|
|
2530
2530
|
msgstr ""
|
|
2531
2531
|
|
|
2532
|
-
#: src/modules/components/ImageLoaderModal/ImageLoaderModal.jsx:
|
|
2532
|
+
#: src/modules/components/ImageLoaderModal/ImageLoaderModal.jsx:644
|
|
2533
2533
|
msgid "Paste image URL here"
|
|
2534
2534
|
msgstr ""
|
|
2535
2535
|
|
|
2536
|
-
#: src/modules/components/ImageLoaderModal/ImageLoaderModal.jsx:
|
|
2536
|
+
#: src/modules/components/ImageLoaderModal/ImageLoaderModal.jsx:658
|
|
2537
2537
|
#: src/modules/components/UploadBgImage/UploadBgImage.jsx:91
|
|
2538
2538
|
msgid "Stock"
|
|
2539
2539
|
msgstr ""
|
|
2540
2540
|
|
|
2541
|
-
#: src/modules/components/ImageLoaderModal/ImageLoaderModal.jsx:
|
|
2541
|
+
#: src/modules/components/ImageLoaderModal/ImageLoaderModal.jsx:681
|
|
2542
2542
|
#: src/modules/components/UploadBgImage/UploadBgImage.jsx:95
|
|
2543
2543
|
msgid "GIF"
|
|
2544
2544
|
msgstr ""
|
|
2545
2545
|
|
|
2546
|
-
#: src/modules/components/ImageLoaderModal/ImageLoaderModal.jsx:
|
|
2546
|
+
#: src/modules/components/ImageLoaderModal/ImageLoaderModal.jsx:704
|
|
2547
2547
|
#: src/modules/components/UploadBgImage/UploadBgImage.jsx:99
|
|
2548
2548
|
msgid "AI"
|
|
2549
2549
|
msgstr ""
|
|
2550
2550
|
|
|
2551
|
-
#: src/modules/components/ImageLoaderModal/ImageLoaderModal.jsx:
|
|
2551
|
+
#: src/modules/components/ImageLoaderModal/ImageLoaderModal.jsx:752
|
|
2552
2552
|
msgid "Image Center"
|
|
2553
2553
|
msgstr ""
|
|
2554
2554
|
|
package/README_eng.md
DELETED
|
@@ -1,197 +0,0 @@
|
|
|
1
|
-
> It is a Dev version of the Blocks email builder plugin.<br>The Prod version that will be released in the nearest future will have minor differences: it will not contain experimental features and the whole already existing feature set will be tested way more thoroughly before the releases.
|
|
2
|
-
|
|
3
|
-
# Installation
|
|
4
|
-
Run this code in the command prompt:
|
|
5
|
-
|
|
6
|
-
```cmd
|
|
7
|
-
$ npm i useblocks@1.0.27 -save
|
|
8
|
-
```
|
|
9
|
-
|
|
10
|
-
Add the Blocks plugin to your App config.
|
|
11
|
-
### For the Webpack module bundler
|
|
12
|
-
Package import:
|
|
13
|
-
```javascript
|
|
14
|
-
const useblocksPlugin = require('useblocks/webpack')
|
|
15
|
-
```
|
|
16
|
-
Defining the package in the app:
|
|
17
|
-
```javascript
|
|
18
|
-
module.exports = {
|
|
19
|
-
plugins: [
|
|
20
|
-
new UseblocksWebpackPlugin(),
|
|
21
|
-
]
|
|
22
|
-
}
|
|
23
|
-
```
|
|
24
|
-
### For the Vite module bundler
|
|
25
|
-
Package import:
|
|
26
|
-
```javascript
|
|
27
|
-
import useblocksPlugin from 'useblocks/vite'
|
|
28
|
-
```
|
|
29
|
-
Defining the package in the app:
|
|
30
|
-
```javascript
|
|
31
|
-
export default defineConfig({
|
|
32
|
-
plugins: [useblocksPlugin()],
|
|
33
|
-
})
|
|
34
|
-
```
|
|
35
|
-
# Initialization
|
|
36
|
-
Import the Blocks plugin into your component:
|
|
37
|
-
```javascript
|
|
38
|
-
import * as useblocks from "useblocks"
|
|
39
|
-
```
|
|
40
|
-
The Plugin configuration contains a parameter named `getAuthToken`. For authorization, you must pass the application's OAuth token to its value. For debugging purposes, the dev version of the plugin supports a mechanism for obtaining a token from the front of the application. To use this mechanism you need first to define auth-proxy in AppConfig:
|
|
41
|
-
|
|
42
|
-
### Fetching the OAuth token on the backend
|
|
43
|
-
```javascript
|
|
44
|
-
curl --location 'https://api.useblocks.io/oauth/token' \
|
|
45
|
-
--header 'Content-Type: application/x-www-form-urlencoded' \
|
|
46
|
-
--data-urlencode 'client_id=*******' \
|
|
47
|
-
--data-urlencode 'client_secret=*******' \
|
|
48
|
-
--data-urlencode 'grant_type=client_credentials'
|
|
49
|
-
```
|
|
50
|
-
|
|
51
|
-
### Creating the Blocks plugin entity
|
|
52
|
-
```javascript
|
|
53
|
-
useblocks.init({
|
|
54
|
-
getAuthToken: getAuthToken,
|
|
55
|
-
element: "#test",
|
|
56
|
-
content: {
|
|
57
|
-
title: "Email subject",
|
|
58
|
-
html: "EMAIL_CODE",
|
|
59
|
-
},
|
|
60
|
-
config: { }
|
|
61
|
-
}).then(instance => { })
|
|
62
|
-
```
|
|
63
|
-
You can get the EMAIL_CODE from <a href="https://cdn.useblocks.io/plugin/new-email.html" target="_blank">our example</a> or paste the HTML code of your own email
|
|
64
|
-
|
|
65
|
-
# Configuration
|
|
66
|
-
Plugin configuration is JSON with several nesting levels. In the config you can set the appearance, content, and the logic the plugin will work with.
|
|
67
|
-
|
|
68
|
-
### Element
|
|
69
|
-
You can send the `element` line into the plugin configuration. It is a DOM element selector and you need to initiate the plugin inside of it. If the element is not defined, the app will run in the background mode.
|
|
70
|
-
|
|
71
|
-
### Content
|
|
72
|
-
The `content` section contains parameters of an email that must be displayed in the editor. This is what can be sent to this parameter:
|
|
73
|
-
|
|
74
|
-
#### {string}
|
|
75
|
-
|
|
76
|
-
HTML code of an email.
|
|
77
|
-
|
|
78
|
-
#### {object} email options
|
|
79
|
-
```javascript
|
|
80
|
-
{
|
|
81
|
-
id?: string; // A unique ID of a project in your system.
|
|
82
|
-
html?: string; // HTML code of an email.
|
|
83
|
-
subject?: string; // Email subject line.
|
|
84
|
-
preheader?: string; // Email preheader.
|
|
85
|
-
}
|
|
86
|
-
|
|
87
|
-
```
|
|
88
|
-
|
|
89
|
-
#### {object} full description
|
|
90
|
-
```javascript
|
|
91
|
-
{
|
|
92
|
-
temlateId?: string; // Email template ID in Blocks.
|
|
93
|
-
email?: object; // email options.
|
|
94
|
-
blocks?: []; // Additional blocks.
|
|
95
|
-
comments?: []; // Comments in an email.
|
|
96
|
-
}
|
|
97
|
-
```
|
|
98
|
-
|
|
99
|
-
You can change the content at any moment after the initialization with the help of the `instance.show(content)` method.
|
|
100
|
-
|
|
101
|
-
### Config
|
|
102
|
-
This section is dedicated to setting the appearance and settings of the editor. You can change the configuration of this section after the initialization with the help of `useblocks.setConfig` or `useblocks.updateConfig`.
|
|
103
|
-
##### The list of parameters of the config section
|
|
104
|
-
| Parameter | Description | Default |
|
|
105
|
-
| ---------------------- | --------------------------------- | ------- |
|
|
106
|
-
| theme | Plugin theme: light, dark. | light |
|
|
107
|
-
| headerArrowBackVisible | Displaying the "Back" arrow. | true |
|
|
108
|
-
| headerTitleVisible | Displaying the "Title" field. | true |
|
|
109
|
-
| headerPreheaderVisible | Displaying the "Preheader" field. | true |
|
|
110
|
-
| pathEnabled | Bread crumbs | true |
|
|
111
|
-
| ... | ... | ... |
|
|
112
|
-
|
|
113
|
-
### Events
|
|
114
|
-
Events can be sent to configurations or added to them later while working with the instance of the plugin. All event subscribers can be asynchronous features.
|
|
115
|
-
|
|
116
|
-
#### Example
|
|
117
|
-
```javascript
|
|
118
|
-
useblocks.init({
|
|
119
|
-
....,
|
|
120
|
-
// Subscription to events in the initialization.
|
|
121
|
-
handleReadEmail: (e) => {},
|
|
122
|
-
handleSaveEmail: async (e) => {}
|
|
123
|
-
}).then((instance) => {
|
|
124
|
-
// Subscription to events after the initialization.
|
|
125
|
-
const dispose = instance.handleReadEmail(e => {});
|
|
126
|
-
const dispose = instance.handleSaveEmail(async (e) => {});
|
|
127
|
-
});
|
|
128
|
-
```
|
|
129
|
-
|
|
130
|
-
By sending the asynchronous feature you can implement the asynchronous data load.
|
|
131
|
-
#### Example
|
|
132
|
-
```javascript
|
|
133
|
-
useblocks.init({
|
|
134
|
-
element: "#test",
|
|
135
|
-
content: {
|
|
136
|
-
id: "1"
|
|
137
|
-
}
|
|
138
|
-
handleReadEmail: async (id) => {
|
|
139
|
-
return await fetchData(id); // Your data fetch feature.
|
|
140
|
-
}
|
|
141
|
-
}).then((instance) => {
|
|
142
|
-
setTimeout(() => instance.show({ id: "2" }), 1000)
|
|
143
|
-
});
|
|
144
|
-
```
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
### Events
|
|
149
|
-
| Name | Description |
|
|
150
|
-
| ------------------------- | -------------------------------------------- |
|
|
151
|
-
| handleReadEmail | read email handler |
|
|
152
|
-
| handleSaveEmail | fires when email saved |
|
|
153
|
-
| handleReadEmailAutoSaves | read autosaves handler |
|
|
154
|
-
| handleEmailAutosave | fires when email autosave |
|
|
155
|
-
| handleRemoveEmailAutoSave | fires when email autosave delete |
|
|
156
|
-
| handleReadBlocks | read blocks handler |
|
|
157
|
-
| handleSaveBlock | fires when block save |
|
|
158
|
-
| handleRemoveBlock | fires when block delete |
|
|
159
|
-
| handleReadComments | read comments handler |
|
|
160
|
-
| handleSaveComment | fires when comment save |
|
|
161
|
-
| handleRemoveComment | fires when comment delete |
|
|
162
|
-
| handleSaveButtonClick | fires when user clicked on 'save' button |
|
|
163
|
-
| handleNextButtonClick | fires when user clicked on 'next' button |
|
|
164
|
-
| handlePreviousButtonClick | fires when user clicked on 'previous' button |
|
|
165
|
-
| handleEmailInit | fires when email iframe inited |
|
|
166
|
-
| handleEmailChanged | fires when email changed |
|
|
167
|
-
| handleHtmlChanged | fires when email Html changed |
|
|
168
|
-
| handleDestroy | fires when app destroyed |
|
|
169
|
-
| handleLoad | fires when app loaded |
|
|
170
|
-
| handleLoadImage | fires when image loading |
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
### Methods
|
|
175
|
-
| Method name | Description |
|
|
176
|
-
| ------------------------- | -------------------------------------------- |
|
|
177
|
-
| init | Initialization (async) |
|
|
178
|
-
| show | Altering the content after the initialization|
|
|
179
|
-
| destroy | Destruction of the instance of the plugin |
|
|
180
|
-
| reset | Resetting the whole configuration |
|
|
181
|
-
| getEmail | Getting the current email |
|
|
182
|
-
| getConfig | Getting the configuration |
|
|
183
|
-
| getBlocks | Getting the blocks from the project |
|
|
184
|
-
| getComments | Getting the commentaries for the email |
|
|
185
|
-
| getEmailRevisions | Getting the list of the email revisions |
|
|
186
|
-
| setConfig | Setting new config parameters |
|
|
187
|
-
| updateConfig | Updating config parameters |
|
|
188
|
-
| notify | Notifications display |
|
|
189
|
-
| getElement | Getting an element of initialization |
|
|
190
|
-
| save | Saving an email |
|
|
191
|
-
| compileEmail | Get compiled email |
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
### Keywords
|
|
197
|
-
none
|