useblocks 1.0.111 → 1.0.113

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 (228) hide show
  1. package/CHANGELOG.en.md +11 -0
  2. package/CHANGELOG.md +11 -0
  3. package/README.md +125 -100
  4. package/asset-manifest.json +204 -197
  5. package/iframe/429.js +1 -1
  6. package/iframe/766.js +1 -1
  7. package/iframe/css/sandbox-darktheme.css +23 -7
  8. package/iframe/css/sandbox.css +24 -12
  9. package/iframe/iframe-eblock.ddf2c21cb6230265e099.html +1 -0
  10. package/iframe/iframe.ddf2c21cb6230265e099.html +1 -0
  11. package/iframe/index.html +1 -1
  12. package/iframe/js/525.67635344.js +1 -0
  13. package/iframe/js/667.71a178b7.js +1 -0
  14. package/iframe/js/882.8ff0b349.js +1 -0
  15. package/iframe/sandbox-eblock.js +1 -1
  16. package/js/amplitude.min.js +8 -10
  17. package/js/browser-image-compression.js +3054 -1
  18. package/js/sourcebuster.min.js +0 -1
  19. package/package.json +1 -1
  20. package/static/css/{8778.3f22f159.chunk.css → 2557.2ede4a53.chunk.css} +2 -2
  21. package/static/css/{6310.ce3b451b.chunk.css → 6310.49bbc429.chunk.css} +2 -2
  22. package/static/css/9617.36fe0d8e.chunk.css +2 -0
  23. package/static/css/main.15e1c81d.css +2 -0
  24. package/static/js/1241.e3e56034.js +2 -0
  25. package/static/js/1330.ef930318.js +2 -0
  26. package/static/js/1332.0cb959b4.js +2 -0
  27. package/static/js/1377.2c61acc1.js +2 -0
  28. package/static/js/1454.84d2c0a8.js +2 -0
  29. package/static/js/1502.8a2f6e6b.js +2 -0
  30. package/static/js/1510.e74cce46.js +2 -0
  31. package/static/js/1626.3320a5f3.js +2 -0
  32. package/static/js/1640.27be7178.js +2 -0
  33. package/static/js/1788.d2bc729b.js +2 -0
  34. package/static/js/{1807.edd17ae4.js → 1807.0ba6ab90.js} +3 -3
  35. package/static/js/1872.43ec6943.js +2 -0
  36. package/static/js/{1902.b8ea2bf6.js → 1902.7b351f26.js} +2 -2
  37. package/static/js/{1940.e8374763.js → 1940.f13d2898.js} +3 -3
  38. package/static/js/197.6d76c202.js +2 -0
  39. package/static/js/2066.c62582aa.js +2 -0
  40. package/static/js/2114.e385ca42.js +2 -0
  41. package/static/js/2139.775a0a57.js +3 -0
  42. package/static/js/2248.39c53056.js +2 -0
  43. package/static/js/2336.4fc241a6.js +2 -0
  44. package/static/js/2408.c5572548.js +2 -0
  45. package/static/js/2438.712814b0.js +2 -0
  46. package/static/js/2557.663778e1.js +2 -0
  47. package/static/js/2827.36a23b69.js +2 -0
  48. package/static/js/284.efb80df6.js +2 -0
  49. package/static/js/2844.54191136.js +2 -0
  50. package/static/js/290.b615a90b.js +2 -0
  51. package/static/js/2917.a6e819bf.js +2 -0
  52. package/static/js/2988.2496986e.js +2 -0
  53. package/static/js/327.31ca6e0d.js +3 -0
  54. package/static/js/327.31ca6e0d.js.LICENSE.txt +29 -0
  55. package/static/js/3302.84e32b62.js +2 -0
  56. package/static/js/3411.311c6ae0.js +2 -0
  57. package/static/js/3624.c30f383e.js +2 -0
  58. package/static/js/3628.0deca530.js +3 -0
  59. package/static/js/3711.102a68ee.js +2 -0
  60. package/static/js/3816.8f941c79.js +2 -0
  61. package/static/js/3914.72124e24.js +2 -0
  62. package/static/js/426.ad870198.js +3 -0
  63. package/static/js/426.ad870198.js.LICENSE.txt +163 -0
  64. package/static/js/4425.47aa4461.js +2 -0
  65. package/static/js/4607.f88cf27a.js +2 -0
  66. package/static/js/4686.180d7a12.js +2 -0
  67. package/static/js/4702.eb86f466.js +2 -0
  68. package/static/js/4813.b282e8cb.js +2 -0
  69. package/static/js/4823.ddb0914d.js +2 -0
  70. package/static/js/494.447cdadd.js +2 -0
  71. package/static/js/5108.b3eccf14.js +2 -0
  72. package/static/js/5261.8499aaa1.js +2 -0
  73. package/static/js/5266.8ab2e97a.js +3 -0
  74. package/static/js/5266.8ab2e97a.js.LICENSE.txt +20 -0
  75. package/static/js/5322.413feb5a.js +2 -0
  76. package/static/js/5432.a1089dad.js +2 -0
  77. package/static/js/5466.50904f4e.js +2 -0
  78. package/static/js/5641.7f2999ab.js +3 -0
  79. package/static/js/{3080.353033ae.js.LICENSE.txt → 5641.7f2999ab.js.LICENSE.txt} +0 -9
  80. package/static/js/5653.016de6aa.js +2 -0
  81. package/static/js/5827.9dcc9443.js +2 -0
  82. package/static/js/5862.faad8f74.js +2 -0
  83. package/static/js/5864.6033ee51.js +2 -0
  84. package/static/js/5902.33cce976.js +2 -0
  85. package/static/js/5980.d73d6b51.js +2 -0
  86. package/static/js/6033.eb6097f0.js +2 -0
  87. package/static/js/6135.3b810692.js +2 -0
  88. package/static/js/6310.e0dfd60e.js +2 -0
  89. package/static/js/6418.59058d0d.js +2 -0
  90. package/static/js/6428.57a30f96.js +2 -0
  91. package/static/js/6552.271c84f5.js +2 -0
  92. package/static/js/6618.feb19bcb.js +2 -0
  93. package/static/js/6764.2a43d6d5.js +2 -0
  94. package/static/js/6832.2e6f8499.js +2 -0
  95. package/static/js/7288.efae06f4.js +2 -0
  96. package/static/js/737.b395c2b2.js +2 -0
  97. package/static/js/7426.1de30709.js +2 -0
  98. package/static/js/7673.2db4eeee.js +3 -0
  99. package/static/js/{5255.9c7c7b3d.js.LICENSE.txt → 7673.2db4eeee.js.LICENSE.txt} +9 -0
  100. package/static/js/77.9fcf0459.js +2 -0
  101. package/static/js/7974.db4992e0.js +2 -0
  102. package/static/js/8181.9ceaa143.js +2 -0
  103. package/static/js/8363.7902220a.js +2 -0
  104. package/static/js/8466.d3339ec9.js +2 -0
  105. package/static/js/8534.a012d026.js +2 -0
  106. package/static/js/8580.05b41c79.js +2 -0
  107. package/static/js/8590.3e646adc.js +2 -0
  108. package/static/js/8682.b39ae089.js +2 -0
  109. package/static/js/8796.27f3a38e.js +2 -0
  110. package/static/js/8839.75fb5ef2.js +2 -0
  111. package/static/js/912.e406cb4c.js +3 -0
  112. package/static/js/9169.a1d48107.js +2 -0
  113. package/static/js/9200.f1b7e119.js +2 -0
  114. package/static/js/9487.6209c75a.js +3 -0
  115. package/static/js/9487.6209c75a.js.LICENSE.txt +24 -0
  116. package/static/js/9508.4fb40b12.js +2 -0
  117. package/static/js/9617.6cc3831b.js +3 -0
  118. package/static/js/9716.e99deec1.js +2 -0
  119. package/static/js/useblocks_core.16c5c107.js +3 -0
  120. package/useblocks-esm.js +1 -1
  121. package/useblocks.d.ts +7 -0
  122. package/useblocks.js +1 -1
  123. package/iframe/iframe-eblock.7b382310c122b86eff21.html +0 -1
  124. package/iframe/iframe.7b382310c122b86eff21.html +0 -1
  125. package/iframe/js/174.62b19abc.js +0 -1
  126. package/iframe/js/525.c01787e6.js +0 -1
  127. package/iframe/js/882.4eca7796.js +0 -1
  128. package/static/css/3934.8026f9d8.chunk.css +0 -2
  129. package/static/css/main.6dff3bf8.css +0 -2
  130. package/static/js/1157.1e6829d5.js +0 -3
  131. package/static/js/1157.1e6829d5.js.LICENSE.txt +0 -9
  132. package/static/js/1241.9f7c977b.js +0 -2
  133. package/static/js/1330.607183c7.js +0 -2
  134. package/static/js/1332.3eba834b.js +0 -2
  135. package/static/js/1377.b486b1f4.js +0 -2
  136. package/static/js/1454.23356a65.js +0 -2
  137. package/static/js/1502.6be06fc7.js +0 -2
  138. package/static/js/1510.32a77efc.js +0 -2
  139. package/static/js/1626.0cd4dd3f.js +0 -2
  140. package/static/js/1640.7ae88653.js +0 -2
  141. package/static/js/1788.e7e85733.js +0 -2
  142. package/static/js/1872.610556e1.js +0 -2
  143. package/static/js/197.64f9fd6b.js +0 -2
  144. package/static/js/2066.a4cfddd1.js +0 -2
  145. package/static/js/2114.dff67863.js +0 -2
  146. package/static/js/2139.fe670ca3.js +0 -3
  147. package/static/js/2248.364643d4.js +0 -2
  148. package/static/js/2408.8dcea713.js +0 -2
  149. package/static/js/2438.02617e55.js +0 -2
  150. package/static/js/2827.e02551c9.js +0 -2
  151. package/static/js/284.89002158.js +0 -2
  152. package/static/js/2844.4c02df45.js +0 -2
  153. package/static/js/290.3b771060.js +0 -2
  154. package/static/js/2917.f75d7ce1.js +0 -2
  155. package/static/js/2988.6d43f35a.js +0 -2
  156. package/static/js/3080.353033ae.js +0 -3
  157. package/static/js/3302.9b320bc9.js +0 -2
  158. package/static/js/3411.69f4008b.js +0 -2
  159. package/static/js/3624.a7076f34.js +0 -2
  160. package/static/js/3628.d51bff41.js +0 -3
  161. package/static/js/3711.d621dbad.js +0 -2
  162. package/static/js/3816.bf684fe1.js +0 -2
  163. package/static/js/3914.c63f1b85.js +0 -2
  164. package/static/js/3934.1b72968b.js +0 -3
  165. package/static/js/4301.5da300dd.js +0 -2
  166. package/static/js/4425.39579a63.js +0 -2
  167. package/static/js/4607.25f2d561.js +0 -2
  168. package/static/js/4686.6a800b56.js +0 -2
  169. package/static/js/4702.de98cbd5.js +0 -2
  170. package/static/js/4813.ca2fe39e.js +0 -2
  171. package/static/js/4823.d4ba65be.js +0 -2
  172. package/static/js/4875.9b1d5dc8.js +0 -3
  173. package/static/js/4875.9b1d5dc8.js.LICENSE.txt +0 -40
  174. package/static/js/494.87c48e86.js +0 -2
  175. package/static/js/5108.473a7fe1.js +0 -2
  176. package/static/js/5255.9c7c7b3d.js +0 -3
  177. package/static/js/5261.3e64116f.js +0 -2
  178. package/static/js/5322.ce259c32.js +0 -2
  179. package/static/js/5466.a0f769cb.js +0 -2
  180. package/static/js/5612.37f3811e.js +0 -3
  181. package/static/js/5612.37f3811e.js.LICENSE.txt +0 -30
  182. package/static/js/5653.5f06277c.js +0 -2
  183. package/static/js/5800.c5dc1c76.js +0 -3
  184. package/static/js/5827.6555a26a.js +0 -2
  185. package/static/js/5862.225d9aac.js +0 -2
  186. package/static/js/5864.340bc721.js +0 -2
  187. package/static/js/5902.73cb2cc4.js +0 -2
  188. package/static/js/5980.fbc691ed.js +0 -2
  189. package/static/js/6033.71847c1c.js +0 -2
  190. package/static/js/6135.ceb22131.js +0 -2
  191. package/static/js/6310.b62546f1.js +0 -2
  192. package/static/js/6418.5c3bf780.js +0 -2
  193. package/static/js/6428.8b233458.js +0 -2
  194. package/static/js/6552.9d811323.js +0 -2
  195. package/static/js/6618.8866f1fa.js +0 -2
  196. package/static/js/6764.9e4a7f5f.js +0 -2
  197. package/static/js/6832.4c4f3da7.js +0 -2
  198. package/static/js/7288.170ea51b.js +0 -2
  199. package/static/js/737.fae14b35.js +0 -2
  200. package/static/js/7426.eaa2cbe4.js +0 -2
  201. package/static/js/77.6ea8ad5d.js +0 -2
  202. package/static/js/7974.5b71f208.js +0 -2
  203. package/static/js/8081.95779f5d.js +0 -2
  204. package/static/js/8466.ae622785.js +0 -2
  205. package/static/js/8534.10b79ff1.js +0 -2
  206. package/static/js/8580.4a5c4223.js +0 -2
  207. package/static/js/8590.2779de33.js +0 -2
  208. package/static/js/8682.ec99bbfe.js +0 -2
  209. package/static/js/8778.37afb80d.js +0 -2
  210. package/static/js/8796.a6838d71.js +0 -2
  211. package/static/js/8839.25cace14.js +0 -2
  212. package/static/js/9169.dee65ca6.js +0 -2
  213. package/static/js/9200.63433716.js +0 -2
  214. package/static/js/9508.a68ced7b.js +0 -2
  215. package/static/js/9716.fb4af6bc.js +0 -2
  216. package/static/js/useblocks_core.3f3f7e7e.js +0 -3
  217. package/static/media/icon-border-radius.2a56b93a7711558098a622296b7ae2e1.svg +0 -1
  218. package/static/media/icon-create-block.0b077f4000bf7907b9ea871d28c7fb1e.svg +0 -1
  219. /package/iframe/js/{525.c01787e6.js.LICENSE.txt → 525.67635344.js.LICENSE.txt} +0 -0
  220. /package/iframe/js/{174.62b19abc.js.LICENSE.txt → 667.71a178b7.js.LICENSE.txt} +0 -0
  221. /package/iframe/js/{882.4eca7796.js.LICENSE.txt → 882.8ff0b349.js.LICENSE.txt} +0 -0
  222. /package/static/js/{1807.edd17ae4.js.LICENSE.txt → 1807.0ba6ab90.js.LICENSE.txt} +0 -0
  223. /package/static/js/{1940.e8374763.js.LICENSE.txt → 1940.f13d2898.js.LICENSE.txt} +0 -0
  224. /package/static/js/{2139.fe670ca3.js.LICENSE.txt → 2139.775a0a57.js.LICENSE.txt} +0 -0
  225. /package/static/js/{3628.d51bff41.js.LICENSE.txt → 3628.0deca530.js.LICENSE.txt} +0 -0
  226. /package/static/js/{3934.1b72968b.js.LICENSE.txt → 912.e406cb4c.js.LICENSE.txt} +0 -0
  227. /package/static/js/{5800.c5dc1c76.js.LICENSE.txt → 9617.6cc3831b.js.LICENSE.txt} +0 -0
  228. /package/static/js/{useblocks_core.3f3f7e7e.js.LICENSE.txt → useblocks_core.16c5c107.js.LICENSE.txt} +0 -0
