@emailmaker/emailmaker 1.0.96 → 1.0.98

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.
Files changed (185) hide show
  1. package/README.md +1 -1
  2. package/iframe/429.js +1 -1
  3. package/iframe/766.js +1 -1
  4. package/iframe/iframe-eblock.441a4dbc4384f20fcf1e.html +1 -0
  5. package/iframe/iframe.441a4dbc4384f20fcf1e.html +1 -0
  6. package/iframe/js/330.378aec42.js +1 -0
  7. package/iframe/js/{826.0e4820c1.js.LICENSE.txt → 330.378aec42.js.LICENSE.txt} +1 -1
  8. package/iframe/sandbox-eblock.js +1 -1
  9. package/iframe/sandbox.js +1 -1
  10. package/package.json +1 -1
  11. package/react/index.js +1 -1
  12. package/react/index.mjs +1 -1
  13. package/translations.pot +322 -305
  14. package/asset-manifest.json +0 -165
  15. package/css.worker.js +0 -2
  16. package/css.worker.js.LICENSE.txt +0 -6
  17. package/editor.worker.js +0 -1
  18. package/emailmaker-esm.js +0 -1
  19. package/emailmaker.d.ts +0 -1826
  20. package/emailmaker.js +0 -1
  21. package/html.worker.js +0 -2
  22. package/html.worker.js.LICENSE.txt +0 -14
  23. package/iframe/iframe-eblock.e8d51b90ab45966000c9.html +0 -1
  24. package/iframe/iframe.e8d51b90ab45966000c9.html +0 -1
  25. package/iframe/js/826.0e4820c1.js +0 -1
  26. package/plugin.html +0 -294
  27. package/plugin_blocks_test.html +0 -144
  28. package/plugin_default.html +0 -56
  29. package/plugin_idigital.html +0 -254
  30. package/plugin_nota.html +0 -861
  31. package/plugin_s.html +0 -31
  32. package/static/css/57.3f9e7de8.chunk.css +0 -1
  33. package/static/css/578.fe5765dd.chunk.css +0 -1
  34. package/static/css/6501.e131603e.chunk.css +0 -1
  35. package/static/css/6798.94b6a519.chunk.css +0 -1
  36. package/static/css/8084.15f07f40.chunk.css +0 -1
  37. package/static/js/1303.f6ad7f62.js +0 -2
  38. package/static/js/1303.f6ad7f62.js.LICENSE.txt +0 -11
  39. package/static/js/1538.97b965ba.chunk.js +0 -2
  40. package/static/js/1538.97b965ba.chunk.js.LICENSE.txt +0 -23
  41. package/static/js/1654.d922b07e.js +0 -2
  42. package/static/js/1654.d922b07e.js.LICENSE.txt +0 -38
  43. package/static/js/1729.a0be903e.chunk.js +0 -1
  44. package/static/js/1880.a21db601.chunk.js +0 -1
  45. package/static/js/2642.b60a63f6.chunk.js +0 -1
  46. package/static/js/2715.c21845e3.js +0 -2
  47. package/static/js/2715.c21845e3.js.LICENSE.txt +0 -59
  48. package/static/js/3017.6335b77e.chunk.js +0 -1
  49. package/static/js/3019.aaa6d087.chunk.js +0 -2
  50. package/static/js/3019.aaa6d087.chunk.js.LICENSE.txt +0 -6
  51. package/static/js/3085.b9d27236.chunk.js +0 -2
  52. package/static/js/3085.b9d27236.chunk.js.LICENSE.txt +0 -54
  53. package/static/js/3220.db24c24f.js +0 -2
  54. package/static/js/3220.db24c24f.js.LICENSE.txt +0 -39
  55. package/static/js/4309.ae8e4ad0.chunk.js +0 -1
  56. package/static/js/4972.264e4569.js +0 -1
  57. package/static/js/5346.4aaf9222.chunk.js +0 -2
  58. package/static/js/5346.4aaf9222.chunk.js.LICENSE.txt +0 -6
  59. package/static/js/542.c5e7e839.js +0 -2
  60. package/static/js/542.c5e7e839.js.LICENSE.txt +0 -21
  61. package/static/js/57.4cd2b40e.chunk.js +0 -1
  62. package/static/js/578.068dd4e8.chunk.js +0 -2
  63. package/static/js/578.068dd4e8.chunk.js.LICENSE.txt +0 -6
  64. package/static/js/6144.a3bf0881.chunk.js +0 -2
  65. package/static/js/6144.a3bf0881.chunk.js.LICENSE.txt +0 -6
  66. package/static/js/6419.e52a6158.js +0 -2
  67. package/static/js/6419.e52a6158.js.LICENSE.txt +0 -1
  68. package/static/js/6501.7570e270.chunk.js +0 -1
  69. package/static/js/6798.ae85cbf9.chunk.js +0 -2
  70. package/static/js/6798.ae85cbf9.chunk.js.LICENSE.txt +0 -39
  71. package/static/js/6819.85c72c79.chunk.js +0 -2
  72. package/static/js/6819.85c72c79.chunk.js.LICENSE.txt +0 -6
  73. package/static/js/6957.5082b810.chunk.js +0 -1
  74. package/static/js/7463.69864ff5.chunk.js +0 -2
  75. package/static/js/7463.69864ff5.chunk.js.LICENSE.txt +0 -6
  76. package/static/js/8084.5458cfaf.chunk.js +0 -1
  77. package/static/js/8473.54e12d36.chunk.js +0 -2
  78. package/static/js/8473.54e12d36.chunk.js.LICENSE.txt +0 -101
  79. package/static/js/8521.a1623fc2.chunk.js +0 -2
  80. package/static/js/8521.a1623fc2.chunk.js.LICENSE.txt +0 -6
  81. package/static/js/9644.1ae95bb7.chunk.js +0 -2
  82. package/static/js/9644.1ae95bb7.chunk.js.LICENSE.txt +0 -6
  83. package/static/js/9960.218c70ae.chunk.js +0 -2
  84. package/static/js/9960.218c70ae.chunk.js.LICENSE.txt +0 -30
  85. package/static/js/9981.6c41ee44.js +0 -1
  86. package/static/js/ant-locale/locale-ar_EG-js.a1f4a2ee.chunk.js +0 -1
  87. package/static/js/ant-locale/locale-az_AZ-js.1b3f2ec6.chunk.js +0 -1
  88. package/static/js/ant-locale/locale-bg_BG-js.2f68d816.chunk.js +0 -1
  89. package/static/js/ant-locale/locale-bn_BD-js.38ca14cb.chunk.js +0 -1
  90. package/static/js/ant-locale/locale-by_BY-js.927570db.chunk.js +0 -1
  91. package/static/js/ant-locale/locale-ca_ES-js.e4bdfa2b.chunk.js +0 -1
  92. package/static/js/ant-locale/locale-cs_CZ-js.f1151015.chunk.js +0 -1
  93. package/static/js/ant-locale/locale-da_DK-js.33e12cfb.chunk.js +0 -1
  94. package/static/js/ant-locale/locale-de_DE-js.42497042.chunk.js +0 -1
  95. package/static/js/ant-locale/locale-el_GR-js.007d40b4.chunk.js +0 -1
  96. package/static/js/ant-locale/locale-en_GB-js.6756ba01.chunk.js +0 -1
  97. package/static/js/ant-locale/locale-es_ES-js.43424efe.chunk.js +0 -1
  98. package/static/js/ant-locale/locale-et_EE-js.3694348e.chunk.js +0 -1
  99. package/static/js/ant-locale/locale-eu_ES-js.e2678a29.chunk.js +0 -1
  100. package/static/js/ant-locale/locale-fa_IR-js.3b6bfddc.chunk.js +0 -1
  101. package/static/js/ant-locale/locale-fi_FI-js.8e749864.chunk.js +0 -1
  102. package/static/js/ant-locale/locale-fr_BE-js.2aec36ca.chunk.js +0 -1
  103. package/static/js/ant-locale/locale-fr_CA-js.ba00ca3a.chunk.js +0 -1
  104. package/static/js/ant-locale/locale-fr_FR-js.1e6d0a10.chunk.js +0 -1
  105. package/static/js/ant-locale/locale-ga_IE-js.cc1f0f56.chunk.js +0 -1
  106. package/static/js/ant-locale/locale-gl_ES-js.c1588dec.chunk.js +0 -1
  107. package/static/js/ant-locale/locale-he_IL-js.1be3257a.chunk.js +0 -1
  108. package/static/js/ant-locale/locale-hi_IN-js.8e3ea1dc.chunk.js +0 -1
  109. package/static/js/ant-locale/locale-hr_HR-js.94001d08.chunk.js +0 -1
  110. package/static/js/ant-locale/locale-hu_HU-js.50a3ffc6.chunk.js +0 -1
  111. package/static/js/ant-locale/locale-hy_AM-js.6b20bceb.chunk.js +0 -1
  112. package/static/js/ant-locale/locale-id_ID-js.b380cc8b.chunk.js +0 -1
  113. package/static/js/ant-locale/locale-is_IS-js.995979c0.chunk.js +0 -1
  114. package/static/js/ant-locale/locale-it_IT-js.46a8ce6d.chunk.js +0 -1
  115. package/static/js/ant-locale/locale-ja_JP-js.69f9da33.chunk.js +0 -1
  116. package/static/js/ant-locale/locale-ka_GE-js.8b08646c.chunk.js +0 -1
  117. package/static/js/ant-locale/locale-kk_KZ-js.a1cc2ddc.chunk.js +0 -1
  118. package/static/js/ant-locale/locale-km_KH-js.09c630f9.chunk.js +0 -1
  119. package/static/js/ant-locale/locale-kmr_IQ-js.c25f3afa.chunk.js +0 -1
  120. package/static/js/ant-locale/locale-kn_IN-js.40066823.chunk.js +0 -1
  121. package/static/js/ant-locale/locale-ko_KR-js.68047848.chunk.js +0 -1
  122. package/static/js/ant-locale/locale-ku_IQ-js.594553b1.chunk.js +0 -1
  123. package/static/js/ant-locale/locale-lt_LT-js.08ac662b.chunk.js +0 -1
  124. package/static/js/ant-locale/locale-lv_LV-js.2a33af61.chunk.js +0 -1
  125. package/static/js/ant-locale/locale-mk_MK-js.caa088c9.chunk.js +0 -1
  126. package/static/js/ant-locale/locale-ml_IN-js.3aa233eb.chunk.js +0 -1
  127. package/static/js/ant-locale/locale-mn_MN-js.2550caa5.chunk.js +0 -1
  128. package/static/js/ant-locale/locale-ms_MY-js.924bfbf0.chunk.js +0 -1
  129. package/static/js/ant-locale/locale-my_MM-js.bc3805ae.chunk.js +0 -1
  130. package/static/js/ant-locale/locale-nb_NO-js.471cc88a.chunk.js +0 -1
  131. package/static/js/ant-locale/locale-ne_NP-js.52b65a1a.chunk.js +0 -1
  132. package/static/js/ant-locale/locale-nl_BE-js.2af0a7fe.chunk.js +0 -1
  133. package/static/js/ant-locale/locale-nl_NL-js.453457a0.chunk.js +0 -1
  134. package/static/js/ant-locale/locale-pl_PL-js.1e4b27da.chunk.js +0 -1
  135. package/static/js/ant-locale/locale-pt_BR-js.75dc6403.chunk.js +0 -1
  136. package/static/js/ant-locale/locale-pt_PT-js.b07438c3.chunk.js +0 -1
  137. package/static/js/ant-locale/locale-ro_RO-js.4a05dc9d.chunk.js +0 -1
  138. package/static/js/ant-locale/locale-si_LK-js.3b54f4c4.chunk.js +0 -1
  139. package/static/js/ant-locale/locale-sk_SK-js.cd76b6b1.chunk.js +0 -1
  140. package/static/js/ant-locale/locale-sl_SI-js.8afbce30.chunk.js +0 -1
  141. package/static/js/ant-locale/locale-sr_RS-js.0708405f.chunk.js +0 -1
  142. package/static/js/ant-locale/locale-sv_SE-js.9f47a065.chunk.js +0 -1
  143. package/static/js/ant-locale/locale-ta_IN-js.3b46361c.chunk.js +0 -1
  144. package/static/js/ant-locale/locale-th_TH-js.83e732d3.chunk.js +0 -1
  145. package/static/js/ant-locale/locale-tk_TK-js.63d0b187.chunk.js +0 -1
  146. package/static/js/ant-locale/locale-tr_TR-js.b5e42917.chunk.js +0 -1
  147. package/static/js/ant-locale/locale-uk_UA-js.ef0d8c8e.chunk.js +0 -1
  148. package/static/js/ant-locale/locale-ur_PK-js.904c3e1c.chunk.js +0 -1
  149. package/static/js/ant-locale/locale-vi_VN-js.f0324229.chunk.js +0 -1
  150. package/static/js/ant-locale/locale-zh_CN-js.428a6bc7.chunk.js +0 -1
  151. package/static/js/ant-locale/locale-zh_HK-js.0feb368f.chunk.js +0 -1
  152. package/static/js/ant-locale/locale-zh_TW-js.163140fa.chunk.js +0 -1
  153. package/static/js/emailmaker_core.f495f35b.js +0 -2
  154. package/static/js/emailmaker_core.f495f35b.js.LICENSE.txt +0 -23
  155. package/static/js/mergeTags/locale0.594765fd.chunk.js +0 -1
  156. package/static/js/mergeTags/locale1.7a79e21e.chunk.js +0 -1
  157. package/static/media/ai-image.7c42c2e12001ebf31881.png +0 -0
  158. package/static/media/codicon.f13d28f3e470ec5c0896.ttf +0 -0
  159. package/static/media/empty-image.1827d6561f3c4042dfb3.png +0 -0
  160. package/static/media/fb.ff10384394f8044ec889.png +0 -0
  161. package/static/media/frame_dark.318d7ed53535d80662dc.png +0 -0
  162. package/static/media/frame_light.22a9b4ec728365d8193f.png +0 -0
  163. package/static/media/frame_template_gallery.85693b3950e7689fb3a5.png +0 -0
  164. package/static/media/icon-border-radius.2a56b93a7711558098a622296b7ae2e1.svg +0 -1
  165. package/static/media/icon-create-block.0b077f4000bf7907b9ea871d28c7fb1e.svg +0 -1
  166. package/static/media/icon-menu-block-welcome.1c534a003522feadd2e7.png +0 -0
  167. package/static/media/ig.47a89992b4bec92d4364.png +0 -0
  168. package/static/media/project-email-back-dark.9916625a9a714830b770.svg +0 -29
  169. package/static/media/project-email-back.0ce470def19ce7c063e0.svg +0 -29
  170. package/static/media/sign_up_01.333271584216122b89ba.png +0 -0
  171. package/static/media/sign_up_01_blocks.5538cfdb90d4869794dc.png +0 -0
  172. package/static/media/sign_up_02.d99d2aa6bf1ea74f01fa.png +0 -0
  173. package/static/media/sign_up_02_blocks.837fc2c9a9461fda13be.png +0 -0
  174. package/static/media/sign_up_03.5545ffad60a2cb5e0336.png +0 -0
  175. package/static/media/sign_up_03_blocks.126601f7a6fbea4b6c54.png +0 -0
  176. package/static/media/sign_up_04.398a4ca50d5f5b3cd837.png +0 -0
  177. package/static/media/sign_up_04_blocks.255c5c07b23cbcc256fd.png +0 -0
  178. package/static/media/sign_up_05.4c58df1be2edaa79d52b.png +0 -0
  179. package/static/media/sign_up_05_blocks.431b6844fdf3e14642c2.png +0 -0
  180. package/static/media/tg.10f004529a98df9732b9.png +0 -0
  181. package/static/media/tw.823a7736ac2d82815c71.png +0 -0
  182. package/static/media/video.854adea50295d0a3f7ae.png +0 -0
  183. package/static/media/vk.fe41df919f4e8718e0b3.png +0 -0
  184. package/static/media/yd.c40d05dde64ef695fdf2.png +0 -0
  185. package/static/media/yt.4ac57e55d158b40c7fc1.png +0 -0
package/plugin.html DELETED
@@ -1,294 +0,0 @@
1
- <!doctype html><html lang="en"><head><script id="plugin-script" src="emailmaker.js?26319353ace703f94d90"></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?26319353ace703f94d90";
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>
@@ -1,144 +0,0 @@
1
- <!doctype html><html lang="en"><head><script id="plugin-script" src="emailmaker.js?26319353ace703f94d90"></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>
@@ -1,56 +0,0 @@
1
- <!doctype html><html lang="en"><head><script id="plugin-script" src="emailmaker.js?26319353ace703f94d90"></script></head><body><div id="test" style="padding: 0px; background: #fff; height: 100vh;"></div><script async defer="defer">// import { init } from "./emailmaker-esm.js?26319353ace703f94d90";
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>