@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
|
@@ -0,0 +1,254 @@
|
|
|
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 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
|
+
|
|
23
|
+
const getAuthToken = async () => {
|
|
24
|
+
var requestOptions = {
|
|
25
|
+
method: 'POST',
|
|
26
|
+
redirect: 'follow'
|
|
27
|
+
};
|
|
28
|
+
|
|
29
|
+
return fetch("https://emailmaker.ru/tests/plugin/temp_token_em.php", requestOptions)
|
|
30
|
+
.then(response => response.json())
|
|
31
|
+
.then(result => result.access_token)
|
|
32
|
+
.catch(error => { return ""; });
|
|
33
|
+
};
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
|
|
37
|
+
const auth_client_oauth = {
|
|
38
|
+
client_id: "****",
|
|
39
|
+
client_secret: "****",
|
|
40
|
+
};
|
|
41
|
+
|
|
42
|
+
|
|
43
|
+
const BLOCKS_KEY = "blocks";
|
|
44
|
+
const COMMENTS_KEY = "blocks";
|
|
45
|
+
const RESOURSE = 'aaa.bbb.xyz.com';
|
|
46
|
+
let _instance = undefined;
|
|
47
|
+
const options = {
|
|
48
|
+
getAuthToken,
|
|
49
|
+
element: "#test",
|
|
50
|
+
|
|
51
|
+
// headless: true,
|
|
52
|
+
content: {
|
|
53
|
+
// templateId: 321739,
|
|
54
|
+
|
|
55
|
+
// email: {
|
|
56
|
+
// id: '3769995',
|
|
57
|
+
// author: 123,
|
|
58
|
+
// isNew: false,
|
|
59
|
+
// subject: 'topic',
|
|
60
|
+
// preheader: '',
|
|
61
|
+
// description: '',
|
|
62
|
+
// project: 'undefined',
|
|
63
|
+
// parent_email: '309707',
|
|
64
|
+
// common_styles:
|
|
65
|
+
// '{"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":""}}',
|
|
66
|
+
// title: '',
|
|
67
|
+
// date: '2024-01-12T08:42:09',
|
|
68
|
+
// modified: '2024-02-16T17:21:01',
|
|
69
|
+
// group: [],
|
|
70
|
+
// lock: false,
|
|
71
|
+
// utm_parameters: {
|
|
72
|
+
// utm_content: 'ssssssss',
|
|
73
|
+
// },
|
|
74
|
+
// // "code": "<html><head></head><body><body></html>",
|
|
75
|
+
// },
|
|
76
|
+
title: "Email subject",
|
|
77
|
+
html: `loading`,
|
|
78
|
+
},
|
|
79
|
+
project: undefined,
|
|
80
|
+
user: {
|
|
81
|
+
id: 123,
|
|
82
|
+
username: "testetrter",
|
|
83
|
+
name: "ssss"
|
|
84
|
+
},
|
|
85
|
+
|
|
86
|
+
config: {
|
|
87
|
+
theme: "light",
|
|
88
|
+
themes: {
|
|
89
|
+
light: {
|
|
90
|
+
token: {
|
|
91
|
+
colorPrimary: "#009CE5",
|
|
92
|
+
colorPrimaryBorder: "#BAC5CD",
|
|
93
|
+
colorPrimaryBg: "#F4F6F7",
|
|
94
|
+
colorInfo: "#009CE5",
|
|
95
|
+
colorSuccess: "#F4F6F7",
|
|
96
|
+
controlItemBgActive: "#F4F6F7",
|
|
97
|
+
colorLink: "#009CE5",
|
|
98
|
+
colorTextBase: "#333333",
|
|
99
|
+
colorBgLayout: "#F4F6F7",
|
|
100
|
+
borderRadiusXL: 10,
|
|
101
|
+
borderRadiusLG: 10,
|
|
102
|
+
borderRadius: 16,
|
|
103
|
+
borderRadiusSM: 10
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
},
|
|
107
|
+
styles: `* { font-family: "Euclid Circular A", sans-serif; }
|
|
108
|
+
.ant-upload { display: none; }
|
|
109
|
+
.ant-space-compact-block { display: none; } `,
|
|
110
|
+
aiAssistentEnabled: false,
|
|
111
|
+
blocksCommonEnabled: false,
|
|
112
|
+
blocksEmptyEnabled: false,
|
|
113
|
+
blocksSavedEnabled: false,
|
|
114
|
+
blocksSearchEnabled: false,
|
|
115
|
+
blocksTemplateEnabled: false,
|
|
116
|
+
commentsEnabled: false,
|
|
117
|
+
editImageControlEnabled: false,
|
|
118
|
+
elementAccordionEnabled: false,
|
|
119
|
+
elementAIimageEnabled: false,
|
|
120
|
+
elementAItextEnabled: false,
|
|
121
|
+
elementCarouselEnabled: false,
|
|
122
|
+
elementCountdownEnabled: false,
|
|
123
|
+
elementFormEnabled: false,
|
|
124
|
+
elementVideoEnabled: false,
|
|
125
|
+
emailDropdownMenuClone: false,
|
|
126
|
+
exportPdfEnabled: false,
|
|
127
|
+
exportPngEnabled: false,
|
|
128
|
+
exportWebHookEnabled: false,
|
|
129
|
+
formFieldVisibilityEnabled: false,
|
|
130
|
+
headerArrowBackVisible: false,
|
|
131
|
+
headerPreheaderVisible: false,
|
|
132
|
+
headerTitleVisible: false,
|
|
133
|
+
historyEnabled: false,
|
|
134
|
+
imageCenterEditorEnabled: false,
|
|
135
|
+
imageCenterGifEnabled: false,
|
|
136
|
+
imageCenterStockEnabled: false,
|
|
137
|
+
optimizeEnabled: false,
|
|
138
|
+
pathEnabled: false,
|
|
139
|
+
previewIconEnabled: false,
|
|
140
|
+
saveBlockEnabled: false,
|
|
141
|
+
saveButtonEnabled: false,
|
|
142
|
+
sendTestEnabled: false,
|
|
143
|
+
settingsEnabled: false,
|
|
144
|
+
sharePreviewEnabled: false
|
|
145
|
+
},
|
|
146
|
+
handleReadEmail: async (code) => {
|
|
147
|
+
const savedEmail = localStorage.getItem('savedEmail')
|
|
148
|
+
if (savedEmail) {
|
|
149
|
+
const email = JSON.parse(savedEmail)
|
|
150
|
+
if (email.code === code) {
|
|
151
|
+
return email
|
|
152
|
+
}
|
|
153
|
+
}
|
|
154
|
+
return null
|
|
155
|
+
}
|
|
156
|
+
};
|
|
157
|
+
async function init() {
|
|
158
|
+
const instance = await emailmaker.init(options);
|
|
159
|
+
instance.handleSaveEmail(async ({ value, patch, prev }) => {
|
|
160
|
+
const _email = await instance.compileEmail(value);
|
|
161
|
+
console.log(_email);
|
|
162
|
+
});
|
|
163
|
+
instance.setConfig({
|
|
164
|
+
...options.config,
|
|
165
|
+
handleSaveEmail: async () => {
|
|
166
|
+
const email = await this.emailMakerInstance.compileEmail()
|
|
167
|
+
this.saveLetter(email)
|
|
168
|
+
}
|
|
169
|
+
});
|
|
170
|
+
// await instance.show({
|
|
171
|
+
// email: {
|
|
172
|
+
// "id": "3769995",
|
|
173
|
+
// "isNew": false,
|
|
174
|
+
// "subject": "topic1Ы",
|
|
175
|
+
// "preheader": "pre",
|
|
176
|
+
// "description": "",
|
|
177
|
+
// "project": "undefined",
|
|
178
|
+
// "parent_email": "309707",
|
|
179
|
+
// "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\":\"\"}}",
|
|
180
|
+
// "title": "",
|
|
181
|
+
// "date": "2024-01-12T08:42:09",
|
|
182
|
+
// "modified": "2024-02-16T17:21:01",
|
|
183
|
+
// "group": [],
|
|
184
|
+
// "lock": false,
|
|
185
|
+
// "code": "<html><head></head><body><body></html>",
|
|
186
|
+
// }
|
|
187
|
+
// });
|
|
188
|
+
// const email = await instance.getEmail();
|
|
189
|
+
|
|
190
|
+
// const TITLE_REGEX = /<title>(.*)<\/title>/gm;
|
|
191
|
+
// console.log(email.code);
|
|
192
|
+
// email.code.matchAll(TITLE_REGEX).map(item => item[1]).find(title => console.log(title));
|
|
193
|
+
};
|
|
194
|
+
// async function init() {
|
|
195
|
+
// // const response = await fetch("./key.txt");
|
|
196
|
+
// // const key = await response.text();
|
|
197
|
+
// const instance = await emailmaker.init({ ...options });
|
|
198
|
+
// instance.handleSaveEmail(async ({ value, patch, prev }) => {
|
|
199
|
+
// const _email = await instance.compileEmail(value);
|
|
200
|
+
// console.log(_email);
|
|
201
|
+
// _email.utm_parameters = { ..._email.utm_parameters, utm_content: "333" }
|
|
202
|
+
// const a = await instance.compileEmail(_email);
|
|
203
|
+
// console.log(a);
|
|
204
|
+
// });
|
|
205
|
+
// setTimeout(() => {
|
|
206
|
+
// console.log(instance.getCodeErrors());
|
|
207
|
+
// }, 5000);
|
|
208
|
+
// instance.setConfig({
|
|
209
|
+
// ...options.config,
|
|
210
|
+
// mergeTags: {
|
|
211
|
+
// "syntax": [
|
|
212
|
+
// "{{%value%}}"
|
|
213
|
+
// ],
|
|
214
|
+
// "items": [
|
|
215
|
+
// {
|
|
216
|
+
// "label": "Системные3131",
|
|
217
|
+
// "value": "System",
|
|
218
|
+
// "children": systemfields
|
|
219
|
+
// },
|
|
220
|
+
// {
|
|
221
|
+
// "label": "Пользовательские4444",
|
|
222
|
+
// "value": "User",
|
|
223
|
+
// "children": systemfields
|
|
224
|
+
// }
|
|
225
|
+
// ]
|
|
226
|
+
// }
|
|
227
|
+
// });
|
|
228
|
+
// // await instance.show({
|
|
229
|
+
// // email: {
|
|
230
|
+
// // "id": "3769995",
|
|
231
|
+
// // "isNew": false,
|
|
232
|
+
// // "subject": "topic1Ы",
|
|
233
|
+
// // "preheader": "pre",
|
|
234
|
+
// // "description": "",
|
|
235
|
+
// // "project": "undefined",
|
|
236
|
+
// // "parent_email": "309707",
|
|
237
|
+
// // "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\":\"\"}}",
|
|
238
|
+
// // "title": "",
|
|
239
|
+
// // "date": "2024-01-12T08:42:09",
|
|
240
|
+
// // "modified": "2024-02-16T17:21:01",
|
|
241
|
+
// // "group": [],
|
|
242
|
+
// // "lock": false,
|
|
243
|
+
// // "code": "<html><head></head><body><body></html>",
|
|
244
|
+
// // }
|
|
245
|
+
// // });
|
|
246
|
+
// // const email = await instance.getEmail();
|
|
247
|
+
|
|
248
|
+
// // const TITLE_REGEX = /<title>(.*)<\/title>/gm;
|
|
249
|
+
// // console.log(email.code);
|
|
250
|
+
// // email.code.matchAll(TITLE_REGEX).map(item => item[1]).find(title => console.log(title));
|
|
251
|
+
// }
|
|
252
|
+
|
|
253
|
+
init().catch(e => console.log(e));
|
|
254
|
+
// })</script></body></html>
|