package/CHANGELOG.en.md CHANGED
@@ -64,10 +64,12 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
64
64
  ### Added
65
65
 
66
66
  **Integrations:**
67
+
67
68
  - Unisender integration and settings management
68
69
  - App-specific integration availability system
69
70
 
70
71
  **Editor:**
72
+
71
73
  - Free plan restrictions in ButtonsEmail component
72
74
  - mailto link support (subject, body) — DEV-13102
73
75
  - Mass blocks functionality
@@ -75,29 +77,35 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
75
77
  - Insert link with correct color — DEV-13172
76
78
 
77
79
  **AI & UX:**
80
+
78
81
  - AI functionality in EmailPageHeader with payment verification
79
82
  - Improved modal animations
80
83
 
81
84
  **FileManager:**
85
+
82
86
  - Support for custom names when copying files and folders
83
87
  - Cache clearing
84
88
 
85
89
  ### Fixed
86
90
 
87
91
  **Table Editor:**
92
+
88
93
  - Dropdown menu layout for Table element — DEV-13370
89
94
  - Table editor functionality — DEV-13371
90
95
 
91
96
  **Paste & Links:**
97
+
92
98
  - Tag duplication when pasting text — DEV-13293
93
99
  - Link duplication when pasting — DEV-13378
94
100
 
