@emailmaker/emailmaker 1.0.98 → 1.0.100
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 +165 -0
- package/css.worker.js +2 -0
- package/css.worker.js.LICENSE.txt +6 -0
- package/editor.worker.js +1 -0
- package/emailmaker-esm.js +1 -0
- package/emailmaker.d.ts +1826 -0
- package/emailmaker.js +1 -0
- package/html.worker.js +1 -0
- package/iframe/429.js +1 -1
- package/iframe/766.js +1 -1
- package/iframe/iframe-eblock.e88ae8a9ae883be1118b.html +1 -0
- package/iframe/iframe.e88ae8a9ae883be1118b.html +1 -0
- package/iframe/js/330.4622fd92.js +1 -0
- package/iframe/sandbox-eblock.js +1 -1
- package/iframe/sandbox.js +1 -1
- package/package.json +1 -1
- package/plugin.html +294 -0
- package/plugin_blocks_test.html +144 -0
- package/plugin_default.html +56 -0
- package/plugin_idigital.html +254 -0
- package/plugin_nota.html +861 -0
- package/plugin_s.html +31 -0
- package/static/css/1169.c8d4ad26.chunk.css +1 -0
- package/static/css/57.c4280089.chunk.css +1 -0
- package/static/css/6501.e131603e.chunk.css +1 -0
- package/static/css/6798.4b23f0cb.chunk.css +1 -0
- package/static/css/84.709e209c.chunk.css +1 -0
- package/static/js/1169.baef237c.chunk.js +2 -0
- package/static/js/1169.baef237c.chunk.js.LICENSE.txt +6 -0
- package/static/js/1303.92cc3c9c.js +2 -0
- package/static/js/1303.92cc3c9c.js.LICENSE.txt +11 -0
- package/static/js/1538.68b12a82.chunk.js +2 -0
- package/static/js/1538.68b12a82.chunk.js.LICENSE.txt +23 -0
- package/static/js/1729.a0be903e.chunk.js +1 -0
- package/static/js/1880.5668de7d.chunk.js +1 -0
- package/static/js/207.2a052cc2.js +2 -0
- package/static/js/207.2a052cc2.js.LICENSE.txt +59 -0
- package/static/js/2624.5a8b68ca.js +2 -0
- package/static/js/2624.5a8b68ca.js.LICENSE.txt +21 -0
- package/static/js/2642.b60a63f6.chunk.js +1 -0
- package/static/js/2854.da9b4ca6.js +2 -0
- package/static/js/2854.da9b4ca6.js.LICENSE.txt +31 -0
- package/static/js/3017.102adc4c.chunk.js +1 -0
- package/static/js/3019.8534e1e7.chunk.js +2 -0
- package/static/js/3019.8534e1e7.chunk.js.LICENSE.txt +6 -0
- package/static/js/3065.c2b60870.js +2 -0
- package/static/js/3065.c2b60870.js.LICENSE.txt +39 -0
- package/static/js/3085.bcc62ca0.chunk.js +2 -0
- package/static/js/3085.bcc62ca0.chunk.js.LICENSE.txt +54 -0
- package/static/js/4309.6c1989bb.chunk.js +1 -0
- package/static/js/4972.a230fee4.js +1 -0
- package/static/js/57.3e1e762a.chunk.js +1 -0
- package/static/js/6144.a3bf0881.chunk.js +2 -0
- package/static/js/6144.a3bf0881.chunk.js.LICENSE.txt +6 -0
- package/static/js/6419.3f1ccca4.js +2 -0
- package/static/js/6419.3f1ccca4.js.LICENSE.txt +1 -0
- package/static/js/6501.40bbf4df.chunk.js +1 -0
- package/static/js/6798.65ecf642.chunk.js +2 -0
- package/static/js/6798.65ecf642.chunk.js.LICENSE.txt +39 -0
- package/static/js/6801.562ec824.chunk.js +2 -0
- package/static/js/6801.562ec824.chunk.js.LICENSE.txt +6 -0
- package/static/js/6819.16ca9581.chunk.js +2 -0
- package/static/js/6819.16ca9581.chunk.js.LICENSE.txt +6 -0
- package/static/js/6957.7ea22637.chunk.js +1 -0
- package/static/js/7463.51929d73.chunk.js +2 -0
- package/static/js/7463.51929d73.chunk.js.LICENSE.txt +6 -0
- package/static/js/84.25bf13c1.chunk.js +1 -0
- package/static/js/8473.88a48c70.chunk.js +2 -0
- package/static/js/8473.88a48c70.chunk.js.LICENSE.txt +101 -0
- package/static/js/8521.0e5efd08.chunk.js +2 -0
- package/static/js/8521.0e5efd08.chunk.js.LICENSE.txt +6 -0
- package/static/js/9644.eb778968.chunk.js +2 -0
- package/static/js/9644.eb778968.chunk.js.LICENSE.txt +6 -0
- package/static/js/9960.6fbe3e6d.chunk.js +2 -0
- package/static/js/9960.6fbe3e6d.chunk.js.LICENSE.txt +30 -0
- package/static/js/9981.4c03120e.js +1 -0
- package/static/js/ant-locale/locale-ar_EG-js.a068e3a8.chunk.js +1 -0
- package/static/js/ant-locale/locale-az_AZ-js.b84a560f.chunk.js +1 -0
- package/static/js/ant-locale/locale-bg_BG-js.3d7c7e4f.chunk.js +1 -0
- package/static/js/ant-locale/locale-bn_BD-js.dd1a7e84.chunk.js +1 -0
- package/static/js/ant-locale/locale-by_BY-js.49b7fc6b.chunk.js +1 -0
- package/static/js/ant-locale/locale-ca_ES-js.24fe4aef.chunk.js +1 -0
- package/static/js/ant-locale/locale-cs_CZ-js.1e90fb24.chunk.js +1 -0
- package/static/js/ant-locale/locale-da_DK-js.61788209.chunk.js +1 -0
- package/static/js/ant-locale/locale-de_DE-js.8e7fdd44.chunk.js +1 -0
- package/static/js/ant-locale/locale-el_GR-js.6c5e0839.chunk.js +1 -0
- package/static/js/ant-locale/locale-en_GB-js.92cc4647.chunk.js +1 -0
- package/static/js/ant-locale/locale-es_ES-js.a31d70e0.chunk.js +1 -0
- package/static/js/ant-locale/locale-et_EE-js.337814a0.chunk.js +1 -0
- package/static/js/ant-locale/locale-eu_ES-js.18f1c965.chunk.js +1 -0
- package/static/js/ant-locale/locale-fa_IR-js.f0f50266.chunk.js +1 -0
- package/static/js/ant-locale/locale-fi_FI-js.e2e08d8a.chunk.js +1 -0
- package/static/js/ant-locale/locale-fr_BE-js.2e2298ab.chunk.js +1 -0
- package/static/js/ant-locale/locale-fr_CA-js.b2f59d9c.chunk.js +1 -0
- package/static/js/ant-locale/locale-fr_FR-js.5d07a79a.chunk.js +1 -0
- package/static/js/ant-locale/locale-ga_IE-js.afa510f9.chunk.js +1 -0
- package/static/js/ant-locale/locale-gl_ES-js.72e19ffc.chunk.js +1 -0
- package/static/js/ant-locale/locale-he_IL-js.47b71730.chunk.js +1 -0
- package/static/js/ant-locale/locale-hi_IN-js.7af15f51.chunk.js +1 -0
- package/static/js/ant-locale/locale-hr_HR-js.4ebb11e0.chunk.js +1 -0
- package/static/js/ant-locale/locale-hu_HU-js.ecde5d7e.chunk.js +1 -0
- package/static/js/ant-locale/locale-hy_AM-js.15e07ba1.chunk.js +1 -0
- package/static/js/ant-locale/locale-id_ID-js.ab0888b9.chunk.js +1 -0
- package/static/js/ant-locale/locale-is_IS-js.fdbfc750.chunk.js +1 -0
- package/static/js/ant-locale/locale-it_IT-js.59a531ef.chunk.js +1 -0
- package/static/js/ant-locale/locale-ja_JP-js.7870613a.chunk.js +1 -0
- package/static/js/ant-locale/locale-ka_GE-js.853f3af0.chunk.js +1 -0
- package/static/js/ant-locale/locale-kk_KZ-js.5fdcc75b.chunk.js +1 -0
- package/static/js/ant-locale/locale-km_KH-js.988792d2.chunk.js +1 -0
- package/static/js/ant-locale/locale-kmr_IQ-js.6903b04d.chunk.js +1 -0
- package/static/js/ant-locale/locale-kn_IN-js.5fbd9645.chunk.js +1 -0
- package/static/js/ant-locale/locale-ko_KR-js.07676057.chunk.js +1 -0
- package/static/js/ant-locale/locale-ku_IQ-js.8d56188e.chunk.js +1 -0
- package/static/js/ant-locale/locale-lt_LT-js.976c50a6.chunk.js +1 -0
- package/static/js/ant-locale/locale-lv_LV-js.d2b7eb7a.chunk.js +1 -0
- package/static/js/ant-locale/locale-mk_MK-js.1a324243.chunk.js +1 -0
- package/static/js/ant-locale/locale-ml_IN-js.9ca0875e.chunk.js +1 -0
- package/static/js/ant-locale/locale-mn_MN-js.e5c5e6b3.chunk.js +1 -0
- package/static/js/ant-locale/locale-ms_MY-js.68d51cfa.chunk.js +1 -0
- package/static/js/ant-locale/locale-my_MM-js.1d798fbf.chunk.js +1 -0
- package/static/js/ant-locale/locale-nb_NO-js.85b15451.chunk.js +1 -0
- package/static/js/ant-locale/locale-ne_NP-js.db143616.chunk.js +1 -0
- package/static/js/ant-locale/locale-nl_BE-js.71247744.chunk.js +1 -0
- package/static/js/ant-locale/locale-nl_NL-js.26845b27.chunk.js +1 -0
- package/static/js/ant-locale/locale-pl_PL-js.44a62852.chunk.js +1 -0
- package/static/js/ant-locale/locale-pt_BR-js.17328a86.chunk.js +1 -0
- package/static/js/ant-locale/locale-pt_PT-js.05d4d804.chunk.js +1 -0
- package/static/js/ant-locale/locale-ro_RO-js.3e1e40bb.chunk.js +1 -0
- package/static/js/ant-locale/locale-si_LK-js.facbc144.chunk.js +1 -0
- package/static/js/ant-locale/locale-sk_SK-js.32bd8996.chunk.js +1 -0
- package/static/js/ant-locale/locale-sl_SI-js.f054d794.chunk.js +1 -0
- package/static/js/ant-locale/locale-sr_RS-js.317370b5.chunk.js +1 -0
- package/static/js/ant-locale/locale-sv_SE-js.ecd8298d.chunk.js +1 -0
- package/static/js/ant-locale/locale-ta_IN-js.ee264565.chunk.js +1 -0
- package/static/js/ant-locale/locale-th_TH-js.f1d32c8f.chunk.js +1 -0
- package/static/js/ant-locale/locale-tk_TK-js.015ee01f.chunk.js +1 -0
- package/static/js/ant-locale/locale-tr_TR-js.4c6d775a.chunk.js +1 -0
- package/static/js/ant-locale/locale-uk_UA-js.cef1c751.chunk.js +1 -0
- package/static/js/ant-locale/locale-ur_PK-js.b5d52218.chunk.js +1 -0
- package/static/js/ant-locale/locale-vi_VN-js.c5140ea5.chunk.js +1 -0
- package/static/js/ant-locale/locale-zh_CN-js.861c7ef0.chunk.js +1 -0
- package/static/js/ant-locale/locale-zh_HK-js.ca14eb1f.chunk.js +1 -0
- package/static/js/ant-locale/locale-zh_TW-js.69bb4746.chunk.js +1 -0
- package/static/js/emailmaker_core.c2851865.js +2 -0
- package/static/js/emailmaker_core.c2851865.js.LICENSE.txt +23 -0
- package/static/js/mergeTags/locale0.24c6e2da.chunk.js +1 -0
- package/static/js/mergeTags/locale1.24fd0fd2.chunk.js +1 -0
- package/static/media/ai-image.7c42c2e12001ebf31881.png +0 -0
- package/static/media/codicon.f13d28f3e470ec5c0896.ttf +0 -0
- package/static/media/empty-image.1827d6561f3c4042dfb3.png +0 -0
- package/static/media/fb.ff10384394f8044ec889.png +0 -0
- package/static/media/frame_dark.318d7ed53535d80662dc.png +0 -0
- package/static/media/frame_light.22a9b4ec728365d8193f.png +0 -0
- package/static/media/frame_template_gallery.85693b3950e7689fb3a5.png +0 -0
- package/static/media/icon-border-radius.2a56b93a7711558098a622296b7ae2e1.svg +1 -0
- package/static/media/icon-create-block.0b077f4000bf7907b9ea871d28c7fb1e.svg +1 -0
- package/static/media/icon-menu-block-welcome.1c534a003522feadd2e7.png +0 -0
- package/static/media/ig.47a89992b4bec92d4364.png +0 -0
- package/static/media/project-email-back-dark.9916625a9a714830b770.svg +29 -0
- package/static/media/project-email-back.0ce470def19ce7c063e0.svg +29 -0
- package/static/media/sign_up_01.333271584216122b89ba.png +0 -0
- package/static/media/sign_up_01_blocks.5538cfdb90d4869794dc.png +0 -0
- package/static/media/sign_up_02.d99d2aa6bf1ea74f01fa.png +0 -0
- package/static/media/sign_up_02_blocks.837fc2c9a9461fda13be.png +0 -0
- package/static/media/sign_up_03.5545ffad60a2cb5e0336.png +0 -0
- package/static/media/sign_up_03_blocks.126601f7a6fbea4b6c54.png +0 -0
- package/static/media/sign_up_04.398a4ca50d5f5b3cd837.png +0 -0
- package/static/media/sign_up_04_blocks.255c5c07b23cbcc256fd.png +0 -0
- package/static/media/sign_up_05.4c58df1be2edaa79d52b.png +0 -0
- package/static/media/sign_up_05_blocks.431b6844fdf3e14642c2.png +0 -0
- package/static/media/tg.10f004529a98df9732b9.png +0 -0
- package/static/media/tw.823a7736ac2d82815c71.png +0 -0
- package/static/media/video.854adea50295d0a3f7ae.png +0 -0
- package/static/media/vk.fe41df919f4e8718e0b3.png +0 -0
- package/static/media/yd.c40d05dde64ef695fdf2.png +0 -0
- package/static/media/yt.4ac57e55d158b40c7fc1.png +0 -0
- package/translations.pot +76 -76
- package/iframe/iframe-eblock.441a4dbc4384f20fcf1e.html +0 -1
- package/iframe/iframe.441a4dbc4384f20fcf1e.html +0 -1
- package/iframe/js/330.378aec42.js +0 -1
- /package/iframe/js/{330.378aec42.js.LICENSE.txt → 330.4622fd92.js.LICENSE.txt} +0 -0
package/package.json
CHANGED
package/plugin.html
ADDED
|
@@ -0,0 +1,294 @@
|
|
|
1
|
+
<!doctype html><html lang="en"><head><script id="plugin-script" src="emailmaker.js?333b2f200910aba7bfc5"></script></head><body><button id="change_theme" style="width: 150px; height: 30px">Click Me</button><div style="background: white; width: 100%; height: 50px; display: flex; justify-content: center; align-items: center"></div><div id="test" style="padding: 0px; background: #fff; height: 100vh"></div><script async defer="defer">// import { init } from "./emailmaker-esm.js?333b2f200910aba7bfc5";
|
|
2
|
+
const auth_jwt = {
|
|
3
|
+
username: '****',
|
|
4
|
+
password: '****',
|
|
5
|
+
};
|
|
6
|
+
|
|
7
|
+
const systemfields = [
|
|
8
|
+
{
|
|
9
|
+
label: 'Дополнительное поле «Имя»',
|
|
10
|
+
value: 'Name',
|
|
11
|
+
},
|
|
12
|
+
{
|
|
13
|
+
label: 'Имя получателя',
|
|
14
|
+
value: 'ToName',
|
|
15
|
+
},
|
|
16
|
+
];
|
|
17
|
+
|
|
18
|
+
const auth_client = {
|
|
19
|
+
client_id: '****',
|
|
20
|
+
client_secret: '****',
|
|
21
|
+
};
|
|
22
|
+
const origin = document.location.origin;
|
|
23
|
+
const getAuthToken = async () => {
|
|
24
|
+
var requestOptions = {
|
|
25
|
+
method: 'POST',
|
|
26
|
+
redirect: 'follow',
|
|
27
|
+
};
|
|
28
|
+
|
|
29
|
+
return fetch(origin + '/tests/plugin/temp_token_em.php', requestOptions)
|
|
30
|
+
.then((response) => response.json())
|
|
31
|
+
.then((result) => result.access_token)
|
|
32
|
+
.catch((error) => {
|
|
33
|
+
return '';
|
|
34
|
+
});
|
|
35
|
+
};
|
|
36
|
+
|
|
37
|
+
const auth_client_oauth = {
|
|
38
|
+
client_id: '****',
|
|
39
|
+
client_secret: '****',
|
|
40
|
+
};
|
|
41
|
+
|
|
42
|
+
const BLOCKS_KEY = 'blocks';
|
|
43
|
+
const COMMENTS_KEY = 'blocks';
|
|
44
|
+
const RESOURSE = 'aaa.bbb.xyz.com';
|
|
45
|
+
let _instance = undefined;
|
|
46
|
+
const options = {
|
|
47
|
+
getAuthToken,
|
|
48
|
+
previewIconEnabled: true,
|
|
49
|
+
livePreviewEnabled: true,
|
|
50
|
+
element: '#test',
|
|
51
|
+
handleEmailChanged(event) {
|
|
52
|
+
console.log(event);
|
|
53
|
+
},
|
|
54
|
+
handleLoad(instance) {
|
|
55
|
+
_instance = instance;
|
|
56
|
+
},
|
|
57
|
+
handleReadEmailRevisions() {
|
|
58
|
+
return [];
|
|
59
|
+
},
|
|
60
|
+
// async handleReadLocale() {
|
|
61
|
+
// const response = await fetch("./react_app-ru_RU.po");
|
|
62
|
+
// const text = await response.text();
|
|
63
|
+
// return text;
|
|
64
|
+
// },
|
|
65
|
+
async handleSaveEmail({ value }) {
|
|
66
|
+
const email = await _instance.compileEmail(value);
|
|
67
|
+
},
|
|
68
|
+
handleEmailChanged(event) {
|
|
69
|
+
console.log(event.code);
|
|
70
|
+
},
|
|
71
|
+
handleLoad(instance) {
|
|
72
|
+
_instance = instance;
|
|
73
|
+
},
|
|
74
|
+
async handleSaveEmail({ value }) {
|
|
75
|
+
const email = await _instance.compileEmail(value);
|
|
76
|
+
console.log(email);
|
|
77
|
+
},
|
|
78
|
+
handleCloneEmail(event) {
|
|
79
|
+
console.log(event);
|
|
80
|
+
},
|
|
81
|
+
handleShareEmail(event) {
|
|
82
|
+
console.log(event);
|
|
83
|
+
},
|
|
84
|
+
handlePreviewEmail(event) {
|
|
85
|
+
console.log(event);
|
|
86
|
+
},
|
|
87
|
+
handleLivePreviewEmail(event) {
|
|
88
|
+
console.log(event);
|
|
89
|
+
},
|
|
90
|
+
handleValidate(e) {
|
|
91
|
+
console.log(e);
|
|
92
|
+
},
|
|
93
|
+
// headless: true,
|
|
94
|
+
content: {
|
|
95
|
+
templateId: 321739,
|
|
96
|
+
|
|
97
|
+
email: {
|
|
98
|
+
id: '3769995',
|
|
99
|
+
author: 123,
|
|
100
|
+
isNew: false,
|
|
101
|
+
subject: 'topic',
|
|
102
|
+
preheader: '',
|
|
103
|
+
description: '',
|
|
104
|
+
project: 'undefined',
|
|
105
|
+
parent_email: '309707',
|
|
106
|
+
common_styles:
|
|
107
|
+
'{"block":{"darkBgColor":"#1c52dc"},"text":{"fontFamily":["Safe Fonts","-apple-system, \'Segoe UI\', \'Helvetica Neue\', Helvetica, Roboto, Arial, sans-serif"],"fontSize":16,"fontSizeDim":"px","lineHeight":21,"lineHeightDim":"px","color":"#5a5a5a","textAlign":"left","paddingBottom":10,"paddingBottomDim":"px"},"headings":{"fontFamily":["Safe Fonts","-apple-system, \'Segoe UI\', \'Helvetica Neue\', Helvetica, Roboto, Arial, sans-serif"],"fontSize":24,"fontSizeDim":"px","lineHeight":32,"lineHeightDim":"px","color":"#333333","textAlign":"left","paddingTop":20,"paddingTopDim":"px","paddingBottom":10,"paddingBottomDim":"px","letterSpacing":0,"letterSpacingDim":"px","bold":true,"italic":false},"links":{"color":"#1C52DC","underline":true},"buttons":{"fontFamily":["Safe Fonts","-apple-system, \'Segoe UI\', \'Helvetica Neue\', Helvetica, Roboto, Arial, sans-serif"],"fontSize":16,"fontSizeDim":"px","letterSpacing":0,"letterSpacingDim":"px","color":"#FFFFFF","bold":false,"italic":false,"backgroundColor":"#1C52DC","marginTop":10,"marginTopDim":"px","marginBottom":10,"marginBottomDim":"px","border":{"all":null,"top":null,"right":null,"bottom":null,"left":null},"borderRadius":{"all":5,"topLeft":null,"topRight":null,"bottomRight":null,"bottomLeft":null},"textAlign":"center","padding":{"all":null,"top":null,"right":null,"bottom":null,"left":null}},"block":{"backgroundColor":""}}',
|
|
108
|
+
title: '',
|
|
109
|
+
date: '2024-01-12T08:42:09',
|
|
110
|
+
modified: '2024-02-16T17:21:01',
|
|
111
|
+
group: [],
|
|
112
|
+
lock: false,
|
|
113
|
+
utm_parameters: {
|
|
114
|
+
utm_content: 'ssssssss',
|
|
115
|
+
},
|
|
116
|
+
// "code": "<html><head></head><body><body></html>",
|
|
117
|
+
},
|
|
118
|
+
},
|
|
119
|
+
project: undefined,
|
|
120
|
+
user: {
|
|
121
|
+
id: 123,
|
|
122
|
+
username: 'testetrter',
|
|
123
|
+
name: 'ssss',
|
|
124
|
+
},
|
|
125
|
+
storageProvider: {
|
|
126
|
+
getItems: ({folderId}) => {
|
|
127
|
+
if (!folderId) {
|
|
128
|
+
return { items: [{
|
|
129
|
+
"id": "folder",
|
|
130
|
+
"name": "folder",
|
|
131
|
+
"folderId": "",
|
|
132
|
+
"isFolder": true,
|
|
133
|
+
|
|
134
|
+
}]}
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
|
|
138
|
+
return {items: [
|
|
139
|
+
{
|
|
140
|
+
"id": "folder/cat1.jpeg",
|
|
141
|
+
"name": "cat1.jpeg",
|
|
142
|
+
"folderId": "folder",
|
|
143
|
+
"isFolder": false,
|
|
144
|
+
"size": 29067,
|
|
145
|
+
"date": "2025-10-02T10:56:02.000Z",
|
|
146
|
+
"thumbnail": "http://imgrsz.alp.dev.ecomz.eu/resize/img.alp.dev.ecomz.eu/ct/200x200/4e898afda72c9621cb56069f05667f85/en/v5/user-files?userId=2&resource=himg&disposition=inline&name=6ozygjygo8ads6c97gcf4b3t9b1xbq35kisstc6yaos8o7q8faj7ar7fenyzg7bcuxd3kjjbhsnds6",
|
|
147
|
+
"url": "https://img.alp.dev.ecomz.eu/en/v5/user-files?userId=2&resource=himg&disposition=inline&name=6ozygjygo8ads6c97gcf4b3t9b1xbq35kisstc6yaos8o7q8faj7ar7fenyzg7bcuxd3kjjbhsnds6"
|
|
148
|
+
},
|
|
149
|
+
{
|
|
150
|
+
"id": "folder/dog2.png",
|
|
151
|
+
"name": "dog2.png",
|
|
152
|
+
"folderId": "folder",
|
|
153
|
+
"isFolder": false,
|
|
154
|
+
"size": 150136,
|
|
155
|
+
"date": "2025-10-02T10:20:17.000Z",
|
|
156
|
+
"thumbnail": "http://imgrsz.alp.dev.ecomz.eu/resize/img.alp.dev.ecomz.eu/ct/200x200/4ea13eca1196d6cd285703f6afff9411/en/v5/user-files?userId=2&resource=himg&disposition=inline&name=63x8uqmac4937ac97gcf4b3t9b1xbq35kisstc6fabiczfpgkgy3obs38n1zufykagsh5w91s7h3mr",
|
|
157
|
+
"url": "https://img.alp.dev.ecomz.eu/en/v5/user-files?userId=2&resource=himg&disposition=inline&name=63x8uqmac4937ac97gcf4b3t9b1xbq35kisstc6fabiczfpgkgy3obs38n1zufykagsh5w91s7h3mr"
|
|
158
|
+
}
|
|
159
|
+
]}
|
|
160
|
+
}
|
|
161
|
+
},
|
|
162
|
+
config: {
|
|
163
|
+
disableDoubleClickNextButton: false,
|
|
164
|
+
imageCenterFileManagerView: true,
|
|
165
|
+
fileManager: {
|
|
166
|
+
enableMove: false,
|
|
167
|
+
multiSelect: false
|
|
168
|
+
},
|
|
169
|
+
counters: { optimization_counter: 2, ai_counter: 3, ai_generator_counter: 4, ai_img_counter: 4 },
|
|
170
|
+
limits: { optimization_limit: 0, ai_limit: 0, ai_generator_limit: 0, ai_img_limit: 0 },
|
|
171
|
+
billingPageUrl: 'https://billing.yandex.ru',
|
|
172
|
+
|
|
173
|
+
mode: 'pro',
|
|
174
|
+
configSwither: true,
|
|
175
|
+
revisionService: true,
|
|
176
|
+
theme: 'light',
|
|
177
|
+
testEmails: ['test@test.com'],
|
|
178
|
+
settingsEnabled: true,
|
|
179
|
+
UTMEnabled: true,
|
|
180
|
+
// locale: "ru_RU",
|
|
181
|
+
locale: 'en_US',
|
|
182
|
+
// emailDropdownMenuEnabled: true,
|
|
183
|
+
previewIconEnabled: true,
|
|
184
|
+
previewModeEnabled: true,
|
|
185
|
+
livePreviewEnabled: true,
|
|
186
|
+
sendTestEnabled: true,
|
|
187
|
+
emailExportEnabled: true,
|
|
188
|
+
sharePreviewEnabled: true,
|
|
189
|
+
emailDropdownMenuLock: true,
|
|
190
|
+
emailDropdownMenuClone: true,
|
|
191
|
+
emailDropdownMenuRemove: true,
|
|
192
|
+
nextButtonEnabled: true,
|
|
193
|
+
// Стилизация через token
|
|
194
|
+
mergeTags: {
|
|
195
|
+
syntax: ['{{%value%}}'],
|
|
196
|
+
items: [
|
|
197
|
+
{
|
|
198
|
+
label: 'Системные123',
|
|
199
|
+
value: 'System',
|
|
200
|
+
children: systemfields,
|
|
201
|
+
},
|
|
202
|
+
{
|
|
203
|
+
label: 'Пользовательские',
|
|
204
|
+
value: 'User',
|
|
205
|
+
children: systemfields,
|
|
206
|
+
},
|
|
207
|
+
],
|
|
208
|
+
},
|
|
209
|
+
},
|
|
210
|
+
};
|
|
211
|
+
|
|
212
|
+
async function init() {
|
|
213
|
+
// const response = await fetch("./key.txt");
|
|
214
|
+
// const key = await response.text();
|
|
215
|
+
const instance = await emailmaker.init({ ...options });
|
|
216
|
+
// let i = 0;
|
|
217
|
+
// let id = 0;
|
|
218
|
+
// setInterval(() => {
|
|
219
|
+
// i = i === 0 ? 1 : 0;
|
|
220
|
+
// instance.show({
|
|
221
|
+
// ...options.content,
|
|
222
|
+
// email: {
|
|
223
|
+
// ...options.content.email,
|
|
224
|
+
// // id: id++,
|
|
225
|
+
// code: '<div>31111111111111111111111111</div>'
|
|
226
|
+
// }
|
|
227
|
+
|
|
228
|
+
// });
|
|
229
|
+
// }, 30000);
|
|
230
|
+
instance.handleSaveEmail(async ({ value, patch, prev }) => {
|
|
231
|
+
console.log('saving');
|
|
232
|
+
const _email = await instance.compileEmail(value);
|
|
233
|
+
console.log(_email);
|
|
234
|
+
_email.utm_parameters = { ..._email.utm_parameters, utm_content: '333' };
|
|
235
|
+
const a = await instance.compileEmail(_email);
|
|
236
|
+
console.log(a);
|
|
237
|
+
});
|
|
238
|
+
|
|
239
|
+
|
|
240
|
+
// setTimeout(() => {
|
|
241
|
+
// console.log(instance.getCodeErrors());
|
|
242
|
+
// instance.updateConfig({activeNextButton: false})
|
|
243
|
+
// }, 5000);
|
|
244
|
+
instance.setConfig({
|
|
245
|
+
...options.config,
|
|
246
|
+
mergeTags: {
|
|
247
|
+
syntax: ['{{%value%}}'],
|
|
248
|
+
items: [
|
|
249
|
+
{
|
|
250
|
+
label: 'Системные3131',
|
|
251
|
+
value: 'System',
|
|
252
|
+
children: systemfields,
|
|
253
|
+
},
|
|
254
|
+
{
|
|
255
|
+
label: 'Пользовательские4444',
|
|
256
|
+
value: 'User',
|
|
257
|
+
children: systemfields,
|
|
258
|
+
},
|
|
259
|
+
],
|
|
260
|
+
},
|
|
261
|
+
});
|
|
262
|
+
instance.handleLimitUsage(({ name, count }) => {
|
|
263
|
+
console.log('Вы превысили количество допустимых сообщений в чат с AI');
|
|
264
|
+
console.log(name, count);
|
|
265
|
+
});
|
|
266
|
+
// await instance.show({
|
|
267
|
+
// email: {
|
|
268
|
+
// "id": "3769995",
|
|
269
|
+
// "isNew": false,
|
|
270
|
+
// "subject": "topic1Ы",
|
|
271
|
+
// "preheader": "pre",
|
|
272
|
+
// "description": "",
|
|
273
|
+
// "project": "undefined",
|
|
274
|
+
// "parent_email": "309707",
|
|
275
|
+
// "common_styles": "{\"text\":{\"fontFamily\":[\"Safe Fonts\",\"-apple-system, 'Segoe UI', 'Helvetica Neue', Helvetica, Roboto, Arial, sans-serif\"],\"fontSize\":16,\"fontSizeDim\":\"px\",\"lineHeight\":21,\"lineHeightDim\":\"px\",\"color\":\"#5a5a5a\",\"textAlign\":\"left\",\"paddingBottom\":10,\"paddingBottomDim\":\"px\"},\"headings\":{\"fontFamily\":[\"Safe Fonts\",\"-apple-system, 'Segoe UI', 'Helvetica Neue', Helvetica, Roboto, Arial, sans-serif\"],\"fontSize\":24,\"fontSizeDim\":\"px\",\"lineHeight\":32,\"lineHeightDim\":\"px\",\"color\":\"#333333\",\"textAlign\":\"left\",\"paddingTop\":20,\"paddingTopDim\":\"px\",\"paddingBottom\":10,\"paddingBottomDim\":\"px\",\"letterSpacing\":0,\"letterSpacingDim\":\"px\",\"bold\":true,\"italic\":false},\"links\":{\"color\":\"#1C52DC\",\"underline\":true},\"buttons\":{\"fontFamily\":[\"Safe Fonts\",\"-apple-system, 'Segoe UI', 'Helvetica Neue', Helvetica, Roboto, Arial, sans-serif\"],\"fontSize\":16,\"fontSizeDim\":\"px\",\"letterSpacing\":0,\"letterSpacingDim\":\"px\",\"color\":\"#FFFFFF\",\"bold\":false,\"italic\":false,\"backgroundColor\":\"#1C52DC\",\"marginTop\":10,\"marginTopDim\":\"px\",\"marginBottom\":10,\"marginBottomDim\":\"px\",\"border\":{\"all\":null,\"top\":null,\"right\":null,\"bottom\":null,\"left\":null},\"borderRadius\":{\"all\":5,\"topLeft\":null,\"topRight\":null,\"bottomRight\":null,\"bottomLeft\":null},\"textAlign\":\"center\",\"padding\":{\"all\":null,\"top\":null,\"right\":null,\"bottom\":null,\"left\":null}},\"block\":{\"backgroundColor\":\"\"}}",
|
|
276
|
+
// "title": "",
|
|
277
|
+
// "date": "2024-01-12T08:42:09",
|
|
278
|
+
// "modified": "2024-02-16T17:21:01",
|
|
279
|
+
// "group": [],
|
|
280
|
+
// "lock": false,
|
|
281
|
+
// "code": "<html><head></head><body><body></html>",
|
|
282
|
+
// }
|
|
283
|
+
// });
|
|
284
|
+
// const email = await instance.getEmail();
|
|
285
|
+
|
|
286
|
+
// const TITLE_REGEX = /<title>(.*)<\/title>/gm;
|
|
287
|
+
// console.log(email.code);
|
|
288
|
+
// email.code.matchAll(TITLE_REGEX).map(item => item[1]).find(title => console.log(title));
|
|
289
|
+
}
|
|
290
|
+
|
|
291
|
+
init()
|
|
292
|
+
.then((e) => {})
|
|
293
|
+
.catch((e) => console.log(e));
|
|
294
|
+
// })</script></body></html>
|
|
@@ -0,0 +1,144 @@
|
|
|
1
|
+
<!doctype html><html lang="en"><head><script id="plugin-script" src="emailmaker.js?333b2f200910aba7bfc5"></script></head><body><div id="test" style="padding: 0px; background: #fff; height: 100vh"></div><script async defer="defer">const getAuthToken = async () => {
|
|
2
|
+
var requestOptions = {
|
|
3
|
+
method: 'POST',
|
|
4
|
+
redirect: 'follow',
|
|
5
|
+
};
|
|
6
|
+
|
|
7
|
+
return fetch('https://imgems.ru/emailmaker/temp_token_selzy.php', requestOptions)
|
|
8
|
+
.then((response) => response.json())
|
|
9
|
+
.then((result) => result.access_token)
|
|
10
|
+
.catch((error) => {
|
|
11
|
+
return '';
|
|
12
|
+
});
|
|
13
|
+
};
|
|
14
|
+
|
|
15
|
+
const options = {
|
|
16
|
+
getAuthToken,
|
|
17
|
+
baseUrl: 'https://app.useblocks.io/api/',
|
|
18
|
+
configSwitcher: true,
|
|
19
|
+
|
|
20
|
+
element: '#test',
|
|
21
|
+
project: '123123',
|
|
22
|
+
content: {
|
|
23
|
+
templateId: 22304,
|
|
24
|
+
email: {
|
|
25
|
+
id: '123123123w2',
|
|
26
|
+
code: 'qweqweqweqwee',
|
|
27
|
+
},
|
|
28
|
+
},
|
|
29
|
+
advancedConfigs: {
|
|
30
|
+
editor: {
|
|
31
|
+
mode: 'editor',
|
|
32
|
+
configSwither: true,
|
|
33
|
+
revisionService: true,
|
|
34
|
+
theme: 'light',
|
|
35
|
+
testEmails: ['test@test.com'],
|
|
36
|
+
settingsEnabled: true,
|
|
37
|
+
UTMEnabled: true,
|
|
38
|
+
// locale: "ru_RU",
|
|
39
|
+
locale: 'en_US',
|
|
40
|
+
// emailDropdownMenuEnabled: true,
|
|
41
|
+
previewIconEnabled: true,
|
|
42
|
+
previewModeEnabled: true,
|
|
43
|
+
livePreviewEnabled: true,
|
|
44
|
+
sendTestEnabled: true,
|
|
45
|
+
emailExportEnabled: true,
|
|
46
|
+
sharePreviewEnabled: true,
|
|
47
|
+
emailDropdownMenuLock: true,
|
|
48
|
+
emailDropdownMenuClone: true,
|
|
49
|
+
emailDropdownMenuRemove: true,
|
|
50
|
+
// Стилизация через token
|
|
51
|
+
mergeTags: {
|
|
52
|
+
syntax: ['{{%value%}}'],
|
|
53
|
+
items: [
|
|
54
|
+
{
|
|
55
|
+
label: 'Системные123',
|
|
56
|
+
value: 'System',
|
|
57
|
+
children: '',
|
|
58
|
+
},
|
|
59
|
+
{
|
|
60
|
+
label: 'Пользовательские',
|
|
61
|
+
value: 'User',
|
|
62
|
+
children: '',
|
|
63
|
+
},
|
|
64
|
+
],
|
|
65
|
+
},
|
|
66
|
+
},
|
|
67
|
+
pro: {
|
|
68
|
+
mode: 'pro',
|
|
69
|
+
configSwither: true,
|
|
70
|
+
revisionService: true,
|
|
71
|
+
theme: 'light',
|
|
72
|
+
testEmails: ['test@test.com'],
|
|
73
|
+
settingsEnabled: true,
|
|
74
|
+
UTMEnabled: true,
|
|
75
|
+
// locale: "ru_RU",
|
|
76
|
+
locale: 'en_US',
|
|
77
|
+
// emailDropdownMenuEnabled: true,
|
|
78
|
+
previewIconEnabled: true,
|
|
79
|
+
previewModeEnabled: true,
|
|
80
|
+
livePreviewEnabled: true,
|
|
81
|
+
sendTestEnabled: true,
|
|
82
|
+
emailExportEnabled: true,
|
|
83
|
+
sharePreviewEnabled: true,
|
|
84
|
+
emailDropdownMenuLock: true,
|
|
85
|
+
emailDropdownMenuClone: true,
|
|
86
|
+
emailDropdownMenuRemove: true,
|
|
87
|
+
// Стилизация через token
|
|
88
|
+
mergeTags: {
|
|
89
|
+
syntax: ['{{%value%}}'],
|
|
90
|
+
items: [
|
|
91
|
+
{
|
|
92
|
+
label: 'Системные123',
|
|
93
|
+
value: 'System',
|
|
94
|
+
children: '',
|
|
95
|
+
},
|
|
96
|
+
{
|
|
97
|
+
label: 'Пользовательские',
|
|
98
|
+
value: 'User',
|
|
99
|
+
children: '',
|
|
100
|
+
},
|
|
101
|
+
],
|
|
102
|
+
},
|
|
103
|
+
},
|
|
104
|
+
simple: {
|
|
105
|
+
mode: 'simple',
|
|
106
|
+
configSwither: true,
|
|
107
|
+
revisionService: true,
|
|
108
|
+
theme: 'light',
|
|
109
|
+
testEmails: ['test@test.com'],
|
|
110
|
+
settingsEnabled: true,
|
|
111
|
+
UTMEnabled: true,
|
|
112
|
+
// locale: "ru_RU",
|
|
113
|
+
locale: 'en_US',
|
|
114
|
+
// emailDropdownMenuEnabled: true,
|
|
115
|
+
previewIconEnabled: true,
|
|
116
|
+
previewModeEnabled: true,
|
|
117
|
+
livePreviewEnabled: true,
|
|
118
|
+
sendTestEnabled: true,
|
|
119
|
+
emailExportEnabled: true,
|
|
120
|
+
sharePreviewEnabled: true,
|
|
121
|
+
emailDropdownMenuLock: true,
|
|
122
|
+
emailDropdownMenuClone: true,
|
|
123
|
+
emailDropdownMenuRemove: true,
|
|
124
|
+
// Стилизация через token
|
|
125
|
+
mergeTags: {
|
|
126
|
+
syntax: ['{{%value%}}'],
|
|
127
|
+
items: [
|
|
128
|
+
{
|
|
129
|
+
label: 'Системные123',
|
|
130
|
+
value: 'System',
|
|
131
|
+
children: '',
|
|
132
|
+
},
|
|
133
|
+
{
|
|
134
|
+
label: 'Пользовательские',
|
|
135
|
+
value: 'User',
|
|
136
|
+
children: '',
|
|
137
|
+
},
|
|
138
|
+
],
|
|
139
|
+
},
|
|
140
|
+
},
|
|
141
|
+
},
|
|
142
|
+
};
|
|
143
|
+
|
|
144
|
+
emailmaker.init(options).then((instance) => {});</script></body></html>
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
<!doctype html><html lang="en"><head><script id="plugin-script" src="emailmaker.js?333b2f200910aba7bfc5"></script></head><body><div id="test" style="padding: 0px; background: #fff; height: 100vh;"></div><script async defer="defer">// import { init } from "./emailmaker-esm.js?333b2f200910aba7bfc5";
|
|
2
|
+
const auth_jwt = {
|
|
3
|
+
username: "****",
|
|
4
|
+
password: "****"
|
|
5
|
+
};
|
|
6
|
+
|
|
7
|
+
const auth_client = {
|
|
8
|
+
client_id: "****",
|
|
9
|
+
client_secret: "****"
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
const getAuthToken = async () => {
|
|
13
|
+
var formdata = new FormData();
|
|
14
|
+
formdata.append("grant_type", "client_credentials");
|
|
15
|
+
formdata.append("client_id", "z72ev3L8JuDoyoE9JQeb2CiVGvVRibQ9q95jNiJ8");
|
|
16
|
+
formdata.append("client_secret", "wxMqp4DbfH6DzKj7xkMg7cQUkh1AbTvxjr04uwQ2");
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
var requestOptions = {
|
|
20
|
+
method: 'POST',
|
|
21
|
+
body: formdata,
|
|
22
|
+
redirect: 'follow'
|
|
23
|
+
};
|
|
24
|
+
console.log("getToken");
|
|
25
|
+
|
|
26
|
+
return fetch("http://localhost:3000/api?oauth=token", requestOptions)
|
|
27
|
+
.then(response => response.json())
|
|
28
|
+
.then(result => result.access_token)
|
|
29
|
+
.catch(error => {
|
|
30
|
+
console.log('error', error);
|
|
31
|
+
return "";
|
|
32
|
+
});
|
|
33
|
+
};
|
|
34
|
+
|
|
35
|
+
const auth_client_oauth = {
|
|
36
|
+
client_id: "****",
|
|
37
|
+
client_secret: "****",
|
|
38
|
+
};
|
|
39
|
+
|
|
40
|
+
const options = {
|
|
41
|
+
getAuthToken,
|
|
42
|
+
element: "#test",
|
|
43
|
+
content: {
|
|
44
|
+
templateId: 321739,
|
|
45
|
+
email: {
|
|
46
|
+
id: "m231",
|
|
47
|
+
},
|
|
48
|
+
blocks: [
|
|
49
|
+
|
|
50
|
+
]
|
|
51
|
+
},
|
|
52
|
+
project: "test_project",
|
|
53
|
+
};
|
|
54
|
+
|
|
55
|
+
emailmaker.init(options).then(instance => {
|
|
56
|
+
});</script></body></html>
|