95
101
  **Elements:**
102
+
96
103
  - Adding Button element to email — DEV-13312
97
104
  - Incorrect marker settings display — DEV-13313
98
105
  - Line break restriction for notifications — DEV-13143
99
106
 
100
107
  **Data & API:**
108
+
101
109
  - Tag and group changes when sending email data — DEV-10189
102
110
  - Recurring payment calculation with `is_only_first_period` — DEV-13377
103
111
  - Notification on test email send error
@@ -107,6 +115,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
107
115
  ### Changed
108
116
 
109
117
  **sandbox.js → TypeScript Refactoring:**
118
+
110
119
  - Migration to modular structure with types and centralized state
111
120
  - Modules for mouse, keyboard, and drag-and-drop event handling
112
121
  - Element settings handlers (links, variables, padding)
@@ -114,10 +123,12 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
114
123
  - Utilities for text formatting, styles, and VML
115
124
 
116
125
  **Integrations:**
126
+
117
127
  - IntegrationSettings renamed to IntegrationSettingsData
118
128
  - Unisender integration migrated to flexible structure
119
129
 
120
130
  **UI:**
131
+
121
132
  - Updated layout for BlocksTable and EmailsTable
122
133
  - Improved checkbox styles in tables
123
134
 
package/CHANGELOG.md CHANGED
@@ -59,10 +59,12 @@
59
59
  ### Добавлено
60
60
 
61
61
  **Интеграции:**
62
+
62
63
  - Интеграция с Unisender и управление настройками
63
64
  - Система доступности интеграций для конкретных приложений
64
65
 
65
66
  **Редактор:**
67
+
66
68
  - Ограничения для бесплатного плана в компоненте ButtonsEmail
67
69
  - Поддержка mailto ссылок (subject, body) — DEV-13102
68
70
  - Функциональность массовых блоков
@@ -70,29 +72,35 @@
70
72
  - Вставка ссылки с нужным цветом — DEV-13172
71
73
 
72
74
  **AI и UX:**
75
+
73
76
  - AI-функциональность в EmailPageHeader с проверкой оплаты
74
77
  - Улучшенные анимации модальных окон
75
78
 
76
79
  **FileManager:**
80
+
77
81
  - Поддержка задания нового имени при копировании файлов и папок
78
82
  - Очистка кеша
79
83
 
80
84
  ### Исправлено
81
85
 
82
86
  **Редактор таблиц:**
87
+
83
88
  - Вёрстка выпадающего меню элемента Таблица — DEV-13370
84
89
  - Работа редактора таблиц — DEV-13371
85
90
 
86
91
  **Вставка и ссылки:**
92
+
87
93
  - Дублирование тегов при вставке текста — DEV-13293
88
94
  - Дублирование ссылок при вставке — DEV-13378
89
95
 
90
96
  **Элементы:**
97
+
91
98
  - Добавление элемента Кнопка в письмо — DEV-13312
92
99
  - Некорректное отображение настроек маркеров — DEV-13313
93
100
  - Запрет переноса строки для уведомления — DEV-13143
94
101
 
95
102
  **Данные и API:**
103
+
96
104
  - Изменения тегов и групп при отправке данных письма — DEV-10189
97
105
  - Расчёт суммы рекуррентного платежа с `is_only_first_period` — DEV-13377
98
106
  - Уведомление при ошибке отправки тестового письма
@@ -102,6 +110,7 @@
102
110
  ### Изменено
103
111
 
104
112
  **Рефакторинг sandbox.js → TypeScript:**
113
+
105
114
  - Миграция на модульную структуру с типами и централизованным состоянием
106
115
  - Модули для обработки событий мыши, клавиатуры, drag-and-drop
107
116
  - Обработчики настроек элементов (ссылки, переменные, отступы)
@@ -109,10 +118,12 @@
109
118
  - Утилиты для текстового форматирования, стилей и VML
110
119
 
111
120
  **Интеграции:**
121
+
112
122
  - IntegrationSettings переименован в IntegrationSettingsData
113
123
  - Unisender интеграция мигрирована на гибкую структуру
114
124
 
115
125
  **UI:**
126
+
116
127
  - Обновлён layout для BlocksTable и EmailsTable
117
128
  - Улучшены стили чекбоксов в таблицах
118
129
 
package/README.md CHANGED
@@ -1,43 +1,57 @@
1
1
  # Installation
2
+
2
3
  Run this code in the command prompt:
3
4
 
4
5
  ```cmd
5
- $ npm i useblocks@1.0.111 -save
6
+ $ npm i useblocks@1.0.113 -save
6
7
  ```
7
8
 
8
9
  Add the Blocks plugin to your App config.
10
+
9
11
  ### For the Webpack module bundler
12
+
10
13
  Package import:
14
+
11
15
  ```javascript
12
- const useblocksPlugin = require('useblocks/webpack')
16
+ const useblocksPlugin = require('useblocks/webpack');
13
17
  ```
18
+
14
19
  Defining the package in the app:
20
+
15
21
  ```javascript
16
22
  module.exports = {
17
- plugins: [
18
- new UseblocksWebpackPlugin(),
19
- ]
20
- }
23
+ plugins: [new UseblocksWebpackPlugin()],
24
+ };
21
25
  ```
26
+
22
27
  ### For the Vite module bundler
28
+
23
29
  Package import:
30
+
24
31
  ```javascript
25
- import useblocksPlugin from 'useblocks/vite'
32
+ import useblocksPlugin from 'useblocks/vite';
26
33
  ```
34
+
27
35
  Defining the package in the app:
36
+
28
37
  ```javascript
29
38
  export default defineConfig({
30
- plugins: [useblocksPlugin()],
31
- })
39
+ plugins: [useblocksPlugin()],
40
+ });
32
41
  ```
42
+
33
43
  # Initialization
44
+
34
45
  Import the Blocks plugin into your component:
46
+
35
47
  ```javascript
36
- import * as useblocks from "useblocks"
48
+ import * as useblocks from 'useblocks';
37
49
  ```
50
+
38
51
  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:
39
52
 
40
53
  ### Fetching the OAuth token on the backend
54
+
41
55
  ```javascript
42
56
  curl --location 'https://api.useblocks.io/oauth/token' \
43
57
  --header 'Content-Type: application/x-www-form-urlencoded' \
@@ -47,26 +61,33 @@ curl --location 'https://api.useblocks.io/oauth/token' \
47
61
  ```
48
62
 
49
63
  ### Creating the Blocks plugin entity
64
+
50
65
  ```javascript
51
- useblocks.init({
52
- getAuthToken: getAuthToken,
53
- element: "#test",
54
- content: {
55
- title: "Email subject",
56
- html: "EMAIL_CODE",
57
- },
58
- config: { }
59
- }).then(instance => { })
66
+ useblocks
67
+ .init({
68
+ getAuthToken: getAuthToken,
69
+ element: '#test',
70
+ content: {
71
+ title: 'Email subject',
72
+ html: 'EMAIL_CODE',
73
+ },
74
+ config: {},
75
+ })
76
+ .then((instance) => {});
60
77
  ```
78
+
61
79
  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
62
80
 
63
81
  # Configuration
82
+
64
83
  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.
65
84
 
66
85
  ### Element
86
+
67
87
  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.
68
88
 
69
89
  ### Content
90
+
70
91
  The `content` section contains parameters of an email that must be displayed in the editor. This is what can be sent to this parameter:
71
92
 
72
93
  #### {string}
@@ -74,6 +95,7 @@ The `content` section contains parameters of an email that must be displayed in
74
95
  HTML code of an email.
75
96
 
76
97
  #### {object} email options
98
+
77
99
  ```javascript
78
100
  {
79
101
  id?: string; // A unique ID of a project in your system.
@@ -85,6 +107,7 @@ HTML code of an email.
85
107
  ```
86
108
 
87
109
  #### {object} full description
110
+
88
111
  ```javascript
89
112
  {
90
113
  temlateId?: string; // Email template ID in Blocks.
@@ -96,8 +119,10 @@ HTML code of an email.
96
119
 
97
120
  You can change the content at any moment after the initialization with the help of the `instance.show(content)` method.
98
121
 
99
- ### Config
122
+ ### Config
123
+
100
124
  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`.
125
+
101
126
  ##### The list of parameters of the config section
102
127
  | Parameter | Description | Default |
103
128
  | ---------------------- | --------------------------------- | ------- |
@@ -236,11 +261,12 @@ This section is dedicated to setting the appearance and settings of the editor.
236
261
  | imageCenterEditorEnabled | Image editor tab. | true |
237
262
  | compressMaxSize | Max image size after optimization, MB. | true |
238
263
  | compressMaxWidthOrHeight | Max image width after optimization, px. | true |
239
-
240
264
  ### Events
265
+
241
266
  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.
242
267
 
243
- #### Example
268
+ #### Example
269
+
244
270
  ```javascript
245
271
  useblocks.init({
246
272
  ....,
@@ -255,7 +281,9 @@ useblocks.init({
255
281
  ```
256
282
 
257
283
  By sending the asynchronous feature you can implement the asynchronous data load.
258
- #### Example
284
+
285
+ #### Example
286
+
259
287
  ```javascript
260
288
  useblocks.init({
261
289
  element: "#test",
@@ -265,61 +293,58 @@ useblocks.init({
265
293
  handleReadEmail: async (id) => {
266
294
  return await fetchData(id); // Your data fetch feature.
267
295
  }
268
- }).then((instance) => {
296
+ }).then((instance) => {
269
297
  setTimeout(() => instance.show({ id: "2" }), 1000)
270
298
  });
271
299
  ```
272
300
 
273
-
274
-
275
301
  ### Events
276
- | Name | Description |
277
- | ------------------------- | -------------------------------------------- |
278
- | handleReadEmail | Read email |
279
- | handleSaveEmail | Save / update email |
280
- | handleReadEmailRevisions | Read autosave list |
281
- | handleEmailAutosave | Autosave |
282
- | handleReadBlocks | Read project blocks list |
283
- | handleSaveBlock | Save / update project block |
284
- | handleRemoveBlock | Delete project block |
285
- | handleReadComments | Read email comments list |
286
- | handleSaveComment | Save / update comment |
287
- | handleRemoveComment | Delete email comment |
288
- | handleSaveButtonClick | Email save button click |
289
- | handleNextButtonClick | Next button click |
290
- | handlePreviousButtonClick | Back button click |
291
- | handleEmailChanged | Any email parameter changed |
292
- | handleHtmlChanged | Email HTML changed |
293
- | handleDestroy | Plugin destroy |
294
- | handleLoad | Plugin instance initialization completed |
295
- | handleLoadImage | Load images |
296
- | handleNotify | Notification |
297
- | handleError | Error notification |
298
- | handleSuccess | Success notification |
299
- | handleTestEmailSend | Test email send |
300
- | handleTestEmailModal | Open test email modal window |
301
-
302
302
 
303
+ | Name | Description |
304
+ | ------------------------- | ---------------------------------------- |
305
+ | handleReadEmail | Read email |
306
+ | handleSaveEmail | Save / update email |
307
+ | handleReadEmailRevisions | Read autosave list |
308
+ | handleEmailAutosave | Autosave |
309
+ | handleReadBlocks | Read project blocks list |
310
+ | handleSaveBlock | Save / update project block |
311
+ | handleRemoveBlock | Delete project block |
312
+ | handleReadComments | Read email comments list |
313
+ | handleSaveComment | Save / update comment |
314
+ | handleRemoveComment | Delete email comment |
315
+ | handleSaveButtonClick | Email save button click |
316
+ | handleNextButtonClick | Next button click |
317
+ | handlePreviousButtonClick | Back button click |
318
+ | handleEmailChanged | Any email parameter changed |
319
+ | handleHtmlChanged | Email HTML changed |
320
+ | handleDestroy | Plugin destroy |
321
+ | handleLoad | Plugin instance initialization completed |
322
+ | handleLoadImage | Load images |
323
+ | handleNotify | Notification |
324
+ | handleError | Error notification |
325
+ | handleSuccess | Success notification |
326
+ | handleTestEmailSend | Test email send |
327
+ | handleTestEmailModal | Open test email modal window |
303
328
 
304
329
  ### Methods
305
- | Method name | Description |
306
- | ------------------------- | -------------------------------------------- |
307
- | init | Initialization (async) |
308
- | show | Update content after initialization |
309
- | destroy | Destroy instance |
310
- | reset | Reset all configuration |
311
- | getEmail | Get current email |
312
- | getConfig | Get configuration |
313
- | getBlocks | Get project blocks |
314
- | getComments | Get email comments |
315
- | getEmailRevisions | Get version control list |
316
- | setConfig | Set new config parameters |
317
- | updateConfig | Add to config parameters |
318
- | notify | Show notifications |
319
- | getElement | Get initialization element |
320
- | save | Save email |
321
- | compileEmail | Get compiled email |
322
330
 
331
+ | Method name | Description |
332
+ | ----------------- | ----------------------------------- |
333
+ | init | Initialization (async) |
334
+ | show | Update content after initialization |
335
+ | destroy | Destroy instance |
336
+ | reset | Reset all configuration |
337
+ | getEmail | Get current email |
338
+ | getConfig | Get configuration |
339
+ | getBlocks | Get project blocks |
340
+ | getComments | Get email comments |
341
+ | getEmailRevisions | Get version control list |
342
+ | setConfig | Set new config parameters |
343
+ | updateConfig | Add to config parameters |
344
+ | notify | Show notifications |
345
+ | getElement | Get initialization element |
346
+ | save | Save email |
347
+ | compileEmail | Get compiled email |
323
348
 
324
349
  ## 📂 File Manager
325
350
 
@@ -381,45 +406,44 @@ The `fileManager` section controls the features of the file manager. All fields
381
406
  - **comparator** — comparison function for sorting two files. Default: name-based comparison
382
407
  - **filterMatch** — function to check if a file passes current filters. Default: name-based search
383
408
 
384
-
385
409
  ### Interface StorageProvider
386
410
 
387
411
  #### Properties
388
412
 
389
- | Property | Type | Description | Default |
390
- |----------|------|-------------|---------|
391
- | `pathMode` | `boolean` | Use path as identifier for folders | - |
392
- | `rootId` | `string` | Custom identifier for root folder | `''` |
393
- | `trashPath` | `string` | Path to trash/recycle bin folder | - |
394
- | `tempPath` | `string` | Path to temporary folder for uploads | - |
395
- | `useSoftDelete` | `boolean` | Enable client-side soft delete | `false` |
396
- | `ensureFolderTrailingSlash` | boolean | Add a trailing slash to folder paths | `true` |
397
- | `validateDuplicates` | `boolean` | Client-side check for existing files or folders | - |
413
+ | Property | Type | Description | Default |
414
+ | --------------------------- | --------- | ----------------------------------------------- | ------- |
415
+ | `pathMode` | `boolean` | Use path as identifier for folders | - |
416
+ | `rootId` | `string` | Custom identifier for root folder | `''` |
417
+ | `trashPath` | `string` | Path to trash/recycle bin folder | - |
418
+ | `tempPath` | `string` | Path to temporary folder for uploads | - |
419
+ | `useSoftDelete` | `boolean` | Enable client-side soft delete | `false` |
420
+ | `ensureFolderTrailingSlash` | boolean | Add a trailing slash to folder paths | `true` |
421
+ | `validateDuplicates` | `boolean` | Client-side check for existing files or folders | - |
398
422
 
399
423
  #### Methods
400
424
 
401
425
  ##### Core Methods
402
426
 
403
- | Method | Parameters | Returns | Description |
404
- |--------|------------|---------|-------------|
405
- | **getItems** | `options`:<br>- `folderId?: string`<br>- `search?: string`<br>- `sortBy?: string`<br>- `sortOrder?: 'asc'\|'desc'`<br>- `page?: number`<br>- `limit?: number`<br>- `itemType: 'all'\|'file'\|'folder'` | `{ items: FileSystemItem[], pagination?: Partial<ApiPaginationResponse> }` | Retrieve files/folders with filtering, sorting, pagination |
406
- | **createFolder** | `name: string`, `parentid?: string` | `FileSystemItem` | Create new folder |
407
- | uploadFile | `file`: <br>- `name: string`<br>- `size: number`<br>- `type: string`<br>- `folderId?: string`<br>- `data: Blob \| string`<br>- `thumbnail?: string`<br>- `dimensions?: string`<br>- `aspectRatio?: string`<br>- `extension?: string` | `FileSystemItemUpdate` | Upload file with metadata |
408
- | uploadFiles | `request`:<br>- `items: { requestId?: string, name: string, size: number, type: string, folderId?: string \| null, data: Blob \| string, extension?: string }[]`<br>- `folderId?: string \| null` | `BatchResult<UploadFileResultData>` | Upload multiple files. The order of items matters — if `requestId` is not provided, results are matched by index |
409
- | **uploadFileByUrl** | `url: string`, `folderId?: string` | `FileSystemItem` | Upload file from URL (check for existing files) |
410
- | `findItemByPath` | `path: string` | `FileSystemItem \| undefined` | Find system files/folders by path |
411
- | `setController` | `controller: StorageProviderController` | `void` | Set cache management controller |
412
- | `getFileData` | `file: FileSystemItem` | `Blob` | Get file content as blob |
413
- | `getUrl` | `file: FileSystemItem` | `string` | Get file access URL |
414
- | `getThumbnailUrl` | `file: FileSystemItem` | `string` | Get thumbnail URL |
415
- | `renameItem` | `item: FileSystemItem`, `newName: string` | `FileSystemItemUpdate` | Rename file/folder |
416
- | `deleteItem` | `item: FileSystemItem` | `void` | Delete single item (moves to trash if soft delete enabled) |
417
- | `deleteItems` | `items: FileSystemItem[]` | `BatchResult<never>` | Delete multiple items |
418
- | `moveItem` | `item: FileSystemItem`, `targetFolderId?: string` | `FileSystemItemUpdate` | Move single item |
419
- | `moveItems` | `items: FileSystemItem[]`, `targetFolderId?: string` | `BatchResult<FileSystemItemUpdate>` | Move multiple items |
420
- | `copyItem` | `item: FileSystemItem`, `targetFolderId?: string` | `FileSystemItemUpdate` | Copy single item |
421
- | `copyItems` | `items: FileSystemItem[]`, `targetFolderId?: string` | `BatchResult<FileSystemItemUpdate>` | Copy multiple items |
422
- | `updateFile` | `file: FileSystemItem`, `updates`: metadata object | `FileSystemItemUpdate` | Update file metadata/content |
427
+ | Method | Parameters | Returns | Description |
428
+ | ------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------- |
429
+ | **getItems** | `options`:<br>- `folderId?: string`<br>- `search?: string`<br>- `sortBy?: string`<br>- `sortOrder?: 'asc'\|'desc'`<br>- `page?: number`<br>- `limit?: number`<br>- `itemType: 'all'\|'file'\|'folder'` | `{ items: FileSystemItem[], pagination?: Partial<ApiPaginationResponse> }` | Retrieve files/folders with filtering, sorting, pagination |
430
+ | **createFolder** | `name: string`, `parentid?: string` | `FileSystemItem` | Create new folder |
431
+ | uploadFile | `file`: <br>- `name: string`<br>- `size: number`<br>- `type: string`<br>- `folderId?: string`<br>- `data: Blob \| string`<br>- `thumbnail?: string`<br>- `dimensions?: string`<br>- `aspectRatio?: string`<br>- `extension?: string` | `FileSystemItemUpdate` | Upload file with metadata |
432
+ | uploadFiles | `request`:<br>- `items: { requestId?: string, name: string, size: number, type: string, folderId?: string \| null, data: Blob \| string, extension?: string }[]`<br>- `folderId?: string \| null` | `BatchResult<UploadFileResultData>` | Upload multiple files. The order of items matters — if `requestId` is not provided, results are matched by index |
433
+ | **uploadFileByUrl** | `url: string`, `folderId?: string` | `FileSystemItem` | Upload file from URL (check for existing files) |
434
+ | `findItemByPath` | `path: string` | `FileSystemItem \| undefined` | Find system files/folders by path |
435
+ | `setController` | `controller: StorageProviderController` | `void` | Set cache management controller |
436
+ | `getFileData` | `file: FileSystemItem` | `Blob` | Get file content as blob |
437
+ | `getUrl` | `file: FileSystemItem` | `string` | Get file access URL |
438
+ | `getThumbnailUrl` | `file: FileSystemItem` | `string` | Get thumbnail URL |
439
+ | `renameItem` | `item: FileSystemItem`, `newName: string` | `FileSystemItemUpdate` | Rename file/folder |
440
+ | `deleteItem` | `item: FileSystemItem` | `void` | Delete single item (moves to trash if soft delete enabled) |
441
+ | `deleteItems` | `items: FileSystemItem[]` | `BatchResult<never>` | Delete multiple items |
442
+ | `moveItem` | `item: FileSystemItem`, `targetFolderId?: string` | `FileSystemItemUpdate` | Move single item |
443
+ | `moveItems` | `items: FileSystemItem[]`, `targetFolderId?: string` | `BatchResult<FileSystemItemUpdate>` | Move multiple items |
444
+ | `copyItem` | `item: FileSystemItem`, `targetFolderId?: string` | `FileSystemItemUpdate` | Copy single item |
445
+ | `copyItems` | `items: FileSystemItem[]`, `targetFolderId?: string` | `BatchResult<FileSystemItemUpdate>` | Copy multiple items |
446
+ | `updateFile` | `file: FileSystemItem`, `updates`: metadata object | `FileSystemItemUpdate` | Update file metadata/content |
423
447
 
424
448
  ##### Type Definitions
425
449
 
@@ -438,4 +462,5 @@ The `fileManager` section controls the features of the file manager. All fields
438
462
  - **Cache Control**: Use `setController` for cache invalidation requests
439
463
 
440
464
  ### Keywords
441
- none
465
+
466
+ none