jodit-pro 4.1.13 → 4.1.21

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 (308) hide show
  1. package/es2015/jodit.css +87 -31
  2. package/es2015/jodit.fat.min.css +1 -1
  3. package/es2015/jodit.fat.min.js +2 -2
  4. package/es2015/jodit.js +1378 -546
  5. package/es2015/jodit.min.css +1 -1
  6. package/es2015/jodit.min.js +2 -2
  7. package/es2015/plugins/autocomplete/autocomplete.js +1 -1
  8. package/es2015/plugins/autocomplete/autocomplete.min.js +1 -1
  9. package/es2015/plugins/backup/backup.css +1 -1
  10. package/es2015/plugins/backup/backup.js +1 -1
  11. package/es2015/plugins/backup/backup.min.js +1 -1
  12. package/es2015/plugins/button-generator/button-generator.css +1 -1
  13. package/es2015/plugins/button-generator/button-generator.js +1 -1
  14. package/es2015/plugins/button-generator/button-generator.min.js +1 -1
  15. package/es2015/plugins/change-case/change-case.js +1 -1
  16. package/es2015/plugins/change-case/change-case.min.js +1 -1
  17. package/es2015/plugins/color-picker/color-picker.css +1 -1
  18. package/es2015/plugins/color-picker/color-picker.js +1 -1
  19. package/es2015/plugins/color-picker/color-picker.min.js +1 -1
  20. package/es2015/plugins/emoji/emoji.css +1 -1
  21. package/es2015/plugins/emoji/emoji.js +1 -1
  22. package/es2015/plugins/emoji/emoji.min.js +1 -1
  23. package/es2015/plugins/export-docs/export-docs.js +1 -1
  24. package/es2015/plugins/export-docs/export-docs.min.js +1 -1
  25. package/es2015/plugins/finder/finder.css +6 -7
  26. package/es2015/plugins/finder/finder.js +1 -1
  27. package/es2015/plugins/finder/finder.min.css +1 -1
  28. package/es2015/plugins/finder/finder.min.js +1 -1
  29. package/es2015/plugins/google-maps/google-maps.css +1 -1
  30. package/es2015/plugins/google-maps/google-maps.js +1 -1
  31. package/es2015/plugins/google-maps/google-maps.min.js +1 -1
  32. package/es2015/plugins/google-search/google-search.js +1 -1
  33. package/es2015/plugins/google-search/google-search.min.js +1 -1
  34. package/es2015/plugins/highlight-signature/highlight-signature.js +1 -1
  35. package/es2015/plugins/highlight-signature/highlight-signature.min.js +1 -1
  36. package/es2015/plugins/iframe-editor/iframe-editor.css +1 -1
  37. package/es2015/plugins/iframe-editor/iframe-editor.js +1 -1
  38. package/es2015/plugins/iframe-editor/iframe-editor.min.js +1 -1
  39. package/es2015/plugins/keyboard/keyboard.css +1 -1
  40. package/es2015/plugins/keyboard/keyboard.js +1 -1
  41. package/es2015/plugins/keyboard/keyboard.min.js +1 -1
  42. package/es2015/plugins/mobile-view/mobile-view.js +1 -1
  43. package/es2015/plugins/mobile-view/mobile-view.min.js +1 -1
  44. package/es2015/plugins/page-break/page-break.js +1 -1
  45. package/es2015/plugins/page-break/page-break.min.js +1 -1
  46. package/es2015/plugins/paste-code/paste-code.css +1 -1
  47. package/es2015/plugins/paste-code/paste-code.js +1 -1
  48. package/es2015/plugins/paste-code/paste-code.min.js +1 -1
  49. package/es2015/plugins/paste-from-word/paste-from-word.js +1 -1
  50. package/es2015/plugins/paste-from-word/paste-from-word.min.js +1 -1
  51. package/es2015/plugins/show-blocks/show-blocks.js +1 -1
  52. package/es2015/plugins/show-blocks/show-blocks.min.js +1 -1
  53. package/es2015/plugins/todo-list/todo-list.css +1 -1
  54. package/es2015/plugins/todo-list/todo-list.js +1 -1
  55. package/es2015/plugins/todo-list/todo-list.min.js +1 -1
  56. package/es2015/plugins/translate/translate.css +1 -1
  57. package/es2015/plugins/translate/translate.js +1 -1
  58. package/es2015/plugins/translate/translate.min.js +1 -1
  59. package/es2015/plugins/tune-block/tune-block.css +1 -1
  60. package/es2015/plugins/tune-block/tune-block.js +1 -1
  61. package/es2015/plugins/tune-block/tune-block.min.js +1 -1
  62. package/es2018/jodit.css +87 -31
  63. package/es2018/jodit.fat.min.css +1 -1
  64. package/es2018/jodit.fat.min.js +2 -2
  65. package/es2018/jodit.js +1364 -546
  66. package/es2018/jodit.min.css +1 -1
  67. package/es2018/jodit.min.js +2 -2
  68. package/es2018/plugins/autocomplete/autocomplete.js +1 -1
  69. package/es2018/plugins/autocomplete/autocomplete.min.js +1 -1
  70. package/es2018/plugins/backup/backup.css +1 -1
  71. package/es2018/plugins/backup/backup.js +1 -1
  72. package/es2018/plugins/backup/backup.min.js +1 -1
  73. package/es2018/plugins/button-generator/button-generator.css +1 -1
  74. package/es2018/plugins/button-generator/button-generator.js +1 -1
  75. package/es2018/plugins/button-generator/button-generator.min.js +1 -1
  76. package/es2018/plugins/change-case/change-case.js +1 -1
  77. package/es2018/plugins/change-case/change-case.min.js +1 -1
  78. package/es2018/plugins/color-picker/color-picker.css +1 -1
  79. package/es2018/plugins/color-picker/color-picker.js +1 -1
  80. package/es2018/plugins/color-picker/color-picker.min.js +1 -1
  81. package/es2018/plugins/emoji/emoji.css +1 -1
  82. package/es2018/plugins/emoji/emoji.js +1 -1
  83. package/es2018/plugins/emoji/emoji.min.js +1 -1
  84. package/es2018/plugins/export-docs/export-docs.js +1 -1
  85. package/es2018/plugins/export-docs/export-docs.min.js +1 -1
  86. package/es2018/plugins/finder/finder.css +6 -7
  87. package/es2018/plugins/finder/finder.js +1 -1
  88. package/es2018/plugins/finder/finder.min.css +1 -1
  89. package/es2018/plugins/finder/finder.min.js +1 -1
  90. package/es2018/plugins/google-maps/google-maps.css +1 -1
  91. package/es2018/plugins/google-maps/google-maps.js +1 -1
  92. package/es2018/plugins/google-maps/google-maps.min.js +1 -1
  93. package/es2018/plugins/google-search/google-search.js +1 -1
  94. package/es2018/plugins/google-search/google-search.min.js +1 -1
  95. package/es2018/plugins/highlight-signature/highlight-signature.js +1 -1
  96. package/es2018/plugins/highlight-signature/highlight-signature.min.js +1 -1
  97. package/es2018/plugins/iframe-editor/iframe-editor.css +1 -1
  98. package/es2018/plugins/iframe-editor/iframe-editor.js +1 -1
  99. package/es2018/plugins/iframe-editor/iframe-editor.min.js +1 -1
  100. package/es2018/plugins/keyboard/keyboard.css +1 -1
  101. package/es2018/plugins/keyboard/keyboard.js +1 -1
  102. package/es2018/plugins/keyboard/keyboard.min.js +1 -1
  103. package/es2018/plugins/mobile-view/mobile-view.js +1 -1
  104. package/es2018/plugins/mobile-view/mobile-view.min.js +1 -1
  105. package/es2018/plugins/page-break/page-break.js +1 -1
  106. package/es2018/plugins/page-break/page-break.min.js +1 -1
  107. package/es2018/plugins/paste-code/paste-code.css +1 -1
  108. package/es2018/plugins/paste-code/paste-code.js +1 -1
  109. package/es2018/plugins/paste-code/paste-code.min.js +1 -1
  110. package/es2018/plugins/paste-from-word/paste-from-word.js +1 -1
  111. package/es2018/plugins/paste-from-word/paste-from-word.min.js +1 -1
  112. package/es2018/plugins/show-blocks/show-blocks.js +1 -1
  113. package/es2018/plugins/show-blocks/show-blocks.min.js +1 -1
  114. package/es2018/plugins/todo-list/todo-list.css +1 -1
  115. package/es2018/plugins/todo-list/todo-list.js +1 -1
  116. package/es2018/plugins/todo-list/todo-list.min.js +1 -1
  117. package/es2018/plugins/translate/translate.css +1 -1
  118. package/es2018/plugins/translate/translate.js +1 -1
  119. package/es2018/plugins/translate/translate.min.js +1 -1
  120. package/es2018/plugins/tune-block/tune-block.css +1 -1
  121. package/es2018/plugins/tune-block/tune-block.js +1 -1
  122. package/es2018/plugins/tune-block/tune-block.min.js +1 -1
  123. package/es2021/jodit.css +87 -31
  124. package/es2021/jodit.fat.min.css +1 -1
  125. package/es2021/jodit.fat.min.js +2 -2
  126. package/es2021/jodit.js +1361 -546
  127. package/es2021/jodit.min.css +1 -1
  128. package/es2021/jodit.min.js +2 -2
  129. package/es2021/plugins/autocomplete/autocomplete.js +1 -1
  130. package/es2021/plugins/autocomplete/autocomplete.min.js +1 -1
  131. package/es2021/plugins/backup/backup.css +1 -1
  132. package/es2021/plugins/backup/backup.js +1 -1
  133. package/es2021/plugins/backup/backup.min.js +1 -1
  134. package/es2021/plugins/button-generator/button-generator.css +1 -1
  135. package/es2021/plugins/button-generator/button-generator.js +1 -1
  136. package/es2021/plugins/button-generator/button-generator.min.js +1 -1
  137. package/es2021/plugins/change-case/change-case.js +1 -1
  138. package/es2021/plugins/change-case/change-case.min.js +1 -1
  139. package/es2021/plugins/color-picker/color-picker.css +1 -1
  140. package/es2021/plugins/color-picker/color-picker.js +1 -1
  141. package/es2021/plugins/color-picker/color-picker.min.js +1 -1
  142. package/es2021/plugins/emoji/emoji.css +1 -1
  143. package/es2021/plugins/emoji/emoji.js +1 -1
  144. package/es2021/plugins/emoji/emoji.min.js +1 -1
  145. package/es2021/plugins/export-docs/export-docs.js +1 -1
  146. package/es2021/plugins/export-docs/export-docs.min.js +1 -1
  147. package/es2021/plugins/finder/finder.css +6 -7
  148. package/es2021/plugins/finder/finder.js +1 -1
  149. package/es2021/plugins/finder/finder.min.css +1 -1
  150. package/es2021/plugins/finder/finder.min.js +1 -1
  151. package/es2021/plugins/google-maps/google-maps.css +1 -1
  152. package/es2021/plugins/google-maps/google-maps.js +1 -1
  153. package/es2021/plugins/google-maps/google-maps.min.js +1 -1
  154. package/es2021/plugins/google-search/google-search.js +1 -1
  155. package/es2021/plugins/google-search/google-search.min.js +1 -1
  156. package/es2021/plugins/highlight-signature/highlight-signature.js +1 -1
  157. package/es2021/plugins/highlight-signature/highlight-signature.min.js +1 -1
  158. package/es2021/plugins/iframe-editor/iframe-editor.css +1 -1
  159. package/es2021/plugins/iframe-editor/iframe-editor.js +1 -1
  160. package/es2021/plugins/iframe-editor/iframe-editor.min.js +1 -1
  161. package/es2021/plugins/keyboard/keyboard.css +1 -1
  162. package/es2021/plugins/keyboard/keyboard.js +1 -1
  163. package/es2021/plugins/keyboard/keyboard.min.js +1 -1
  164. package/es2021/plugins/mobile-view/mobile-view.js +1 -1
  165. package/es2021/plugins/mobile-view/mobile-view.min.js +1 -1
  166. package/es2021/plugins/page-break/page-break.js +1 -1
  167. package/es2021/plugins/page-break/page-break.min.js +1 -1
  168. package/es2021/plugins/paste-code/paste-code.css +1 -1
  169. package/es2021/plugins/paste-code/paste-code.js +1 -1
  170. package/es2021/plugins/paste-code/paste-code.min.js +1 -1
  171. package/es2021/plugins/paste-from-word/paste-from-word.js +1 -1
  172. package/es2021/plugins/paste-from-word/paste-from-word.min.js +1 -1
  173. package/es2021/plugins/show-blocks/show-blocks.js +1 -1
  174. package/es2021/plugins/show-blocks/show-blocks.min.js +1 -1
  175. package/es2021/plugins/todo-list/todo-list.css +1 -1
  176. package/es2021/plugins/todo-list/todo-list.js +1 -1
  177. package/es2021/plugins/todo-list/todo-list.min.js +1 -1
  178. package/es2021/plugins/translate/translate.css +1 -1
  179. package/es2021/plugins/translate/translate.js +1 -1
  180. package/es2021/plugins/translate/translate.min.js +1 -1
  181. package/es2021/plugins/tune-block/tune-block.css +1 -1
  182. package/es2021/plugins/tune-block/tune-block.js +1 -1
  183. package/es2021/plugins/tune-block/tune-block.min.js +1 -1
  184. package/es2021.en/jodit.css +87 -31
  185. package/es2021.en/jodit.fat.min.css +1 -1
  186. package/es2021.en/jodit.fat.min.js +2 -2
  187. package/es2021.en/jodit.js +1361 -546
  188. package/es2021.en/jodit.min.css +1 -1
  189. package/es2021.en/jodit.min.js +2 -2
  190. package/es2021.en/plugins/autocomplete/autocomplete.js +1 -1
  191. package/es2021.en/plugins/autocomplete/autocomplete.min.js +1 -1
  192. package/es2021.en/plugins/backup/backup.css +1 -1
  193. package/es2021.en/plugins/backup/backup.js +1 -1
  194. package/es2021.en/plugins/backup/backup.min.js +1 -1
  195. package/es2021.en/plugins/button-generator/button-generator.css +1 -1
  196. package/es2021.en/plugins/button-generator/button-generator.js +1 -1
  197. package/es2021.en/plugins/button-generator/button-generator.min.js +1 -1
  198. package/es2021.en/plugins/change-case/change-case.js +1 -1
  199. package/es2021.en/plugins/change-case/change-case.min.js +1 -1
  200. package/es2021.en/plugins/color-picker/color-picker.css +1 -1
  201. package/es2021.en/plugins/color-picker/color-picker.js +1 -1
  202. package/es2021.en/plugins/color-picker/color-picker.min.js +1 -1
  203. package/es2021.en/plugins/emoji/emoji.css +1 -1
  204. package/es2021.en/plugins/emoji/emoji.js +1 -1
  205. package/es2021.en/plugins/emoji/emoji.min.js +1 -1
  206. package/es2021.en/plugins/export-docs/export-docs.js +1 -1
  207. package/es2021.en/plugins/export-docs/export-docs.min.js +1 -1
  208. package/es2021.en/plugins/finder/finder.css +6 -7
  209. package/es2021.en/plugins/finder/finder.js +1 -1
  210. package/es2021.en/plugins/finder/finder.min.css +1 -1
  211. package/es2021.en/plugins/finder/finder.min.js +1 -1
  212. package/es2021.en/plugins/google-maps/google-maps.css +1 -1
  213. package/es2021.en/plugins/google-maps/google-maps.js +1 -1
  214. package/es2021.en/plugins/google-maps/google-maps.min.js +1 -1
  215. package/es2021.en/plugins/google-search/google-search.js +1 -1
  216. package/es2021.en/plugins/google-search/google-search.min.js +1 -1
  217. package/es2021.en/plugins/highlight-signature/highlight-signature.js +1 -1
  218. package/es2021.en/plugins/highlight-signature/highlight-signature.min.js +1 -1
  219. package/es2021.en/plugins/iframe-editor/iframe-editor.css +1 -1
  220. package/es2021.en/plugins/iframe-editor/iframe-editor.js +1 -1
  221. package/es2021.en/plugins/iframe-editor/iframe-editor.min.js +1 -1
  222. package/es2021.en/plugins/keyboard/keyboard.css +1 -1
  223. package/es2021.en/plugins/keyboard/keyboard.js +1 -1
  224. package/es2021.en/plugins/keyboard/keyboard.min.js +1 -1
  225. package/es2021.en/plugins/mobile-view/mobile-view.js +1 -1
  226. package/es2021.en/plugins/mobile-view/mobile-view.min.js +1 -1
  227. package/es2021.en/plugins/page-break/page-break.js +1 -1
  228. package/es2021.en/plugins/page-break/page-break.min.js +1 -1
  229. package/es2021.en/plugins/paste-code/paste-code.css +1 -1
  230. package/es2021.en/plugins/paste-code/paste-code.js +1 -1
  231. package/es2021.en/plugins/paste-code/paste-code.min.js +1 -1
  232. package/es2021.en/plugins/paste-from-word/paste-from-word.js +1 -1
  233. package/es2021.en/plugins/paste-from-word/paste-from-word.min.js +1 -1
  234. package/es2021.en/plugins/show-blocks/show-blocks.js +1 -1
  235. package/es2021.en/plugins/show-blocks/show-blocks.min.js +1 -1
  236. package/es2021.en/plugins/todo-list/todo-list.css +1 -1
  237. package/es2021.en/plugins/todo-list/todo-list.js +1 -1
  238. package/es2021.en/plugins/todo-list/todo-list.min.js +1 -1
  239. package/es2021.en/plugins/translate/translate.css +1 -1
  240. package/es2021.en/plugins/translate/translate.js +1 -1
  241. package/es2021.en/plugins/translate/translate.min.js +1 -1
  242. package/es2021.en/plugins/tune-block/tune-block.css +1 -1
  243. package/es2021.en/plugins/tune-block/tune-block.js +1 -1
  244. package/es2021.en/plugins/tune-block/tune-block.min.js +1 -1
  245. package/es5/jodit.css +131 -35
  246. package/es5/jodit.fat.min.css +1 -1
  247. package/es5/jodit.fat.min.js +2 -2
  248. package/es5/jodit.js +1410 -482
  249. package/es5/jodit.min.css +3 -3
  250. package/es5/jodit.min.js +2 -2
  251. package/es5/plugins/autocomplete/autocomplete.js +1 -1
  252. package/es5/plugins/autocomplete/autocomplete.min.js +1 -1
  253. package/es5/plugins/backup/backup.css +1 -1
  254. package/es5/plugins/backup/backup.js +1 -1
  255. package/es5/plugins/backup/backup.min.js +1 -1
  256. package/es5/plugins/button-generator/button-generator.css +1 -1
  257. package/es5/plugins/button-generator/button-generator.js +1 -1
  258. package/es5/plugins/button-generator/button-generator.min.js +1 -1
  259. package/es5/plugins/change-case/change-case.js +1 -1
  260. package/es5/plugins/change-case/change-case.min.js +1 -1
  261. package/es5/plugins/color-picker/color-picker.css +1 -1
  262. package/es5/plugins/color-picker/color-picker.js +1 -1
  263. package/es5/plugins/color-picker/color-picker.min.js +1 -1
  264. package/es5/plugins/emoji/emoji.css +1 -1
  265. package/es5/plugins/emoji/emoji.js +1 -1
  266. package/es5/plugins/emoji/emoji.min.js +1 -1
  267. package/es5/plugins/export-docs/export-docs.js +1 -1
  268. package/es5/plugins/export-docs/export-docs.min.js +1 -1
  269. package/es5/plugins/finder/finder.css +6 -7
  270. package/es5/plugins/finder/finder.js +1 -1
  271. package/es5/plugins/finder/finder.min.css +1 -1
  272. package/es5/plugins/finder/finder.min.js +1 -1
  273. package/es5/plugins/google-maps/google-maps.css +1 -1
  274. package/es5/plugins/google-maps/google-maps.js +1 -1
  275. package/es5/plugins/google-maps/google-maps.min.js +1 -1
  276. package/es5/plugins/google-search/google-search.js +1 -1
  277. package/es5/plugins/google-search/google-search.min.js +1 -1
  278. package/es5/plugins/highlight-signature/highlight-signature.js +1 -1
  279. package/es5/plugins/highlight-signature/highlight-signature.min.js +1 -1
  280. package/es5/plugins/iframe-editor/iframe-editor.css +1 -1
  281. package/es5/plugins/iframe-editor/iframe-editor.js +1 -1
  282. package/es5/plugins/iframe-editor/iframe-editor.min.js +1 -1
  283. package/es5/plugins/keyboard/keyboard.css +1 -1
  284. package/es5/plugins/keyboard/keyboard.js +1 -1
  285. package/es5/plugins/keyboard/keyboard.min.js +1 -1
  286. package/es5/plugins/mobile-view/mobile-view.js +1 -1
  287. package/es5/plugins/mobile-view/mobile-view.min.js +1 -1
  288. package/es5/plugins/page-break/page-break.js +1 -1
  289. package/es5/plugins/page-break/page-break.min.js +1 -1
  290. package/es5/plugins/paste-code/paste-code.css +1 -1
  291. package/es5/plugins/paste-code/paste-code.js +1 -1
  292. package/es5/plugins/paste-code/paste-code.min.js +1 -1
  293. package/es5/plugins/paste-from-word/paste-from-word.js +1 -1
  294. package/es5/plugins/paste-from-word/paste-from-word.min.js +1 -1
  295. package/es5/plugins/show-blocks/show-blocks.js +1 -1
  296. package/es5/plugins/show-blocks/show-blocks.min.js +1 -1
  297. package/es5/plugins/todo-list/todo-list.css +1 -1
  298. package/es5/plugins/todo-list/todo-list.js +1 -1
  299. package/es5/plugins/todo-list/todo-list.min.js +1 -1
  300. package/es5/plugins/translate/translate.css +1 -1
  301. package/es5/plugins/translate/translate.js +1 -1
  302. package/es5/plugins/translate/translate.min.js +1 -1
  303. package/es5/plugins/tune-block/tune-block.css +1 -1
  304. package/es5/plugins/tune-block/tune-block.js +1 -1
  305. package/es5/plugins/tune-block/tune-block.min.js +1 -1
  306. package/esm/plugins/finder/browser.d.ts +1 -1
  307. package/package.json +1 -1
  308. package/types/plugins/finder/browser.d.ts +1 -1
package/es5/jodit.js CHANGED
@@ -1,7 +1,7 @@
1
1
  /*!
2
2
  * jodit-pro - PRO Version of Jodit Editor
3
3
  * Author: Chupurnov Valeriy <chupurnov@gmail.com>
4
- * Version: v4.1.13
4
+ * Version: v4.1.21
5
5
  * Url: https://xdsoft.net/jodit/pro/
6
6
  * License(s): SEE LICENSE IN LICENSE.md
7
7
  */
@@ -2254,6 +2254,28 @@ var Config = /** @class */ (function () {
2254
2254
  : null);
2255
2255
  /**
2256
2256
  * Shadow root if Jodit was created in it
2257
+ *
2258
+ * ```html
2259
+ * <div id="editor"></div>
2260
+ * ```
2261
+ *
2262
+ * ```js
2263
+ * const app = document.getElementById('editor');
2264
+ * app.attachShadow({ mode: 'open' });
2265
+ * const root = app.shadowRoot;
2266
+ *
2267
+ * root.innerHTML = `
2268
+ * <link rel="stylesheet" href="./build/jodit.css"/>
2269
+ * <h1>Jodit example in Shadow DOM</h1>
2270
+ * <div id="edit"></div>
2271
+ * `;
2272
+ *
2273
+ * const editor = Jodit.make(root.getElementById('edit'), {
2274
+ * globalFullSize: false,
2275
+ * shadowRoot: root
2276
+ * });
2277
+ * editor.value = '<p>start</p>';
2278
+ * ```
2257
2279
  */
2258
2280
  this.shadowRoot = null;
2259
2281
  /**
@@ -3010,6 +3032,7 @@ Config.prototype.controls = {};
3010
3032
  /* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(31635);
3011
3033
  /* harmony import */ var jodit_core_constants__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(67259);
3012
3034
  /* harmony import */ var jodit_core_helpers_async__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(98761);
3035
+ /* harmony import */ var jodit_core_helpers_checker_is_abort_error__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(54306);
3013
3036
  /* harmony import */ var jodit_core_helpers_checker_is_function__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(41959);
3014
3037
  /* harmony import */ var jodit_core_helpers_checker_is_number__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(72558);
3015
3038
  /* harmony import */ var jodit_core_helpers_checker_is_plain_object__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(47903);
@@ -3018,7 +3041,7 @@ Config.prototype.controls = {};
3018
3041
  /* harmony import */ var jodit_core_helpers_checker_is_void__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(74197);
3019
3042
  /* harmony import */ var jodit_core_helpers_utils_assert__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(28712);
3020
3043
  /* harmony import */ var jodit_core_helpers_utils_assert__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(jodit_core_helpers_utils_assert__WEBPACK_IMPORTED_MODULE_1__);
3021
- /* harmony import */ var jodit_core_helpers_utils_error_errors_abort_error__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(30126);
3044
+ /* harmony import */ var jodit_core_helpers_utils_error_errors_abort_error__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(30126);
3022
3045
  /*!
3023
3046
  * Jodit Editor (https://xdsoft.net/jodit/)
3024
3047
  * Released under MIT see LICENSE.txt in the project root for license information.
@@ -3035,6 +3058,7 @@ Config.prototype.controls = {};
3035
3058
 
3036
3059
 
3037
3060
 
3061
+
3038
3062
  var Async = /** @class */ (function () {
3039
3063
  function Async() {
3040
3064
  var _this = this;
@@ -3175,6 +3199,11 @@ var Async = /** @class */ (function () {
3175
3199
  }
3176
3200
  var promise = _this.promise(function (res) {
3177
3201
  promises.push(res);
3202
+ }).catch(function (e) {
3203
+ if ((0,jodit_core_helpers_checker_is_abort_error__WEBPACK_IMPORTED_MODULE_10__/* .isAbortError */ .z)(e)) {
3204
+ return null;
3205
+ }
3206
+ throw e;
3178
3207
  });
3179
3208
  onFire.apply(void 0, (0,tslib__WEBPACK_IMPORTED_MODULE_5__/* .__spreadArray */ .fX)([], (0,tslib__WEBPACK_IMPORTED_MODULE_5__/* .__read */ .zs)(args), false));
3180
3209
  return promise;
@@ -3263,7 +3292,7 @@ var Async = /** @class */ (function () {
3263
3292
  var _this = this;
3264
3293
  var rejectCallback = function () { };
3265
3294
  var promise = new Promise(function (resolve, reject) {
3266
- rejectCallback = function () { return reject((0,jodit_core_helpers_utils_error_errors_abort_error__WEBPACK_IMPORTED_MODULE_10__/* .abort */ .h)()); };
3295
+ rejectCallback = function () { return reject((0,jodit_core_helpers_utils_error_errors_abort_error__WEBPACK_IMPORTED_MODULE_11__/* .abort */ .h)('Abort async')); };
3267
3296
  _this.promisesRejections.add(rejectCallback);
3268
3297
  executor(resolve, reject);
3269
3298
  });
@@ -3811,7 +3840,7 @@ __webpack_require__.r(__webpack_exports__);
3811
3840
  * Copyright (c) 2013-2024 Valeriy Chupurnov. All rights reserved. https://xdsoft.net
3812
3841
  */
3813
3842
 
3814
- var APP_VERSION = "4.1.13";
3843
+ var APP_VERSION = "4.1.21";
3815
3844
  // prettier-ignore
3816
3845
  var ES = "es5";
3817
3846
  var IS_ES_MODERN = false;
@@ -9109,6 +9138,7 @@ var offset = function (elm, jodit, doc, recurse) {
9109
9138
  * Calculate screen element position
9110
9139
  */
9111
9140
  function position(elm, jodit, recurse) {
9141
+ var _a, _b;
9112
9142
  if (recurse === void 0) {
9113
9143
  recurse = false;
9114
9144
  }
@@ -9118,15 +9148,15 @@ function position(elm, jodit, recurse) {
9118
9148
  jodit.iframe &&
9119
9149
  jodit.ed.body.contains(elm) &&
9120
9150
  !recurse) {
9121
- var _a = position(jodit.iframe, jodit, true), left = _a.left, top = _a.top;
9151
+ var _c = position(jodit.iframe, jodit, true), left = _c.left, top = _c.top;
9122
9152
  xPos += left;
9123
9153
  yPos += top;
9124
9154
  }
9125
9155
  return {
9126
9156
  left: Math.round(xPos),
9127
9157
  top: Math.round(yPos),
9128
- width: Math.round(elm.offsetWidth),
9129
- height: Math.round(elm.offsetHeight)
9158
+ width: Math.round((_a = elm.offsetWidth) !== null && _a !== void 0 ? _a : rect.width),
9159
+ height: Math.round((_b = elm.offsetHeight) !== null && _b !== void 0 ? _b : rect.height)
9130
9160
  };
9131
9161
  }
9132
9162
 
@@ -11259,9 +11289,9 @@ var getXPathByElement = function (element, root) {
11259
11289
  * Find all `ref` or `data-ref` elements inside HTMLElement
11260
11290
  */
11261
11291
  var refs = function (root) {
11262
- // if (Component.isInstanceOf<UIElement>(root, UIElement)) {
11263
- // root = root.container;
11264
- // }
11292
+ if ('container' in root) {
11293
+ root = root.container;
11294
+ }
11265
11295
  return $$('[ref],[data-ref]', root).reduce(function (def, child) {
11266
11296
  var key = (0,jodit_core_helpers_utils__WEBPACK_IMPORTED_MODULE_3__.attr)(child, '-ref');
11267
11297
  if (key && (0,jodit_core_helpers_checker_is_string__WEBPACK_IMPORTED_MODULE_4__/* .isString */ .K)(key)) {
@@ -16087,7 +16117,7 @@ var UITooltip = /** @class */ (function (_super) {
16087
16117
  view.o.showTooltip &&
16088
16118
  !view.o.useNativeTooltip) {
16089
16119
  view.hookStatus(jodit_core_component__WEBPACK_IMPORTED_MODULE_0__/* .STATUSES */ .f.ready, function () {
16090
- // TODO Move it inside __open method. Now it is here becous testcase failed with capturing
16120
+ // TODO Move it inside __open method. Now it is here because testcase failed with capturing
16091
16121
  (0,jodit_core_global__WEBPACK_IMPORTED_MODULE_3__/* .getContainer */ .My)(_this.j, UITooltip_1).appendChild(_this.container);
16092
16122
  view.e.on(view.container, 'mouseenter.tooltip', _this.__onMouseEnter, {
16093
16123
  capture: true
@@ -16111,6 +16141,7 @@ var UITooltip = /** @class */ (function (_super) {
16111
16141
  var view = this.j;
16112
16142
  view.e
16113
16143
  .on(view.ow, 'scroll.tooltip', this.__hide)
16144
+ .on(view.ow, 'joditCloseDialog', this.__hide)
16114
16145
  .on(view.container, 'mouseleave.tooltip', this.__hide)
16115
16146
  .on([
16116
16147
  'escape.tooltip',
@@ -18263,7 +18294,7 @@ var Popup = /** @class */ (function (_super) {
18263
18294
  }
18264
18295
  var pe = this.parentElement;
18265
18296
  while (pe) {
18266
- if (checkView(j)) {
18297
+ if (checkView(pe.j)) {
18267
18298
  return;
18268
18299
  }
18269
18300
  if (pe.container.style.zIndex) {
@@ -21174,6 +21205,7 @@ var Dialog = /** @class */ (function (_super) {
21174
21205
  * Fired when dialog box is started moving
21175
21206
  */
21176
21207
  this.e.fire(this, 'startMove');
21208
+ this.e.fire('closeAllPopups');
21177
21209
  }
21178
21210
  };
21179
21211
  Dialog.prototype.onMouseMove = function (e) {
@@ -22441,6 +22473,9 @@ var DataProvider = /** @class */ (function () {
22441
22473
  this.o.permissions.data.source = source;
22442
22474
  if (this.o.permissions.url) {
22443
22475
  return [2 /*return*/, this.get('permissions').then(function (resp) {
22476
+ if (_this.parent.isInDestruct) {
22477
+ throw (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_2__.abort)();
22478
+ }
22444
22479
  var process = _this.o.permissions.process;
22445
22480
  if (!process) {
22446
22481
  process = _this.o.ajax.process;
@@ -23231,10 +23266,18 @@ var FileBrowser = /** @class */ (function (_super) {
23231
23266
  _this.__updateToolbarButtons();
23232
23267
  _this._dialog.open(_this.browser, header);
23233
23268
  _this.e.fire('sort.filebrowser', _this.state.sortBy);
23234
- (0,_fetch_load_tree__WEBPACK_IMPORTED_MODULE_10__/* .loadTree */ .r)(_this).then(resolve, reject);
23269
+ (0,_fetch_load_tree__WEBPACK_IMPORTED_MODULE_10__/* .loadTree */ .r)(_this)
23270
+ .then(resolve, reject)
23271
+ .finally(function () {
23272
+ var _a;
23273
+ if (_this.isInDestruct) {
23274
+ return;
23275
+ }
23276
+ (_a = _this === null || _this === void 0 ? void 0 : _this.e) === null || _a === void 0 ? void 0 : _a.fire('fileBrowserReady.filebrowser');
23277
+ });
23235
23278
  })
23236
23279
  .catch(function (e) {
23237
- if (!jodit_core_constants__WEBPACK_IMPORTED_MODULE_1__.IS_PROD) {
23280
+ if (!(0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_5__.isAbortError)(e) && !jodit_core_constants__WEBPACK_IMPORTED_MODULE_1__.IS_PROD) {
23238
23281
  throw e;
23239
23282
  }
23240
23283
  });
@@ -25097,7 +25140,7 @@ var form = function (editor, o) {
25097
25140
  if (active === void 0) {
25098
25141
  active = true;
25099
25142
  }
25100
- return "<div class=\"jodit-form__group\">\n\t\t\t<label>".concat(i(label), "</label>\n\n\t\t\t<label class='jodit-switcher'>\n\t\t\t\t<input ").concat(act(active, 'checked'), " data-ref=\"").concat(ref, "\" type=\"checkbox\"/>\n\t\t\t\t<span class=\"jodit-switcher__slider\"></span>\n\t\t\t</label>\n\t</div>");
25143
+ return "<div class=\"jodit-form__group\">\n\t\t\t<label class=\"jodit-switcher-wrapper\">\n\t\t\t\t<span class='jodit-switcher'>\n\t\t\t\t\t<input ".concat(act(active, 'checked'), " data-ref=\"").concat(ref, "\" type=\"checkbox\"/>\n\t\t\t\t\t<span class=\"jodit-switcher__slider\"></span>\n\t\t\t\t</span>\n\t\t\t\t<span>").concat(i(label), "</span>\n\t\t\t</label>\n\t</div>");
25101
25144
  };
25102
25145
  return editor.create.fromHTML("<form class=\"".concat(jie, " jodit-properties\">\n\t\t<div class=\"jodit-grid jodit-grid_xs-column\">\n\t\t\t<div class=\"jodit_col-lg-3-4 jodit_col-sm-5-5\">\n\t\t\t").concat(o.resize
25103
25146
  ? "<div class=\"".concat(jie, "__area ").concat(jie, "__area_resize ").concat(jie, "_active\">\n\t\t\t\t\t\t\t<div data-ref=\"resizeBox\" class=\"").concat(jie, "__box\"></div>\n\t\t\t\t\t\t\t<div class=\"").concat(jie, "__resizer\">\n\t\t\t\t\t\t\t\t<i class=\"jodit_bottomright\"></i>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t</div>")
@@ -28230,11 +28273,13 @@ var TabsWidget = function (jodit, tabs, state) {
28230
28273
  return;
28231
28274
  }
28232
28275
  buttonList.forEach(function (b) {
28276
+ b.state.variant = 'initial';
28233
28277
  b.state.activated = false;
28234
28278
  });
28235
28279
  (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_2__.$$)('.jodit-tab', tabBox).forEach(function (a) {
28236
28280
  a.classList.remove('jodit-tab_active');
28237
28281
  });
28282
+ nameToTab[tab].button.state.variant = 'outline';
28238
28283
  nameToTab[tab].button.state.activated = true;
28239
28284
  nameToTab[tab].tab.classList.add('jodit-tab_active');
28240
28285
  };
@@ -28266,7 +28311,7 @@ var TabsWidget = function (jodit, tabs, state) {
28266
28311
  content.call(jodit);
28267
28312
  }
28268
28313
  if (state) {
28269
- state.__activeTab = name;
28314
+ state.activeTab = name;
28270
28315
  }
28271
28316
  return false;
28272
28317
  });
@@ -28282,20 +28327,20 @@ var TabsWidget = function (jodit, tabs, state) {
28282
28327
  (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_2__.$$)('a', buttons).forEach(function (a) {
28283
28328
  a.style.width = (100 / tabCount).toFixed(10) + '%';
28284
28329
  });
28285
- var tab = !state || !state.__activeTab || !nameToTab[state.__activeTab]
28330
+ var tab = !state || !state.activeTab || !nameToTab[state.activeTab]
28286
28331
  ? firstTab
28287
- : state.__activeTab;
28332
+ : state.activeTab;
28288
28333
  setActive(tab);
28289
28334
  if (state) {
28290
- var __activeTab_1 = state.__activeTab;
28291
- Object.defineProperty(state, '__activeTab', {
28335
+ var activeTab_1 = state.activeTab;
28336
+ Object.defineProperty(state, 'activeTab', {
28292
28337
  configurable: true,
28293
28338
  enumerable: false,
28294
28339
  get: function () {
28295
- return __activeTab_1;
28340
+ return activeTab_1;
28296
28341
  },
28297
28342
  set: function (value) {
28298
- __activeTab_1 = value;
28343
+ activeTab_1 = value;
28299
28344
  setActive(value);
28300
28345
  }
28301
28346
  });
@@ -28716,7 +28761,7 @@ var aiAssistant = /** @class */ (function (_super) {
28716
28761
  configurable: true
28717
28762
  });
28718
28763
  /** @override */
28719
- aiAssistant.prototype.afterInit = function (jodit) { };
28764
+ aiAssistant.prototype.afterInit = function () { };
28720
28765
  aiAssistant.prototype.onGenerateAiAssistantForm = function (prompt) {
28721
28766
  this.__dialog.open(this.__container, 'AI Assistant');
28722
28767
  this.__container.setPrompt(prompt);
@@ -34775,9 +34820,6 @@ jodit_core_global__WEBPACK_IMPORTED_MODULE_2__/* .pluginSystem */ .fg.add('image
34775
34820
  * Released under MIT see LICENSE.txt in the project root for license information.
34776
34821
  * Copyright (c) 2013-2024 Valeriy Chupurnov. All rights reserved. https://xdsoft.net
34777
34822
  */
34778
- /**
34779
- * @module plugins/image-properties
34780
- */
34781
34823
 
34782
34824
  jodit_config__WEBPACK_IMPORTED_MODULE_0__/* .Config */ .T.prototype.image = {
34783
34825
  dialogWidth: 600,
@@ -34807,18 +34849,19 @@ jodit_config__WEBPACK_IMPORTED_MODULE_0__/* .Config */ .T.prototype.image = {
34807
34849
 
34808
34850
  "use strict";
34809
34851
  /* unused harmony export imageProperties */
34810
- /* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(31635);
34852
+ /* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(31635);
34811
34853
  /* harmony import */ var jodit_core_decorators__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(53557);
34812
- /* harmony import */ var jodit_core_global__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(51431);
34813
- /* harmony import */ var jodit_core_helpers__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(9596);
34814
- /* harmony import */ var jodit_core_ui_button__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(64962);
34815
- /* harmony import */ var jodit_modules__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(35102);
34816
- /* harmony import */ var jodit_modules_image_editor_image_editor__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(60485);
34817
- /* harmony import */ var jodit_modules_widget__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(21391);
34818
- /* harmony import */ var _config__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(61115);
34819
- /* harmony import */ var _templates_form__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(98231);
34820
- /* harmony import */ var _templates_main_tab__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(9118);
34821
- /* harmony import */ var _templates_position_tab__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(85480);
34854
+ /* harmony import */ var jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(23545);
34855
+ /* harmony import */ var jodit_core_global__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(51431);
34856
+ /* harmony import */ var jodit_core_helpers__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(9596);
34857
+ /* harmony import */ var jodit_core_plugin_plugin__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(67141);
34858
+ /* harmony import */ var jodit_core_ui_button__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(64962);
34859
+ /* harmony import */ var _config__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(61115);
34860
+ /* harmony import */ var _ui_ui_image_form__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(91675);
34861
+ /* harmony import */ var _utils_open_image_editor__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(77137);
34862
+ /* harmony import */ var _utils_open_image_popup__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(91852);
34863
+ /* harmony import */ var _readers__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(61566);
34864
+ /* harmony import */ var _writers__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(48570);
34822
34865
  /*!
34823
34866
  * Jodit Editor (https://xdsoft.net/jodit/)
34824
34867
  * Released under MIT see LICENSE.txt in the project root for license information.
@@ -34850,59 +34893,114 @@ jodit_config__WEBPACK_IMPORTED_MODULE_0__/* .Config */ .T.prototype.image = {
34850
34893
  * });
34851
34894
  * ```
34852
34895
  */
34853
- var normalSizeToString = function (value) {
34854
- value = (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_2__.trim)(value);
34855
- return /^[0-9]+$/.test(value) ? value + 'px' : value;
34856
- };
34857
- var normalSizeFromString = function (value) {
34858
- return /^[-+]?[0-9.]+px$/.test(value.toString())
34859
- ? parseFloat(value.toString())
34860
- : value;
34861
- };
34862
34896
  /**
34863
34897
  * Show dialog with image's options
34864
34898
  */
34865
34899
  var imageProperties = /** @class */ (function (_super) {
34866
- (0,tslib__WEBPACK_IMPORTED_MODULE_11__/* .__extends */ .C6)(imageProperties, _super);
34900
+ (0,tslib__WEBPACK_IMPORTED_MODULE_12__/* .__extends */ .C6)(imageProperties, _super);
34867
34901
  function imageProperties() {
34868
- var _this = _super.apply(this, (0,tslib__WEBPACK_IMPORTED_MODULE_11__/* .__spreadArray */ .fX)([], (0,tslib__WEBPACK_IMPORTED_MODULE_11__/* .__read */ .zs)(arguments), false)) || this;
34902
+ var _this = _super.apply(this, (0,tslib__WEBPACK_IMPORTED_MODULE_12__/* .__spreadArray */ .fX)([], (0,tslib__WEBPACK_IMPORTED_MODULE_12__/* .__read */ .zs)(arguments), false)) || this;
34869
34903
  _this.state = {
34870
34904
  image: new Image(),
34905
+ sourceImage: new Image(),
34871
34906
  get ratio() {
34872
- return this.image.naturalWidth / this.image.naturalHeight || 1;
34907
+ var _a = this.image, naturalWidth = _a.naturalWidth, naturalHeight = _a.naturalHeight;
34908
+ return naturalWidth / naturalHeight || 1;
34873
34909
  },
34874
34910
  sizeIsLocked: true,
34875
- marginIsLocked: true
34911
+ marginIsLocked: true,
34912
+ values: {
34913
+ style: '',
34914
+ imageSrc: '',
34915
+ borderRadius: 0,
34916
+ imageTitle: '',
34917
+ imageAlt: '',
34918
+ imageLink: '',
34919
+ imageLinkOpenInNewTab: false,
34920
+ imageWidth: 0,
34921
+ imageHeight: 0,
34922
+ marginTop: 0,
34923
+ marginRight: 0,
34924
+ marginBottom: 0,
34925
+ marginLeft: 0,
34926
+ classes: '',
34927
+ id: '',
34928
+ align: ''
34929
+ }
34876
34930
  };
34877
34931
  _this.activeTabState = {
34878
- __activeTab: 'Image'
34932
+ activeTab: 'Image'
34879
34933
  };
34880
34934
  return _this;
34881
34935
  }
34882
- imageProperties.prototype.onChangeMarginIsLocked = function () {
34883
- var _this = this;
34884
- if (!this.form) {
34885
- return;
34886
- }
34887
- var _a = (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_2__.refs)(this.form), marginRight = _a.marginRight, marginBottom = _a.marginBottom, marginLeft = _a.marginLeft, lockMargin = _a.lockMargin;
34888
- [marginRight, marginBottom, marginLeft].forEach(function (elm) {
34889
- (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_2__.attr)(elm, 'disabled', _this.state.marginIsLocked || null);
34890
- });
34891
- lockMargin.innerHTML = jodit_modules__WEBPACK_IMPORTED_MODULE_4__.Icon.get(this.state.marginIsLocked ? 'lock' : 'unlock');
34892
- };
34893
- imageProperties.prototype.onChangeSizeIsLocked = function () {
34894
- if (!this.form) {
34895
- return;
34896
- }
34897
- var _a = (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_2__.refs)(this.form), lockSize = _a.lockSize, imageWidth = _a.imageWidth;
34898
- lockSize.innerHTML = jodit_modules__WEBPACK_IMPORTED_MODULE_4__.Icon.get(this.state.sizeIsLocked ? 'lock' : 'unlock');
34899
- lockSize.classList.remove('jodit-properties__lock');
34900
- lockSize.classList.remove('jodit-properties__unlock');
34901
- lockSize.classList.add(this.state.sizeIsLocked
34902
- ? 'jodit-properties__lock'
34903
- : 'jodit-properties__unlock');
34904
- this.j.e.fire(imageWidth, 'change');
34905
- };
34936
+ Object.defineProperty(imageProperties.prototype, "form", {
34937
+ get: function () {
34938
+ var _this = this;
34939
+ return new _ui_ui_image_form__WEBPACK_IMPORTED_MODULE_7__/* .UIImagePropertiesForm */ .l(this.j, this.state, this.activeTabState, {
34940
+ openImageEditor: function () {
34941
+ return (0,_utils_open_image_editor__WEBPACK_IMPORTED_MODULE_8__/* .openImageEditorDialog */ .v)(_this.j, _this.state);
34942
+ },
34943
+ openImagePopup: function (target) {
34944
+ return (0,_utils_open_image_popup__WEBPACK_IMPORTED_MODULE_9__/* .openImagePopup */ .q)(_this.j, _this.dialog, _this.state, target);
34945
+ }
34946
+ });
34947
+ },
34948
+ enumerable: false,
34949
+ configurable: true
34950
+ });
34951
+ Object.defineProperty(imageProperties.prototype, "dialog", {
34952
+ /**
34953
+ * Dialog for form
34954
+ */
34955
+ get: function () {
34956
+ var _this = this;
34957
+ var j = this.j;
34958
+ var dialog = j.dlg({
34959
+ minWidth: Math.min(400, screen.width),
34960
+ minHeight: 590,
34961
+ buttons: ['fullsize', 'dialog.close']
34962
+ });
34963
+ var buttons = this.__buttons;
34964
+ buttons.check.onAction(function () {
34965
+ (0,_writers__WEBPACK_IMPORTED_MODULE_11__/* .applyValuesToImage */ .j)(j, _this.state, _this.state.sourceImage);
34966
+ j.synchronizeValues();
34967
+ dialog.close();
34968
+ });
34969
+ buttons.remove.onAction(function () {
34970
+ j.s.removeNode(_this.state.sourceImage);
34971
+ dialog.close();
34972
+ });
34973
+ buttons.cancel.onAction(function () {
34974
+ dialog.close();
34975
+ });
34976
+ dialog.setHeader(j.i18n('Image properties'));
34977
+ dialog.setContent(this.form);
34978
+ dialog.setFooter([[buttons.cancel, buttons.remove], buttons.check]);
34979
+ j.e.on(dialog, 'afterClose', function () {
34980
+ if (_this.state.image.parentNode &&
34981
+ j.o.image.selectImageAfterClose) {
34982
+ j.s.select(_this.state.sourceImage);
34983
+ }
34984
+ });
34985
+ dialog.setSize(j.o.image.dialogWidth);
34986
+ (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_3__.markOwner)(j, dialog.container);
34987
+ return dialog;
34988
+ },
34989
+ enumerable: false,
34990
+ configurable: true
34991
+ });
34992
+ Object.defineProperty(imageProperties.prototype, "__buttons", {
34993
+ get: function () {
34994
+ var j = this.j;
34995
+ return {
34996
+ check: (0,jodit_core_ui_button__WEBPACK_IMPORTED_MODULE_5__/* .Button */ .$n)(j, 'ok', 'Apply', 'primary'),
34997
+ remove: (0,jodit_core_ui_button__WEBPACK_IMPORTED_MODULE_5__/* .Button */ .$n)(j, 'bin', 'Delete'),
34998
+ cancel: (0,jodit_core_ui_button__WEBPACK_IMPORTED_MODULE_5__/* .Button */ .$n)(j, 'cancel', 'Cancel')
34999
+ };
35000
+ },
35001
+ enumerable: false,
35002
+ configurable: true
35003
+ });
34906
35004
  /**
34907
35005
  * Open dialog editing image properties
34908
35006
  *
@@ -34918,362 +35016,31 @@ var imageProperties = /** @class */ (function (_super) {
34918
35016
  * ```
34919
35017
  */
34920
35018
  imageProperties.prototype.open = function () {
34921
- this.makeForm();
34922
- this.activeTabState.__activeTab = 'Image';
34923
- this.j.e.fire('hidePopup');
34924
- (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_2__.markOwner)(this.j, this.dialog.container);
34925
- this.state.marginIsLocked = true;
34926
- this.state.sizeIsLocked = true;
34927
- this.onChangeMarginIsLocked();
34928
- this.onChangeSizeIsLocked();
34929
- this.updateValues();
34930
- this.dialog.open().setModal(true).setPosition();
34931
- return false;
34932
- };
34933
- /**
34934
- * Create form for edit image properties
34935
- */
34936
- imageProperties.prototype.makeForm = function () {
34937
35019
  var _this = this;
34938
- if (this.dialog) {
34939
- return;
34940
- }
34941
- this.dialog = this.j.dlg({
34942
- minWidth: Math.min(400, screen.width),
34943
- minHeight: 590,
34944
- buttons: ['fullsize', 'dialog.close']
34945
- });
34946
- var editor = this.j, opt = editor.o, i18n = editor.i18n.bind(editor), buttons = {
34947
- check: (0,jodit_core_ui_button__WEBPACK_IMPORTED_MODULE_3__/* .Button */ .$n)(editor, 'ok', 'Apply', 'primary'),
34948
- remove: (0,jodit_core_ui_button__WEBPACK_IMPORTED_MODULE_3__/* .Button */ .$n)(editor, 'bin', 'Delete')
34949
- };
34950
- editor.e.on(this.dialog, 'afterClose', function () {
34951
- if (_this.state.image.parentNode &&
34952
- opt.image.selectImageAfterClose) {
34953
- editor.s.select(_this.state.image);
34954
- }
34955
- });
34956
- buttons.remove.onAction(function () {
34957
- editor.s.removeNode(_this.state.image);
34958
- _this.dialog.close();
34959
- });
34960
- var dialog = this.dialog;
34961
- dialog.setHeader(i18n('Image properties'));
34962
- var mainForm = (0,_templates_form__WEBPACK_IMPORTED_MODULE_8__/* .form */ .Z)(editor);
34963
- this.form = mainForm;
34964
- dialog.setContent(mainForm);
34965
- var tabsBox = (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_2__.refs)(this.form).tabsBox;
34966
- if (tabsBox) {
34967
- tabsBox.appendChild((0,jodit_modules_widget__WEBPACK_IMPORTED_MODULE_6__/* .TabsWidget */ .Zg)(editor, [
34968
- { name: 'Image', content: (0,_templates_main_tab__WEBPACK_IMPORTED_MODULE_9__/* .mainTab */ .J)(editor) },
34969
- { name: 'Advanced', content: (0,_templates_position_tab__WEBPACK_IMPORTED_MODULE_10__/* .positionTab */ .b)(editor) }
34970
- ], this.activeTabState));
34971
- }
34972
- buttons.check.onAction(this.onApply);
34973
- var _a = (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_2__.refs)(this.form), changeImage = _a.changeImage, editImage = _a.editImage;
34974
- editor.e.on(changeImage, 'click', this.openImagePopup);
34975
- if (opt.image.useImageEditor) {
34976
- editor.e.on(editImage, 'click', this.openImageEditor);
34977
- }
34978
- var _b = (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_2__.refs)(mainForm), lockSize = _b.lockSize, lockMargin = _b.lockMargin, imageWidth = _b.imageWidth, imageHeight = _b.imageHeight;
34979
- if (lockSize) {
34980
- editor.e.on(lockSize, 'click', function () {
34981
- _this.state.sizeIsLocked = !_this.state.sizeIsLocked;
34982
- });
34983
- }
34984
- editor.e.on(lockMargin, 'click', function (e) {
34985
- _this.state.marginIsLocked = !_this.state.marginIsLocked;
34986
- e.preventDefault();
34987
- });
34988
- var changeSizes = function (event) {
34989
- if (!(0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_2__.isNumeric)(imageWidth.value) || !(0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_2__.isNumeric)(imageHeight.value)) {
34990
- return;
34991
- }
34992
- var w = parseFloat(imageWidth.value), h = parseFloat(imageHeight.value);
34993
- if (event.target === imageWidth) {
34994
- imageHeight.value = Math.round(w / _this.state.ratio).toString();
34995
- }
34996
- else {
34997
- imageWidth.value = Math.round(h * _this.state.ratio).toString();
34998
- }
34999
- };
35000
- editor.e.on([imageWidth, imageHeight], 'change keydown mousedown paste', function (event) {
35001
- if (!_this.state.sizeIsLocked) {
35002
- return;
35003
- }
35004
- editor.async.setTimeout(changeSizes.bind(_this, event), {
35005
- timeout: editor.defaultTimeout,
35006
- label: 'image-properties-changeSize'
35007
- });
35008
- });
35009
- dialog.setFooter([buttons.remove, buttons.check]);
35010
- dialog.setSize(this.j.o.image.dialogWidth);
35011
- };
35012
- /**
35013
- * Set input values from image
35014
- */
35015
- imageProperties.prototype.updateValues = function () {
35016
- var _this = this;
35017
- var opt = this.j.o;
35018
- var image = this.state.image;
35019
- var _a = (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_2__.refs)(this.form), marginTop = _a.marginTop, marginRight = _a.marginRight, marginBottom = _a.marginBottom, marginLeft = _a.marginLeft, lockMargin = _a.lockMargin, imageSrc = _a.imageSrc, id = _a.id, classes = _a.classes, align = _a.align, style = _a.style, imageTitle = _a.imageTitle, imageAlt = _a.imageAlt, borderRadius = _a.borderRadius, imageLink = _a.imageLink, imageWidth = _a.imageWidth, imageHeight = _a.imageHeight, imageLinkOpenInNewTab = _a.imageLinkOpenInNewTab, imageViewSrc = _a.imageViewSrc, lockSize = _a.lockSize;
35020
- var updateLock = function () {
35021
- lockMargin.checked = _this.state.marginIsLocked;
35022
- lockSize.checked = _this.state.sizeIsLocked;
35023
- }, updateAlign = function () {
35024
- if (image.style.cssFloat &&
35025
- ['left', 'right'].indexOf(image.style.cssFloat.toLowerCase()) !== -1) {
35026
- align.value = (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_2__.css)(image, 'float');
35027
- }
35028
- else {
35029
- if ((0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_2__.css)(image, 'display') === 'block' &&
35030
- image.style.marginLeft === 'auto' &&
35031
- image.style.marginRight === 'auto') {
35032
- align.value = 'center';
35033
- }
35034
- }
35035
- }, updateBorderRadius = function () {
35036
- borderRadius.value = (parseInt(image.style.borderRadius || '0', 10) || '0').toString();
35037
- }, updateId = function () {
35038
- id.value = (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_2__.attr)(image, 'id') || '';
35039
- }, updateStyle = function () {
35040
- style.value = (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_2__.attr)(image, 'style') || '';
35041
- }, updateClasses = function () {
35042
- classes.value = ((0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_2__.attr)(image, 'class') || '').replace(/jodit_focused_image[\s]*/, '');
35043
- }, updateMargins = function () {
35044
- if (!opt.image.editMargins) {
35045
- return;
35046
- }
35047
- var equal = true, wasEmptyField = false;
35048
- [marginTop, marginRight, marginBottom, marginLeft].forEach(function (elm) {
35049
- var id = (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_2__.attr)(elm, 'data-ref') || '';
35050
- var value = image.style.getPropertyValue((0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_2__.kebabCase)(id));
35051
- if (!value) {
35052
- wasEmptyField = true;
35053
- elm.value = '';
35054
- return;
35055
- }
35056
- if (/^[0-9]+(px)?$/.test(value)) {
35057
- value = parseInt(value, 10);
35058
- }
35059
- elm.value = value.toString() || '';
35060
- if ((wasEmptyField && elm.value) ||
35061
- (equal &&
35062
- id !== 'marginTop' &&
35063
- elm.value !== marginTop.value)) {
35064
- equal = false;
35065
- }
35066
- });
35067
- _this.state.marginIsLocked = equal;
35068
- }, updateSizes = function () {
35069
- var width = (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_2__.attr)(image, 'width') ||
35070
- (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_2__.css)(image, 'width', true) ||
35071
- false, height = (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_2__.attr)(image, 'height') ||
35072
- (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_2__.css)(image, 'height', true) ||
35073
- false;
35074
- imageWidth.value =
35075
- width !== false
35076
- ? normalSizeFromString(width).toString()
35077
- : image.offsetWidth.toString();
35078
- imageHeight.value =
35079
- height !== false
35080
- ? normalSizeFromString(height).toString()
35081
- : image.offsetHeight.toString();
35082
- _this.state.sizeIsLocked = (function () {
35083
- if (!(0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_2__.isNumeric)(imageWidth.value) ||
35084
- !(0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_2__.isNumeric)(imageHeight.value)) {
35085
- return false;
35086
- }
35087
- var w = parseFloat(imageWidth.value), h = parseFloat(imageHeight.value);
35088
- return Math.abs(w - h * _this.state.ratio) < 1;
35089
- })();
35090
- }, updateText = function () {
35091
- imageTitle.value = (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_2__.attr)(image, 'title') || '';
35092
- imageAlt.value = (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_2__.attr)(image, 'alt') || '';
35093
- var a = jodit_modules__WEBPACK_IMPORTED_MODULE_4__.Dom.closest(image, 'a', _this.j.editor);
35094
- if (a) {
35095
- imageLink.value = (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_2__.attr)(a, 'href') || '';
35096
- imageLinkOpenInNewTab.checked =
35097
- (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_2__.attr)(a, 'target') === '_blank';
35098
- }
35099
- else {
35100
- imageLink.value = '';
35101
- imageLinkOpenInNewTab.checked = false;
35102
- }
35103
- }, updateSrc = function () {
35104
- imageSrc.value = (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_2__.attr)(image, 'src') || '';
35105
- if (imageViewSrc) {
35106
- (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_2__.attr)(imageViewSrc, 'src', (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_2__.attr)(image, 'src') || '');
35107
- }
35108
- };
35109
- updateLock();
35110
- updateSrc();
35111
- updateText();
35112
- updateSizes();
35113
- updateMargins();
35114
- updateClasses();
35115
- updateId();
35116
- updateBorderRadius();
35117
- updateAlign();
35118
- updateStyle();
35119
- };
35120
- /**
35121
- * Apply form's values to image
35122
- */
35123
- imageProperties.prototype.onApply = function () {
35124
- var _a = (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_2__.refs)(this.form), style = _a.style, imageSrc = _a.imageSrc, borderRadius = _a.borderRadius, imageTitle = _a.imageTitle, imageAlt = _a.imageAlt, imageLink = _a.imageLink, imageWidth = _a.imageWidth, imageHeight = _a.imageHeight, marginTop = _a.marginTop, marginRight = _a.marginRight, marginBottom = _a.marginBottom, marginLeft = _a.marginLeft, imageLinkOpenInNewTab = _a.imageLinkOpenInNewTab, align = _a.align, classes = _a.classes, id = _a.id;
35125
- var opt = this.j.o;
35126
- var image = this.state.image;
35127
- // styles
35128
- if (opt.image.editStyle) {
35129
- (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_2__.attr)(image, 'style', style.value || null);
35130
- }
35131
- // Src
35132
- if (imageSrc.value) {
35133
- (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_2__.attr)(image, 'src', imageSrc.value);
35134
- }
35135
- else {
35136
- jodit_modules__WEBPACK_IMPORTED_MODULE_4__.Dom.safeRemove(image);
35137
- this.dialog.close();
35138
- return;
35139
- }
35140
- // Border radius
35141
- if (borderRadius.value !== '0' && /^[0-9]+$/.test(borderRadius.value)) {
35142
- image.style.borderRadius = borderRadius.value + 'px';
35143
- }
35144
- else {
35145
- image.style.borderRadius = '';
35146
- }
35147
- // Title
35148
- (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_2__.attr)(image, 'title', imageTitle.value || null);
35149
- // Alt
35150
- (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_2__.attr)(image, 'alt', imageAlt.value || null);
35151
- // Link
35152
- var link = jodit_modules__WEBPACK_IMPORTED_MODULE_4__.Dom.closest(image, 'a', this.j.editor);
35153
- if (imageLink.value) {
35154
- if (!link) {
35155
- link = jodit_modules__WEBPACK_IMPORTED_MODULE_4__.Dom.wrap(image, 'a', this.j.createInside);
35156
- }
35157
- (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_2__.attr)(link, 'href', imageLink.value);
35158
- (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_2__.attr)(link, 'target', imageLinkOpenInNewTab.checked ? '_blank' : null);
35159
- }
35160
- else {
35161
- if (link && link.parentNode) {
35162
- link.parentNode.replaceChild(image, link);
35163
- }
35164
- }
35165
- // Size
35166
- if (imageWidth.value !== image.offsetWidth.toString() ||
35167
- imageHeight.value !== image.offsetHeight.toString()) {
35168
- var updatedtWidth = (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_2__.trim)(imageWidth.value)
35169
- ? normalSizeToString(imageWidth.value)
35170
- : null;
35171
- var updatedHeight = (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_2__.trim)(imageHeight.value)
35172
- ? normalSizeToString(imageHeight.value)
35173
- : null;
35174
- (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_2__.css)(image, {
35175
- width: updatedtWidth,
35176
- height: updatedHeight
35177
- });
35178
- (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_2__.attr)(image, 'width', (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_2__.attr)(image, 'width') ? updatedtWidth : null);
35179
- (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_2__.attr)(image, 'height', (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_2__.attr)(image, 'height') ? updatedHeight : null);
35180
- }
35181
- var margins = [marginTop, marginRight, marginBottom, marginLeft];
35182
- if (opt.image.editMargins) {
35183
- if (!this.state.marginIsLocked) {
35184
- margins.forEach(function (margin) {
35185
- var side = (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_2__.attr)(margin, 'data-ref') || '';
35186
- (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_2__.css)(image, side, normalSizeToString(margin.value));
35187
- });
35188
- }
35189
- else {
35190
- (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_2__.css)(image, 'margin', normalSizeToString(marginTop.value));
35191
- }
35192
- }
35193
- if (opt.image.editClass) {
35194
- (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_2__.attr)(image, 'class', classes.value || null);
35195
- }
35196
- if (opt.image.editId) {
35197
- (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_2__.attr)(image, 'id', id.value || null);
35198
- }
35199
- if (opt.image.editAlign) {
35200
- (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_2__.hAlignElement)(image, align.value);
35201
- }
35202
- this.j.synchronizeValues();
35203
- this.dialog.close();
35204
- };
35205
- /**
35206
- * Open image editor dialog
35207
- */
35208
- imageProperties.prototype.openImageEditor = function () {
35209
- var _this = this;
35210
- var url = (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_2__.attr)(this.state.image, 'src') || '', a = this.j.c.element('a'), loadExternal = function () {
35211
- if (a.host !== location.host) {
35212
- _this.j.confirm('You can only edit your own images. Download this image on the host?', function (yes) {
35213
- if (yes && _this.j.uploader) {
35214
- _this.j.uploader.uploadRemoteImage(a.href.toString(), function (resp) {
35215
- _this.j.alert('The image has been successfully uploaded to the host!', function () {
35216
- if ((0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_2__.isString)(resp.newfilename)) {
35217
- (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_2__.attr)(_this.state.image, 'src', resp.baseurl +
35218
- resp.newfilename);
35219
- _this.updateValues();
35220
- }
35221
- });
35222
- }, function (error) {
35223
- _this.j.alert('There was an error loading %s', error.message);
35224
- });
35225
- }
35226
- });
35227
- return;
35020
+ this.activeTabState.activeTab = 'Image';
35021
+ this.__lock();
35022
+ this.dialog.open().setModal(true).setPosition();
35023
+ this.async
35024
+ .promise(function (resolve, reject) {
35025
+ return (0,_readers__WEBPACK_IMPORTED_MODULE_10__/* .readValuesFromImage */ .U)(_this.j, _this.state).then(resolve, reject);
35026
+ })
35027
+ .catch(function (e) {
35028
+ if (!(0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_3__.isAbortError)(e)) {
35029
+ _this.dialog.message.error(e.message);
35228
35030
  }
35229
- };
35230
- a.href = url;
35231
- this.j.filebrowser.dataProvider
35232
- .getPathByUrl(a.href.toString())
35233
- .then(function (resp) {
35234
- jodit_modules_image_editor_image_editor__WEBPACK_IMPORTED_MODULE_5__/* .openImageEditor */ .B.call(_this.j.filebrowser, a.href, resp.name, resp.path, resp.source, function () {
35235
- var timestamp = new Date().getTime();
35236
- (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_2__.attr)(_this.state.image, 'src', url +
35237
- (url.indexOf('?') !== -1 ? '' : '?') +
35238
- '&_tmp=' +
35239
- timestamp.toString());
35240
- _this.updateValues();
35241
- }, function (error) {
35242
- _this.j.alert(error.message);
35243
- });
35244
35031
  })
35245
- .catch(function (error) {
35246
- _this.j.alert(error.message, loadExternal);
35247
- });
35032
+ .finally(function () { return _this.__unlock(); });
35033
+ return false;
35248
35034
  };
35249
- /**
35250
- * Open popup with filebrowser/uploader buttons for image
35251
- */
35252
- imageProperties.prototype.openImagePopup = function (event) {
35253
- var _this = this;
35254
- var popup = new jodit_modules__WEBPACK_IMPORTED_MODULE_4__.Popup(this.j), changeImage = (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_2__.refs)(this.form).changeImage;
35255
- popup.setZIndex(this.dialog.getZIndex() + 1);
35256
- popup
35257
- .setContent((0,jodit_modules_widget__WEBPACK_IMPORTED_MODULE_6__/* .FileSelectorWidget */ .kG)(this.j, {
35258
- upload: function (data) {
35259
- if (data.files && data.files.length) {
35260
- (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_2__.attr)(_this.state.image, 'src', data.baseurl + data.files[0]);
35261
- }
35262
- _this.updateValues();
35263
- popup.close();
35264
- },
35265
- filebrowser: function (data) {
35266
- if (data &&
35267
- (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_2__.isArray)(data.files) &&
35268
- data.files.length) {
35269
- (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_2__.attr)(_this.state.image, 'src', data.files[0]);
35270
- popup.close();
35271
- _this.updateValues();
35272
- }
35273
- }
35274
- }, this.state.image, popup.close))
35275
- .open(function () { return (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_2__.position)(changeImage); });
35276
- event.stopPropagation();
35035
+ imageProperties.prototype.__lock = function () {
35036
+ this.dialog.lock();
35037
+ this.form.setMod('lock', true);
35038
+ Object.values(this.__buttons).forEach(function (b) { return (b.state.disabled = true); });
35039
+ };
35040
+ imageProperties.prototype.__unlock = function () {
35041
+ this.dialog.unlock();
35042
+ this.form.setMod('lock', false);
35043
+ Object.values(this.__buttons).forEach(function (b) { return (b.state.disabled = false); });
35277
35044
  };
35278
35045
  /** @override **/
35279
35046
  imageProperties.prototype.afterInit = function (editor) {
@@ -35285,7 +35052,7 @@ var imageProperties = /** @class */ (function (_super) {
35285
35052
  .off(editor.editor, '.imageproperties')
35286
35053
  .on(editor.editor, 'dblclick.imageproperties', function (e) {
35287
35054
  var image = e.target;
35288
- if (!jodit_modules__WEBPACK_IMPORTED_MODULE_4__.Dom.isTag(image, 'img')) {
35055
+ if (!jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_1__/* .Dom */ .J.isTag(image, 'img')) {
35289
35056
  return;
35290
35057
  }
35291
35058
  if (editor.o.image.openOnDblClick) {
@@ -35293,7 +35060,8 @@ var imageProperties = /** @class */ (function (_super) {
35293
35060
  false) {
35294
35061
  return;
35295
35062
  }
35296
- self.state.image = image;
35063
+ self.state.sourceImage = image;
35064
+ self.state.image = image.cloneNode(true);
35297
35065
  if (!editor.o.readonly) {
35298
35066
  e.stopImmediatePropagation();
35299
35067
  e.preventDefault();
@@ -35307,115 +35075,1257 @@ var imageProperties = /** @class */ (function (_super) {
35307
35075
  });
35308
35076
  })
35309
35077
  .on('openImageProperties.imageproperties', function (image) {
35310
- _this.state.image = image;
35078
+ self.state.sourceImage = image;
35079
+ _this.state.image = image.cloneNode(true);
35311
35080
  _this.open();
35312
35081
  });
35313
35082
  };
35083
+ imageProperties.prototype.onStateValuesImageSrcChange = function () {
35084
+ return (0,tslib__WEBPACK_IMPORTED_MODULE_12__/* .__awaiter */ .sH)(this, void 0, Promise, function () {
35085
+ var _a, image, values, w, e_1;
35086
+ return (0,tslib__WEBPACK_IMPORTED_MODULE_12__/* .__generator */ .YH)(this, function (_b) {
35087
+ switch (_b.label) {
35088
+ case 0:
35089
+ _a = this.state, image = _a.image, values = _a.values;
35090
+ if (!image.src) {
35091
+ return [2 /*return*/];
35092
+ }
35093
+ _b.label = 1;
35094
+ case 1:
35095
+ _b.trys.push([1, 3, 4, 5]);
35096
+ this.__lock();
35097
+ return [4 /*yield*/, image.decode()];
35098
+ case 2:
35099
+ _b.sent();
35100
+ if (this.state.sizeIsLocked && (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_3__.isNumeric)(values.imageWidth)) {
35101
+ w = parseFloat(values.imageWidth.toString());
35102
+ values.imageHeight = Math.round(w / this.state.ratio);
35103
+ }
35104
+ this.j.e.fire('updateImageProperties.imageproperties', image);
35105
+ return [3 /*break*/, 5];
35106
+ case 3:
35107
+ e_1 = _b.sent();
35108
+ this.j.alert(e_1.message);
35109
+ return [3 /*break*/, 5];
35110
+ case 4:
35111
+ this.__unlock();
35112
+ return [7 /*endfinally*/];
35113
+ case 5: return [2 /*return*/];
35114
+ }
35115
+ });
35116
+ });
35117
+ };
35314
35118
  /** @override */
35315
35119
  imageProperties.prototype.beforeDestruct = function (editor) {
35316
- this.dialog && this.dialog.destruct();
35120
+ var _a, _b, _c;
35121
+ Object.values((_a = (0,jodit_core_decorators__WEBPACK_IMPORTED_MODULE_0__.cached)(this, '__buttons')) !== null && _a !== void 0 ? _a : {}).forEach(function (b) { return b.destruct(); });
35122
+ (_b = (0,jodit_core_decorators__WEBPACK_IMPORTED_MODULE_0__.cached)(this, 'dialog')) === null || _b === void 0 ? void 0 : _b.destruct();
35123
+ (_c = (0,jodit_core_decorators__WEBPACK_IMPORTED_MODULE_0__.cached)(this, 'form')) === null || _c === void 0 ? void 0 : _c.destruct();
35317
35124
  editor.e.off(editor.editor, '.imageproperties').off('.imageproperties');
35318
35125
  };
35319
- (0,tslib__WEBPACK_IMPORTED_MODULE_11__/* .__decorate */ .Cg)([
35320
- (0,jodit_core_decorators__WEBPACK_IMPORTED_MODULE_0__.watch)('state.marginIsLocked')
35321
- ], imageProperties.prototype, "onChangeMarginIsLocked", null);
35322
- (0,tslib__WEBPACK_IMPORTED_MODULE_11__/* .__decorate */ .Cg)([
35323
- (0,jodit_core_decorators__WEBPACK_IMPORTED_MODULE_0__.watch)('state.sizeIsLocked')
35324
- ], imageProperties.prototype, "onChangeSizeIsLocked", null);
35325
- (0,tslib__WEBPACK_IMPORTED_MODULE_11__/* .__decorate */ .Cg)([
35326
- jodit_core_decorators__WEBPACK_IMPORTED_MODULE_0__.autobind
35327
- ], imageProperties.prototype, "onApply", null);
35328
- (0,tslib__WEBPACK_IMPORTED_MODULE_11__/* .__decorate */ .Cg)([
35329
- jodit_core_decorators__WEBPACK_IMPORTED_MODULE_0__.autobind
35330
- ], imageProperties.prototype, "openImageEditor", null);
35331
- (0,tslib__WEBPACK_IMPORTED_MODULE_11__/* .__decorate */ .Cg)([
35332
- jodit_core_decorators__WEBPACK_IMPORTED_MODULE_0__.autobind
35333
- ], imageProperties.prototype, "openImagePopup", null);
35126
+ (0,tslib__WEBPACK_IMPORTED_MODULE_12__/* .__decorate */ .Cg)([
35127
+ jodit_core_decorators__WEBPACK_IMPORTED_MODULE_0__.cache
35128
+ ], imageProperties.prototype, "form", null);
35129
+ (0,tslib__WEBPACK_IMPORTED_MODULE_12__/* .__decorate */ .Cg)([
35130
+ jodit_core_decorators__WEBPACK_IMPORTED_MODULE_0__.cache
35131
+ ], imageProperties.prototype, "dialog", null);
35132
+ (0,tslib__WEBPACK_IMPORTED_MODULE_12__/* .__decorate */ .Cg)([
35133
+ jodit_core_decorators__WEBPACK_IMPORTED_MODULE_0__.cache
35134
+ ], imageProperties.prototype, "__buttons", null);
35135
+ (0,tslib__WEBPACK_IMPORTED_MODULE_12__/* .__decorate */ .Cg)([
35136
+ (0,jodit_core_decorators__WEBPACK_IMPORTED_MODULE_0__.watch)('state.image')
35137
+ ], imageProperties.prototype, "onStateValuesImageSrcChange", null);
35334
35138
  return imageProperties;
35335
- }(jodit_modules__WEBPACK_IMPORTED_MODULE_4__.Plugin));
35139
+ }(jodit_core_plugin_plugin__WEBPACK_IMPORTED_MODULE_4__/* .Plugin */ .k));
35336
35140
 
35337
- jodit_core_global__WEBPACK_IMPORTED_MODULE_1__/* .pluginSystem */ .fg.add('imageProperties', imageProperties);
35141
+ jodit_core_global__WEBPACK_IMPORTED_MODULE_2__/* .pluginSystem */ .fg.add('imageProperties', imageProperties);
35338
35142
 
35339
35143
 
35340
35144
  /***/ }),
35341
35145
 
35342
- /***/ 98231:
35146
+ /***/ 81091:
35343
35147
  /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
35344
35148
 
35345
35149
  "use strict";
35346
35150
  /* harmony export */ __webpack_require__.d(__webpack_exports__, {
35347
- /* harmony export */ Z: function() { return /* binding */ form; }
35151
+ /* harmony export */ g: function() { return /* binding */ readAlign; }
35348
35152
  /* harmony export */ });
35349
- /* harmony import */ var jodit_core_ui_icon__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(80004);
35153
+ /* harmony import */ var jodit_core_helpers_utils_css__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(4401);
35350
35154
  /*!
35351
35155
  * Jodit Editor (https://xdsoft.net/jodit/)
35352
35156
  * Released under MIT see LICENSE.txt in the project root for license information.
35353
35157
  * Copyright (c) 2013-2024 Valeriy Chupurnov. All rights reserved. https://xdsoft.net
35354
35158
  */
35355
35159
 
35356
- function form(editor) {
35357
- var _a = editor.o.image, showPreview = _a.showPreview, editSize = _a.editSize, gi = jodit_core_ui_icon__WEBPACK_IMPORTED_MODULE_0__/* .Icon */ .I.get.bind(jodit_core_ui_icon__WEBPACK_IMPORTED_MODULE_0__/* .Icon */ .I);
35358
- return editor.c.fromHTML("<form class=\"jodit-properties\">\n\t\t<div class=\"jodit-grid jodit-grid_xs-column\">\n\t\t\t<div class=\"jodit_col-lg-2-5 jodit_col-xs-5-5\">\n\t\t\t\t<div class=\"jodit-properties_view_box\">\n\t\t\t\t\t<div style=\"".concat(!showPreview ? 'display:none' : '', "\" class=\"jodit-properties_image_view\">\n\t\t\t\t\t\t<img data-ref=\"imageViewSrc\" src=\"\" alt=\"\"/>\n\t\t\t\t\t</div>\n\t\t\t\t\t<div style=\"").concat(!editSize ? 'display:none' : '', "\" class=\"jodit-form__group jodit-properties_image_sizes\">\n\t\t\t\t\t\t<input data-ref=\"imageWidth\" type=\"text\" class=\"jodit-input\"/>\n\t\t\t\t\t\t<a data-ref=\"lockSize\" class=\"jodit-properties__lock\">").concat(gi('lock'), "</a>\n\t\t\t\t\t\t<input data-ref=\"imageHeight\" type=\"text\" class=\"imageHeight jodit-input\"/>\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t\t<div data-ref=\"tabsBox\" class=\"jodit_col-lg-3-5 jodit_col-xs-5-5\"></div>\n\t\t</div>\n\t</form>"));
35160
+ /** @private */
35161
+ function readAlign(image, values) {
35162
+ // Align
35163
+ if (image.style.cssFloat &&
35164
+ ['left', 'right'].indexOf(image.style.cssFloat.toLowerCase()) !== -1) {
35165
+ values.align = (0,jodit_core_helpers_utils_css__WEBPACK_IMPORTED_MODULE_0__/* .css */ .A)(image, 'float');
35166
+ }
35167
+ else {
35168
+ if ((0,jodit_core_helpers_utils_css__WEBPACK_IMPORTED_MODULE_0__/* .css */ .A)(image, 'display') === 'block' &&
35169
+ image.style.marginLeft === 'auto' &&
35170
+ image.style.marginRight === 'auto') {
35171
+ values.align = 'center';
35172
+ }
35173
+ else {
35174
+ values.align = '';
35175
+ }
35176
+ }
35359
35177
  }
35360
35178
 
35361
35179
 
35362
35180
  /***/ }),
35363
35181
 
35364
- /***/ 9118:
35182
+ /***/ 61566:
35365
35183
  /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
35366
35184
 
35367
35185
  "use strict";
35368
35186
  /* harmony export */ __webpack_require__.d(__webpack_exports__, {
35369
- /* harmony export */ J: function() { return /* binding */ mainTab; }
35187
+ /* harmony export */ U: function() { return /* binding */ readValuesFromImage; }
35370
35188
  /* harmony export */ });
35371
- /* harmony import */ var jodit_core_ui_icon__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(80004);
35189
+ /* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(31635);
35190
+ /* harmony import */ var jodit_core_helpers_utils_attr__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(97099);
35191
+ /* harmony import */ var _align__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(81091);
35192
+ /* harmony import */ var _link__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(33756);
35193
+ /* harmony import */ var _margin__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(51462);
35194
+ /* harmony import */ var _size__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(60225);
35195
+ /*!
35196
+ * Jodit Editor (https://xdsoft.net/jodit/)
35197
+ * Released under MIT see LICENSE.txt in the project root for license information.
35198
+ * Copyright (c) 2013-2024 Valeriy Chupurnov. All rights reserved. https://xdsoft.net
35199
+ */
35200
+
35201
+
35202
+
35203
+
35204
+
35205
+
35206
+ /**
35207
+ * Read values from image and set it to state
35208
+ * @private
35209
+ */
35210
+ function readValuesFromImage(j, state) {
35211
+ return (0,tslib__WEBPACK_IMPORTED_MODULE_3__/* .__awaiter */ .sH)(this, void 0, Promise, function () {
35212
+ var image, values;
35213
+ return (0,tslib__WEBPACK_IMPORTED_MODULE_3__/* .__generator */ .YH)(this, function (_a) {
35214
+ image = state.sourceImage, values = state.values;
35215
+ (0,_align__WEBPACK_IMPORTED_MODULE_4__/* .readAlign */ .g)(image, values);
35216
+ // Border radius
35217
+ values.borderRadius = parseInt(image.style.borderRadius || '0', 10) || 0;
35218
+ // Id
35219
+ values.id = (0,jodit_core_helpers_utils_attr__WEBPACK_IMPORTED_MODULE_0__/* .attr */ .C)(image, 'id') || '';
35220
+ // Title
35221
+ values.imageTitle = (0,jodit_core_helpers_utils_attr__WEBPACK_IMPORTED_MODULE_0__/* .attr */ .C)(image, 'title') || '';
35222
+ // Alt
35223
+ values.imageAlt = (0,jodit_core_helpers_utils_attr__WEBPACK_IMPORTED_MODULE_0__/* .attr */ .C)(image, 'alt') || '';
35224
+ // Style
35225
+ values.style = (0,jodit_core_helpers_utils_attr__WEBPACK_IMPORTED_MODULE_0__/* .attr */ .C)(image, 'style') || '';
35226
+ // Classes
35227
+ values.classes = ((0,jodit_core_helpers_utils_attr__WEBPACK_IMPORTED_MODULE_0__/* .attr */ .C)(image, 'class') || '').replace(/jodit_focused_image[\s]*/, '');
35228
+ // Margins
35229
+ (0,_margin__WEBPACK_IMPORTED_MODULE_5__/* .readMargins */ .E)(image, values, state);
35230
+ // Link
35231
+ (0,_link__WEBPACK_IMPORTED_MODULE_1__/* .readLink */ .X)(state, j, values);
35232
+ // Src
35233
+ values.imageSrc = (0,jodit_core_helpers_utils_attr__WEBPACK_IMPORTED_MODULE_0__/* .attr */ .C)(image, 'src') || '';
35234
+ // Image size
35235
+ return [2 /*return*/, (0,_size__WEBPACK_IMPORTED_MODULE_2__/* .readSizes */ .P)(image, values, state)];
35236
+ });
35237
+ });
35238
+ }
35239
+
35240
+
35241
+ /***/ }),
35242
+
35243
+ /***/ 33756:
35244
+ /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
35245
+
35246
+ "use strict";
35247
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, {
35248
+ /* harmony export */ X: function() { return /* binding */ readLink; }
35249
+ /* harmony export */ });
35250
+ /* harmony import */ var jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(23545);
35251
+ /* harmony import */ var jodit_core_helpers_utils_attr__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(97099);
35372
35252
  /*!
35373
35253
  * Jodit Editor (https://xdsoft.net/jodit/)
35374
35254
  * Released under MIT see LICENSE.txt in the project root for license information.
35375
35255
  * Copyright (c) 2013-2024 Valeriy Chupurnov. All rights reserved. https://xdsoft.net
35376
35256
  */
35377
35257
 
35378
- function mainTab(editor) {
35379
- var opt = editor.o, i18n = editor.i18n.bind(editor), gi = jodit_core_ui_icon__WEBPACK_IMPORTED_MODULE_0__/* .Icon */ .I.get.bind(jodit_core_ui_icon__WEBPACK_IMPORTED_MODULE_0__/* .Icon */ .I), hasFbUrl = opt.filebrowser.ajax.url || opt.uploader.url, hasEditor = opt.image.useImageEditor;
35380
- return editor.c.fromHTML("<div style=\"".concat(!opt.image.editSrc ? 'display:none' : '', "\" class=\"jodit-form__group\">\n\t\t\t<label>").concat(i18n('Src'), "</label>\n\t\t\t<div class=\"jodit-input_group\">\n\t\t\t\t<input data-ref=\"imageSrc\" class=\"jodit-input\" type=\"text\"/>\n\t\t\t\t<div\n\t\t\t\t\tclass=\"jodit-input_group-buttons\"\n\t\t\t\t\tstyle=\"").concat(hasFbUrl ? '' : 'display: none', "\"\n\t\t\t\t>\n\t\t\t\t\t\t<a\n\t\t\t\t\t\t\tdata-ref=\"changeImage\"\n\t\t\t\t\t\t\tclass=\"jodit-button\"\n\t\t\t\t\t\t>").concat(gi('image'), "</a>\n\t\t\t\t\t\t<a\n\t\t\t\t\t\t\tdata-ref=\"editImage\"\n\t\t\t\t\t\t\tclass=\"jodit-button\"\n\t\t\t\t\t\t\tstyle=\"").concat(hasEditor ? '' : 'display: none', "\"\n\t\t\t\t\t\t>").concat(gi('crop'), "</a>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t</div>\n\t\t<div style=\"").concat(!opt.image.editTitle ? 'display:none' : '', "\" class=\"jodit-form__group\">\n\t\t\t<label>").concat(i18n('Title'), "</label>\n\t\t\t<input data-ref=\"imageTitle\" type=\"text\" class=\"jodit-input\"/>\n\t\t</div>\n\t\t<div style=\"").concat(!opt.image.editAlt ? 'display:none' : '', "\" class=\"jodit-form__group\">\n\t\t\t<label>").concat(i18n('Alternative'), "</label>\n\t\t\t<input data-ref=\"imageAlt\" type=\"text\" class=\"jodit-input\"/>\n\t\t</div>\n\t\t<div style=\"").concat(!opt.image.editLink ? 'display:none' : '', "\" class=\"jodit-form__group\">\n\t\t\t<label>").concat(i18n('Link'), "</label>\n\t\t\t<input data-ref=\"imageLink\" type=\"text\" class=\"jodit-input\"/>\n\t\t</div>\n\t\t<div style=\"").concat(!opt.image.editLink ? 'display:none' : '', "\" class=\"jodit-form__group\">\n\t\t\t<label class=\"jodit_vertical_middle\">\n\t\t\t\t<input data-ref=\"imageLinkOpenInNewTab\" type=\"checkbox\" class=\"jodit-checkbox\"/>\n\t\t\t\t<span>").concat(i18n('Open link in new tab'), "</span>\n\t\t\t</label>\n\t\t</div>"));
35258
+
35259
+ /** @private */
35260
+ function readLink(state, j, values) {
35261
+ var a = jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_0__/* .Dom */ .J.closest(state.sourceImage, 'a', j.editor);
35262
+ if (a) {
35263
+ values.imageLink = (0,jodit_core_helpers_utils_attr__WEBPACK_IMPORTED_MODULE_1__/* .attr */ .C)(a, 'href') || '';
35264
+ values.imageLinkOpenInNewTab = (0,jodit_core_helpers_utils_attr__WEBPACK_IMPORTED_MODULE_1__/* .attr */ .C)(a, 'target') === '_blank';
35265
+ }
35266
+ else {
35267
+ values.imageLink = '';
35268
+ values.imageLinkOpenInNewTab = false;
35269
+ }
35381
35270
  }
35382
35271
 
35383
35272
 
35384
35273
  /***/ }),
35385
35274
 
35386
- /***/ 85480:
35275
+ /***/ 51462:
35387
35276
  /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
35388
35277
 
35389
35278
  "use strict";
35390
35279
  /* harmony export */ __webpack_require__.d(__webpack_exports__, {
35391
- /* harmony export */ b: function() { return /* binding */ positionTab; }
35280
+ /* harmony export */ E: function() { return /* binding */ readMargins; }
35392
35281
  /* harmony export */ });
35393
- /* harmony import */ var jodit_core_ui_icon__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(80004);
35282
+ /* harmony import */ var jodit_core_helpers_string_kebab_case__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(18014);
35283
+ /*!
35284
+ * Jodit Editor (https://xdsoft.net/jodit/)
35285
+ * Released under MIT see LICENSE.txt in the project root for license information.
35286
+ * Copyright (c) 2013-2024 Valeriy Chupurnov. All rights reserved. https://xdsoft.net
35287
+ */
35288
+
35289
+ /** @private */
35290
+ function readMargins(image, values, state) {
35291
+ // Margins
35292
+ var equal = true, wasEmptyField = false;
35293
+ ['marginTop', 'marginRight', 'marginBottom', 'marginLeft'].forEach(function (id) {
35294
+ var value = image.style.getPropertyValue((0,jodit_core_helpers_string_kebab_case__WEBPACK_IMPORTED_MODULE_0__/* .kebabCase */ .k)(id));
35295
+ if (!value) {
35296
+ wasEmptyField = true;
35297
+ values[id] = 0;
35298
+ return;
35299
+ }
35300
+ if (/^[0-9]+(px)?$/.test(value)) {
35301
+ value = parseInt(value, 10);
35302
+ }
35303
+ values[id] = value;
35304
+ if ((wasEmptyField && values[id]) ||
35305
+ (equal && id !== 'marginTop' && values[id] !== values.marginTop)) {
35306
+ equal = false;
35307
+ }
35308
+ });
35309
+ state.marginIsLocked = equal;
35310
+ }
35311
+
35312
+
35313
+ /***/ }),
35314
+
35315
+ /***/ 60225:
35316
+ /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
35317
+
35318
+ "use strict";
35319
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, {
35320
+ /* harmony export */ P: function() { return /* binding */ readSizes; }
35321
+ /* harmony export */ });
35322
+ /* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(31635);
35323
+ /* harmony import */ var jodit_core_helpers_checker_is_numeric__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(59372);
35324
+ /* harmony import */ var jodit_core_helpers_utils_attr__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(97099);
35325
+ /* harmony import */ var jodit_core_helpers_utils_css__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(4401);
35326
+ /* harmony import */ var _utils_utils__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(10926);
35327
+ /*!
35328
+ * Jodit Editor (https://xdsoft.net/jodit/)
35329
+ * Released under MIT see LICENSE.txt in the project root for license information.
35330
+ * Copyright (c) 2013-2024 Valeriy Chupurnov. All rights reserved. https://xdsoft.net
35331
+ */
35332
+
35333
+
35334
+
35335
+
35336
+
35337
+ /** @private */
35338
+ function readSizes(image, values, state) {
35339
+ return (0,tslib__WEBPACK_IMPORTED_MODULE_2__/* .__awaiter */ .sH)(this, void 0, Promise, function () {
35340
+ var width, height, imageWidth, imageHeight, w, h;
35341
+ return (0,tslib__WEBPACK_IMPORTED_MODULE_2__/* .__generator */ .YH)(this, function (_a) {
35342
+ switch (_a.label) {
35343
+ case 0: return [4 /*yield*/, image.decode()];
35344
+ case 1:
35345
+ _a.sent();
35346
+ width = (0,jodit_core_helpers_utils_attr__WEBPACK_IMPORTED_MODULE_0__/* .attr */ .C)(image, 'width') || (0,jodit_core_helpers_utils_css__WEBPACK_IMPORTED_MODULE_3__/* .css */ .A)(image, 'width', true) || false;
35347
+ height = (0,jodit_core_helpers_utils_attr__WEBPACK_IMPORTED_MODULE_0__/* .attr */ .C)(image, 'height') || (0,jodit_core_helpers_utils_css__WEBPACK_IMPORTED_MODULE_3__/* .css */ .A)(image, 'height', true) || false;
35348
+ values.imageWidth =
35349
+ width !== false
35350
+ ? (0,_utils_utils__WEBPACK_IMPORTED_MODULE_1__/* .normalSizeFromString */ .G)(width)
35351
+ : image.offsetWidth || image.naturalWidth;
35352
+ values.imageHeight =
35353
+ height !== false
35354
+ ? (0,_utils_utils__WEBPACK_IMPORTED_MODULE_1__/* .normalSizeFromString */ .G)(height)
35355
+ : image.offsetHeight || image.naturalHeight;
35356
+ imageWidth = values.imageWidth, imageHeight = values.imageHeight;
35357
+ w = parseFloat(imageWidth.toString());
35358
+ if (!(0,jodit_core_helpers_checker_is_numeric__WEBPACK_IMPORTED_MODULE_4__/* .isNumeric */ .k)(imageWidth) || !(0,jodit_core_helpers_checker_is_numeric__WEBPACK_IMPORTED_MODULE_4__/* .isNumeric */ .k)(imageHeight)) {
35359
+ state.sizeIsLocked = false;
35360
+ return [2 /*return*/];
35361
+ }
35362
+ if (height === false) {
35363
+ values.imageHeight = Math.round(w / state.ratio);
35364
+ state.sizeIsLocked = true;
35365
+ return [2 /*return*/];
35366
+ }
35367
+ h = parseFloat(imageHeight.toString());
35368
+ state.sizeIsLocked = Math.abs(w - h * state.ratio) < 1;
35369
+ return [2 /*return*/];
35370
+ }
35371
+ });
35372
+ });
35373
+ }
35374
+
35375
+
35376
+ /***/ }),
35377
+
35378
+ /***/ 91675:
35379
+ /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
35380
+
35381
+ "use strict";
35382
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, {
35383
+ /* harmony export */ l: function() { return /* binding */ UIImagePropertiesForm; }
35384
+ /* harmony export */ });
35385
+ /* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(31635);
35386
+ /* harmony import */ var jodit_core_decorators__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(53557);
35387
+ /* harmony import */ var jodit_core_decorators_component_component__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(12222);
35388
+ /* harmony import */ var jodit_core_helpers__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(9596);
35389
+ /* harmony import */ var jodit_core_ui_group_group__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(1530);
35390
+ /* harmony import */ var jodit_core_ui_icon__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(80004);
35391
+ /* harmony import */ var jodit_modules_widget__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(21391);
35392
+ /* harmony import */ var _ui_image_main_tab__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(26282);
35393
+ /* harmony import */ var _ui_image_position_tab__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(26180);
35394
+ /*!
35395
+ * Jodit Editor (https://xdsoft.net/jodit/)
35396
+ * Released under MIT see LICENSE.txt in the project root for license information.
35397
+ * Copyright (c) 2013-2024 Valeriy Chupurnov. All rights reserved. https://xdsoft.net
35398
+ */
35399
+
35400
+
35401
+
35402
+
35403
+
35404
+
35405
+
35406
+
35407
+
35408
+
35409
+ /** @private */
35410
+ var UIImagePropertiesForm = /** @class */ (function (_super) {
35411
+ (0,tslib__WEBPACK_IMPORTED_MODULE_7__/* .__extends */ .C6)(UIImagePropertiesForm, _super);
35412
+ function UIImagePropertiesForm(jodit, state, activeTabState, handlers) {
35413
+ var _this = _super.call(this, jodit) || this;
35414
+ _this.state = state;
35415
+ _this.handlers = handlers;
35416
+ _this.__mainTab = new _ui_image_main_tab__WEBPACK_IMPORTED_MODULE_5__/* .UIImageMainTab */ .k(_this.jodit, _this.state, _this.handlers);
35417
+ _this.__positionTab = new _ui_image_position_tab__WEBPACK_IMPORTED_MODULE_6__/* .UIImagePositionTab */ ._(_this.jodit, _this.state, _this.handlers);
35418
+ _this.getElm('tabsBox').appendChild((0,jodit_modules_widget__WEBPACK_IMPORTED_MODULE_4__/* .TabsWidget */ .Zg)(jodit, [
35419
+ { name: 'Image', content: _this.__mainTab },
35420
+ { name: 'Advanced', content: _this.__positionTab }
35421
+ ], activeTabState));
35422
+ _this.setMod('lock-size', _this.state.sizeIsLocked);
35423
+ _this.append(_this.__mainTab).append(_this.__positionTab);
35424
+ return _this;
35425
+ }
35426
+ UIImagePropertiesForm.prototype.className = function () {
35427
+ return 'UIImagePropertiesForm';
35428
+ };
35429
+ UIImagePropertiesForm.prototype.appendChildToContainer = function () { };
35430
+ UIImagePropertiesForm.prototype.getElm = function (elementName) {
35431
+ var e_1, _a;
35432
+ var selfElm = _super.prototype.getElm.call(this, elementName);
35433
+ if (selfElm) {
35434
+ return selfElm;
35435
+ }
35436
+ try {
35437
+ for (var _b = (0,tslib__WEBPACK_IMPORTED_MODULE_7__/* .__values */ .Ju)(this.elements), _c = _b.next(); !_c.done; _c = _b.next()) {
35438
+ var child = _c.value;
35439
+ var elm = child.getElm(elementName);
35440
+ if (elm) {
35441
+ return elm;
35442
+ }
35443
+ }
35444
+ }
35445
+ catch (e_1_1) {
35446
+ e_1 = { error: e_1_1 };
35447
+ }
35448
+ finally {
35449
+ try {
35450
+ if (_c && !_c.done && (_a = _b.return))
35451
+ _a.call(_b);
35452
+ }
35453
+ finally {
35454
+ if (e_1)
35455
+ throw e_1.error;
35456
+ }
35457
+ }
35458
+ return null;
35459
+ };
35460
+ UIImagePropertiesForm.prototype.render = function () {
35461
+ return "<form>\n\t\t<div class=\"jodit-grid jodit-grid_xs-column\">\n\t\t\t<div class=\"jodit_col-lg-2-5 jodit_col-xs-5-5\">\n\t\t\t\t<div class=\"&__view-box\">\n\t\t\t\t\t<div class=\"&__imageView\">\n\t\t\t\t\t\t<img class=\"&__imageViewSrc\" src=\"\" alt=\"\"/>\n\t\t\t\t\t</div>\n\t\t\t\t\t<div class=\"jodit-form__group &__imageSizes\">\n\t\t\t\t\t\t<input type=\"text\" class=\"jodit-input &__imageWidth\"/>\n\t\t\t\t\t\t<a class=\"&__lockSize\">".concat(jodit_core_ui_icon__WEBPACK_IMPORTED_MODULE_3__/* .Icon */ .I.get('lock'), "</a>\n\t\t\t\t\t\t<input type=\"text\" class=\"&__imageHeight jodit-input\"/>\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t\t<div class=\"jodit_col-lg-3-5 jodit_col-xs-5-5 &__tabsBox\"></div>\n\t\t</div>\n\t</form>");
35462
+ };
35463
+ UIImagePropertiesForm.prototype.onChangeSizeIsLocked = function () {
35464
+ var lockSize = this.getElm('lockSize');
35465
+ var imageWidth = this.getElm('imageWidth');
35466
+ lockSize.innerHTML = jodit_core_ui_icon__WEBPACK_IMPORTED_MODULE_3__/* .Icon */ .I.get(this.state.sizeIsLocked ? 'lock' : 'unlock');
35467
+ this.setMod('lock-size', this.state.sizeIsLocked);
35468
+ this.j.e.fire(imageWidth, 'change');
35469
+ };
35470
+ UIImagePropertiesForm.prototype.onLockSizeClick = function () {
35471
+ this.state.sizeIsLocked = !this.state.sizeIsLocked;
35472
+ };
35473
+ UIImagePropertiesForm.prototype.onStateValuesSizeChange = function () {
35474
+ var imageWidth = this.getElm('imageWidth');
35475
+ var imageHeight = this.getElm('imageHeight');
35476
+ if (imageWidth !== this.j.od.activeElement) {
35477
+ imageWidth.value = this.state.values.imageWidth.toString();
35478
+ }
35479
+ if (imageHeight !== this.j.od.activeElement) {
35480
+ imageHeight.value = this.state.values.imageHeight.toString();
35481
+ }
35482
+ };
35483
+ UIImagePropertiesForm.prototype.onImageWidthChange = function (e) {
35484
+ var imageWidth = this.getElm('imageWidth');
35485
+ var imageHeight = this.getElm('imageHeight');
35486
+ if (!this.state.sizeIsLocked ||
35487
+ !(0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_1__.isNumeric)(imageWidth.value) ||
35488
+ !(0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_1__.isNumeric)(imageHeight.value)) {
35489
+ this.state.values.imageWidth = imageWidth.value;
35490
+ this.state.values.imageHeight = imageHeight.value;
35491
+ return;
35492
+ }
35493
+ var w = parseFloat(imageWidth.value), h = parseFloat(imageHeight.value);
35494
+ if (e.target === imageWidth) {
35495
+ this.state.values.imageWidth = w;
35496
+ this.state.values.imageHeight = Math.round(w / this.state.ratio);
35497
+ }
35498
+ else {
35499
+ this.state.values.imageWidth = Math.round(h * this.state.ratio);
35500
+ this.state.values.imageHeight = h;
35501
+ }
35502
+ };
35503
+ UIImagePropertiesForm.prototype.onStateValuesImageSrcChange = function () {
35504
+ var imageSrc = this.state.values.imageSrc;
35505
+ if (!imageSrc) {
35506
+ return;
35507
+ }
35508
+ var imageViewSrc = this.getElm('imageViewSrc');
35509
+ (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_1__.attr)(imageViewSrc, 'src', imageSrc);
35510
+ var image = new Image();
35511
+ image.src = imageSrc;
35512
+ this.state.image = image;
35513
+ };
35514
+ UIImagePropertiesForm.prototype.hideFieldByOptions = function () {
35515
+ var _this = this;
35516
+ var opt = this.j.o.image;
35517
+ [
35518
+ ['editSize', 'imageSizes'],
35519
+ ['showPreview', 'imageView']
35520
+ ].forEach(function (_a) {
35521
+ var _b = (0,tslib__WEBPACK_IMPORTED_MODULE_7__/* .__read */ .zs)(_a, 2), optKey = _b[0], elmKey = _b[1];
35522
+ var elm = _this.getElm(elmKey);
35523
+ (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_1__.css)(elm, 'display', opt[optKey] ? null : 'none');
35524
+ });
35525
+ };
35526
+ (0,tslib__WEBPACK_IMPORTED_MODULE_7__/* .__decorate */ .Cg)([
35527
+ (0,jodit_core_decorators__WEBPACK_IMPORTED_MODULE_0__.hook)('ready'),
35528
+ (0,jodit_core_decorators__WEBPACK_IMPORTED_MODULE_0__.watch)('state.sizeIsLocked')
35529
+ ], UIImagePropertiesForm.prototype, "onChangeSizeIsLocked", null);
35530
+ (0,tslib__WEBPACK_IMPORTED_MODULE_7__/* .__decorate */ .Cg)([
35531
+ (0,jodit_core_decorators__WEBPACK_IMPORTED_MODULE_0__.watch)('lockSize:click')
35532
+ ], UIImagePropertiesForm.prototype, "onLockSizeClick", null);
35533
+ (0,tslib__WEBPACK_IMPORTED_MODULE_7__/* .__decorate */ .Cg)([
35534
+ (0,jodit_core_decorators__WEBPACK_IMPORTED_MODULE_0__.hook)('ready'),
35535
+ (0,jodit_core_decorators__WEBPACK_IMPORTED_MODULE_0__.watch)(['state.values.imageWidth', 'state.values.imageHeight'])
35536
+ ], UIImagePropertiesForm.prototype, "onStateValuesSizeChange", null);
35537
+ (0,tslib__WEBPACK_IMPORTED_MODULE_7__/* .__decorate */ .Cg)([
35538
+ (0,jodit_core_decorators__WEBPACK_IMPORTED_MODULE_0__.watch)([
35539
+ 'imageWidth:change',
35540
+ 'imageHeight:change',
35541
+ 'imageWidth:keydown',
35542
+ 'imageHeight:keydown',
35543
+ 'imageWidth:mousedown',
35544
+ 'imageHeight:mousedown',
35545
+ 'imageWidth:paste',
35546
+ 'imageHeight:paste'
35547
+ ]),
35548
+ (0,jodit_core_decorators__WEBPACK_IMPORTED_MODULE_0__.debounce)()
35549
+ ], UIImagePropertiesForm.prototype, "onImageWidthChange", null);
35550
+ (0,tslib__WEBPACK_IMPORTED_MODULE_7__/* .__decorate */ .Cg)([
35551
+ (0,jodit_core_decorators__WEBPACK_IMPORTED_MODULE_0__.hook)('ready'),
35552
+ (0,jodit_core_decorators__WEBPACK_IMPORTED_MODULE_0__.watch)('state.values.imageSrc')
35553
+ ], UIImagePropertiesForm.prototype, "onStateValuesImageSrcChange", null);
35554
+ (0,tslib__WEBPACK_IMPORTED_MODULE_7__/* .__decorate */ .Cg)([
35555
+ (0,jodit_core_decorators__WEBPACK_IMPORTED_MODULE_0__.hook)('ready')
35556
+ ], UIImagePropertiesForm.prototype, "hideFieldByOptions", null);
35557
+ UIImagePropertiesForm = (0,tslib__WEBPACK_IMPORTED_MODULE_7__/* .__decorate */ .Cg)([
35558
+ jodit_core_decorators_component_component__WEBPACK_IMPORTED_MODULE_8__/* .component */ .s
35559
+ ], UIImagePropertiesForm);
35560
+ return UIImagePropertiesForm;
35561
+ }(jodit_core_ui_group_group__WEBPACK_IMPORTED_MODULE_2__/* .UIGroup */ .U));
35562
+
35563
+
35564
+
35565
+ /***/ }),
35566
+
35567
+ /***/ 26282:
35568
+ /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
35569
+
35570
+ "use strict";
35571
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, {
35572
+ /* harmony export */ k: function() { return /* binding */ UIImageMainTab; }
35573
+ /* harmony export */ });
35574
+ /* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(31635);
35575
+ /* harmony import */ var jodit_core_decorators_component_component__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(12222);
35576
+ /* harmony import */ var jodit_core_decorators_hook_hook__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(27582);
35577
+ /* harmony import */ var jodit_core_decorators_watch_watch__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(24014);
35578
+ /* harmony import */ var jodit_core_helpers__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(9596);
35579
+ /* harmony import */ var jodit_core_ui_group_group__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(1530);
35394
35580
  /*!
35395
35581
  * Jodit Editor (https://xdsoft.net/jodit/)
35396
35582
  * Released under MIT see LICENSE.txt in the project root for license information.
35397
35583
  * Copyright (c) 2013-2024 Valeriy Chupurnov. All rights reserved. https://xdsoft.net
35398
35584
  */
35399
35585
 
35400
- function positionTab(editor) {
35401
- var opt = editor.o, i18n = editor.i18n.bind(editor), gi = jodit_core_ui_icon__WEBPACK_IMPORTED_MODULE_0__/* .Icon */ .I.get.bind(jodit_core_ui_icon__WEBPACK_IMPORTED_MODULE_0__/* .Icon */ .I);
35402
- var classInput = [];
35403
- if (opt.image.availableClasses.length > 0) {
35404
- classInput.push('<select data-ref="classes" class="jodit-input jodit-select">');
35405
- opt.image.availableClasses.forEach(function (item) {
35406
- if (typeof item === 'string') {
35407
- classInput.push("<option value=\"".concat(item, "\">").concat(item, "</option>"));
35586
+
35587
+
35588
+
35589
+
35590
+
35591
+ /** @private */
35592
+ var UIImageMainTab = /** @class */ (function (_super) {
35593
+ (0,tslib__WEBPACK_IMPORTED_MODULE_4__/* .__extends */ .C6)(UIImageMainTab, _super);
35594
+ function UIImageMainTab(view, state, handlers) {
35595
+ var _this = _super.call(this, view) || this;
35596
+ _this.state = state;
35597
+ _this.handlers = handlers;
35598
+ return _this;
35599
+ }
35600
+ UIImageMainTab.prototype.className = function () {
35601
+ return 'UIImageMainTab';
35602
+ };
35603
+ UIImageMainTab.prototype.appendChildToContainer = function () {
35604
+ // Do nothing
35605
+ };
35606
+ UIImageMainTab.prototype.render = function () {
35607
+ return "<div class=\"jodit-form__group &__editSrc\">\n\t\t\t<label>~Src~</label>\n\t\t\t<div class=\"jodit-input_group\">\n\t\t\t\t<input class=\"jodit-input &__imageSrc\" type=\"text\"/>\n\t\t\t\t<div class=\"jodit-input_group-buttons &__fixImage\">\n\t\t\t\t\t\t<a class=\"jodit-button &__changeImage\">*image*</a>\n\t\t\t\t\t\t<a class=\"jodit-button &__editImage\">*crop*</a>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t</div>\n\t\t<div class=\"jodit-form__group &__editTitle\">\n\t\t\t<label>~Title~</label>\n\t\t\t<input type=\"text\" class=\"jodit-input &__imageTitle\"/>\n\t\t</div>\n\t\t<div class=\"jodit-form__group &__editAlt\">\n\t\t\t<label>~Alternative~</label>\n\t\t\t<input type=\"text\" class=\"jodit-input &__imageAlt\"/>\n\t\t</div>\n\t\t<div class=\"jodit-form__group &__editLink\">\n\t\t\t<label>~Link~</label>\n\t\t\t<input type=\"text\" class=\"jodit-input &__imageLink\"/>\n\t\t</div>\n\t\t<div class=\"jodit-form__group &__editLinkTarget\">\n\t\t\t<label class=\"jodit_vertical_middle\">\n\t\t\t\t<input type=\"checkbox\" class=\"jodit-checkbox &__imageLinkOpenInNewTab\"/>\n\t\t\t\t<span>~Open link in new tab~</span>\n\t\t\t</label>\n\t\t</div>";
35608
+ };
35609
+ UIImageMainTab.prototype.onStateImageSrcChange = function () {
35610
+ return (0,tslib__WEBPACK_IMPORTED_MODULE_4__/* .__awaiter */ .sH)(this, void 0, Promise, function () {
35611
+ var imageSrc;
35612
+ return (0,tslib__WEBPACK_IMPORTED_MODULE_4__/* .__generator */ .YH)(this, function (_a) {
35613
+ imageSrc = this.getElm('imageSrc');
35614
+ imageSrc.value = this.state.values.imageSrc;
35615
+ return [2 /*return*/];
35616
+ });
35617
+ });
35618
+ };
35619
+ UIImageMainTab.prototype.onImageSrcChange = function () {
35620
+ this.state.values.imageSrc = this.getElm('imageSrc').value;
35621
+ };
35622
+ /**
35623
+ * Open image editor
35624
+ */
35625
+ UIImageMainTab.prototype.onEditImageClick = function (e) {
35626
+ this.handlers.openImageEditor();
35627
+ e.stopPropagation();
35628
+ };
35629
+ /**
35630
+ * Open popup with filebrowser/uploader buttons for image
35631
+ */
35632
+ UIImageMainTab.prototype.onChangeImageClick = function (e) {
35633
+ this.handlers.openImagePopup(this.getElm('changeImage'));
35634
+ e.stopPropagation();
35635
+ };
35636
+ UIImageMainTab.prototype.onStateTitleChange = function () {
35637
+ var title = this.getElm('imageTitle');
35638
+ title.value = this.state.values.imageTitle;
35639
+ };
35640
+ UIImageMainTab.prototype.onTitleChange = function () {
35641
+ this.state.values.imageTitle = this.getElm('imageTitle').value;
35642
+ };
35643
+ UIImageMainTab.prototype.onStateAltChange = function () {
35644
+ var alt = this.getElm('imageAlt');
35645
+ alt.value = this.state.values.imageAlt;
35646
+ };
35647
+ UIImageMainTab.prototype.onAltChange = function () {
35648
+ this.state.values.imageAlt = this.getElm('imageAlt').value;
35649
+ };
35650
+ UIImageMainTab.prototype.onStateImageLinkChange = function () {
35651
+ var imageLink = this.getElm('imageLink');
35652
+ imageLink.value = this.state.values.imageLink;
35653
+ };
35654
+ UIImageMainTab.prototype.onImageLinkChange = function () {
35655
+ this.state.values.imageLink = this.getElm('imageLink').value;
35656
+ };
35657
+ UIImageMainTab.prototype.onStateImageLinkOpenInNewTabChange = function () {
35658
+ var imageLinkOpenInNewTab = this.getElm('imageLinkOpenInNewTab');
35659
+ imageLinkOpenInNewTab.checked = this.state.values.imageLinkOpenInNewTab;
35660
+ };
35661
+ UIImageMainTab.prototype.onImageLinkOpenInNewTabChange = function () {
35662
+ this.state.values.imageLinkOpenInNewTab = this.getElm('imageLinkOpenInNewTab').checked;
35663
+ };
35664
+ UIImageMainTab.prototype.hideFieldByOptions = function () {
35665
+ var _this = this;
35666
+ var o = this.j.o;
35667
+ var opt = o.image;
35668
+ [
35669
+ ['editSrc', 'editSrc'],
35670
+ ['editTitle', 'editTitle'],
35671
+ ['editAlt', 'editAlt'],
35672
+ ['editLink', 'editLink'],
35673
+ ['editLink', 'editLinkTarget'],
35674
+ ['useImageEditor', 'editImage']
35675
+ ].forEach(function (_a) {
35676
+ var _b = (0,tslib__WEBPACK_IMPORTED_MODULE_4__/* .__read */ .zs)(_a, 2), optKey = _b[0], elmKey = _b[1];
35677
+ var elm = _this.getElm(elmKey);
35678
+ (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_2__.css)(elm, 'display', opt[optKey] ? null : 'none');
35679
+ });
35680
+ var changeImage = this.getElm('changeImage');
35681
+ var needShowChangeImage = Boolean(o.filebrowser.ajax.url || o.uploader.url);
35682
+ (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_2__.css)(changeImage, 'display', needShowChangeImage ? null : 'none');
35683
+ var editImage = this.getElm('editImage');
35684
+ var needShowEditImage = Boolean(o.filebrowser.ajax.url) && opt.useImageEditor;
35685
+ (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_2__.css)(editImage, 'display', needShowEditImage ? null : 'none');
35686
+ var fixImage = this.getElm('fixImage');
35687
+ (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_2__.css)(fixImage, 'display', needShowChangeImage || needShowEditImage ? null : 'none');
35688
+ };
35689
+ (0,tslib__WEBPACK_IMPORTED_MODULE_4__/* .__decorate */ .Cg)([
35690
+ (0,jodit_core_decorators_watch_watch__WEBPACK_IMPORTED_MODULE_1__/* .watch */ .w)('state.values.imageSrc')
35691
+ ], UIImageMainTab.prototype, "onStateImageSrcChange", null);
35692
+ (0,tslib__WEBPACK_IMPORTED_MODULE_4__/* .__decorate */ .Cg)([
35693
+ (0,jodit_core_decorators_watch_watch__WEBPACK_IMPORTED_MODULE_1__/* .watch */ .w)('imageSrc:change')
35694
+ ], UIImageMainTab.prototype, "onImageSrcChange", null);
35695
+ (0,tslib__WEBPACK_IMPORTED_MODULE_4__/* .__decorate */ .Cg)([
35696
+ (0,jodit_core_decorators_watch_watch__WEBPACK_IMPORTED_MODULE_1__/* .watch */ .w)('editImage:click')
35697
+ ], UIImageMainTab.prototype, "onEditImageClick", null);
35698
+ (0,tslib__WEBPACK_IMPORTED_MODULE_4__/* .__decorate */ .Cg)([
35699
+ (0,jodit_core_decorators_watch_watch__WEBPACK_IMPORTED_MODULE_1__/* .watch */ .w)('changeImage:click')
35700
+ ], UIImageMainTab.prototype, "onChangeImageClick", null);
35701
+ (0,tslib__WEBPACK_IMPORTED_MODULE_4__/* .__decorate */ .Cg)([
35702
+ (0,jodit_core_decorators_watch_watch__WEBPACK_IMPORTED_MODULE_1__/* .watch */ .w)('state.values.imageTitle')
35703
+ ], UIImageMainTab.prototype, "onStateTitleChange", null);
35704
+ (0,tslib__WEBPACK_IMPORTED_MODULE_4__/* .__decorate */ .Cg)([
35705
+ (0,jodit_core_decorators_watch_watch__WEBPACK_IMPORTED_MODULE_1__/* .watch */ .w)('imageTitle:change')
35706
+ ], UIImageMainTab.prototype, "onTitleChange", null);
35707
+ (0,tslib__WEBPACK_IMPORTED_MODULE_4__/* .__decorate */ .Cg)([
35708
+ (0,jodit_core_decorators_watch_watch__WEBPACK_IMPORTED_MODULE_1__/* .watch */ .w)('state.values.imageAlt')
35709
+ ], UIImageMainTab.prototype, "onStateAltChange", null);
35710
+ (0,tslib__WEBPACK_IMPORTED_MODULE_4__/* .__decorate */ .Cg)([
35711
+ (0,jodit_core_decorators_watch_watch__WEBPACK_IMPORTED_MODULE_1__/* .watch */ .w)('imageAlt:change')
35712
+ ], UIImageMainTab.prototype, "onAltChange", null);
35713
+ (0,tslib__WEBPACK_IMPORTED_MODULE_4__/* .__decorate */ .Cg)([
35714
+ (0,jodit_core_decorators_watch_watch__WEBPACK_IMPORTED_MODULE_1__/* .watch */ .w)('state.values.imageLink')
35715
+ ], UIImageMainTab.prototype, "onStateImageLinkChange", null);
35716
+ (0,tslib__WEBPACK_IMPORTED_MODULE_4__/* .__decorate */ .Cg)([
35717
+ (0,jodit_core_decorators_watch_watch__WEBPACK_IMPORTED_MODULE_1__/* .watch */ .w)('imageLink:change')
35718
+ ], UIImageMainTab.prototype, "onImageLinkChange", null);
35719
+ (0,tslib__WEBPACK_IMPORTED_MODULE_4__/* .__decorate */ .Cg)([
35720
+ (0,jodit_core_decorators_watch_watch__WEBPACK_IMPORTED_MODULE_1__/* .watch */ .w)('state.values.imageLinkOpenInNewTab')
35721
+ ], UIImageMainTab.prototype, "onStateImageLinkOpenInNewTabChange", null);
35722
+ (0,tslib__WEBPACK_IMPORTED_MODULE_4__/* .__decorate */ .Cg)([
35723
+ (0,jodit_core_decorators_watch_watch__WEBPACK_IMPORTED_MODULE_1__/* .watch */ .w)('imageLinkOpenInNewTab:change')
35724
+ ], UIImageMainTab.prototype, "onImageLinkOpenInNewTabChange", null);
35725
+ (0,tslib__WEBPACK_IMPORTED_MODULE_4__/* .__decorate */ .Cg)([
35726
+ (0,jodit_core_decorators_hook_hook__WEBPACK_IMPORTED_MODULE_0__/* .hook */ .A)('ready')
35727
+ ], UIImageMainTab.prototype, "hideFieldByOptions", null);
35728
+ UIImageMainTab = (0,tslib__WEBPACK_IMPORTED_MODULE_4__/* .__decorate */ .Cg)([
35729
+ jodit_core_decorators_component_component__WEBPACK_IMPORTED_MODULE_5__/* .component */ .s
35730
+ ], UIImageMainTab);
35731
+ return UIImageMainTab;
35732
+ }(jodit_core_ui_group_group__WEBPACK_IMPORTED_MODULE_3__/* .UIGroup */ .U));
35733
+
35734
+
35735
+
35736
+ /***/ }),
35737
+
35738
+ /***/ 26180:
35739
+ /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
35740
+
35741
+ "use strict";
35742
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, {
35743
+ /* harmony export */ _: function() { return /* binding */ UIImagePositionTab; }
35744
+ /* harmony export */ });
35745
+ /* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(31635);
35746
+ /* harmony import */ var jodit_core_decorators_component_component__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(12222);
35747
+ /* harmony import */ var jodit_core_decorators_hook_hook__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(27582);
35748
+ /* harmony import */ var jodit_core_decorators_watch_watch__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(24014);
35749
+ /* harmony import */ var jodit_core_helpers__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(9596);
35750
+ /* harmony import */ var jodit_core_helpers_checker_is_string__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(26986);
35751
+ /* harmony import */ var jodit_core_helpers_utils_attr__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(97099);
35752
+ /* harmony import */ var jodit_core_ui_element__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(65685);
35753
+ /* harmony import */ var jodit_core_ui_icon__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(80004);
35754
+ /* harmony import */ var _utils_utils__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(10926);
35755
+ /*!
35756
+ * Jodit Editor (https://xdsoft.net/jodit/)
35757
+ * Released under MIT see LICENSE.txt in the project root for license information.
35758
+ * Copyright (c) 2013-2024 Valeriy Chupurnov. All rights reserved. https://xdsoft.net
35759
+ */
35760
+
35761
+
35762
+
35763
+
35764
+
35765
+
35766
+
35767
+
35768
+
35769
+
35770
+ /** @private */
35771
+ var UIImagePositionTab = /** @class */ (function (_super) {
35772
+ (0,tslib__WEBPACK_IMPORTED_MODULE_7__/* .__extends */ .C6)(UIImagePositionTab, _super);
35773
+ function UIImagePositionTab(jodit, state, handlers) {
35774
+ var _this = _super.call(this, jodit, {
35775
+ availableClasses: jodit.o.image.availableClasses
35776
+ }) || this;
35777
+ _this.state = state;
35778
+ _this.handlers = handlers;
35779
+ return _this;
35780
+ }
35781
+ UIImagePositionTab.prototype.className = function () {
35782
+ return 'UIImagePositionTab';
35783
+ };
35784
+ UIImagePositionTab.prototype.render = function (_a) {
35785
+ var availableClasses = _a.availableClasses;
35786
+ return "<div class=\"jodit-form__group &__editMargins\">\n\t\t\t<label>~Margins~</label>\n\t\t\t<div class=\"jodit-grid jodit_vertical_middle\">\n\t\t\t\t<input class=\"jodit_col-lg-1-5 jodit-input &__marginTop\" type=\"text\" placeholder=\"~top~\"/>\n\t\t\t\t<a style=\"text-align: center;\" class=\"jodit-properties__lock jodit_col-lg-1-5 &__lockMargin\">*lock*</a>\n\t\t\t\t<input disabled=\"disabled\" class=\"jodit_col-lg-1-5 jodit-input &__marginRight\" type=\"text\" placeholder=\"~right~\"/>\n\t\t\t\t<input disabled=\"disabled\" class=\"jodit_col-lg-1-5 jodit-input &__marginBottom\" type=\"text\" placeholder=\"~bottom~\"/>\n\t\t\t\t<input disabled=\"disabled\" class=\"jodit_col-lg-1-5 jodit-input &__marginLeft\" type=\"text\" placeholder=\"~left~\"/>\n\t\t\t</div>\n\t\t</div>\n\t\t<div class=\"jodit-form__group &__editAlign\">\n\t\t\t<label>~Align~</label>\n\t\t\t<select class=\"jodit-select &__align\">\n\t\t\t\t<option value=\"\">~--Not Set--~</option>\n\t\t\t\t<option value=\"left\">~Left~</option>\n\t\t\t\t<option value=\"center\">~Center~</option>\n\t\t\t\t<option value=\"right\">~Right~</option>\n\t\t\t</select>\n\t\t</div>\n\t\t<div class=\"jodit-form__group &__editStyle\">\n\t\t\t<label>~Styles~</label>\n\t\t\t<input type=\"text\" class=\"jodit-input &__style\"/>\n\t\t</div>\n\t\t<div class=\"jodit-form__group &__editClass\">\n\t\t\t<label>~Classes~</label>\n\t\t\t".concat((function () {
35787
+ var classInput = [];
35788
+ if (availableClasses && availableClasses.length > 0) {
35789
+ classInput.push('<select class="jodit-input jodit-select &__classes">');
35790
+ availableClasses.forEach(function (item) {
35791
+ if ((0,jodit_core_helpers_checker_is_string__WEBPACK_IMPORTED_MODULE_8__/* .isString */ .K)(item)) {
35792
+ classInput.push("<option value=\"".concat(item, "\">").concat(item, "</option>"));
35793
+ }
35794
+ else {
35795
+ classInput.push("<option value=\"".concat(item[0], "\">").concat(item[1], "</option>"));
35796
+ }
35797
+ });
35798
+ classInput.push('</select>');
35408
35799
  }
35409
35800
  else {
35410
- classInput.push("<option value=\"".concat(item[0], "\">").concat(item[1], "</option>"));
35801
+ classInput.push('<input type="text" class="jodit-input &__classes"/>');
35411
35802
  }
35803
+ return classInput.join('');
35804
+ })(), "\n\t\t</div>\n\t\t<div class=\"jodit-form__group &__editId\">\n\t\t\t<label>Id</label>\n\t\t\t<input type=\"text\" class=\"jodit-input &__id\"/>\n\t\t</div>\n\t\t<div\n\t\t\tclass=\"jodit-form__group &__editBorderRadius\"\n\t\t>\n\t\t\t<label>~Border radius~</label>\n\t\t\t<input type=\"number\" class=\"jodit-input &__borderRadius\"/>\n\t\t</div>");
35805
+ };
35806
+ UIImagePositionTab.prototype.onStateAlignChange = function () {
35807
+ var align = this.getElm('align');
35808
+ align.value = this.state.values.align;
35809
+ };
35810
+ UIImagePositionTab.prototype.onChangeAlign = function () {
35811
+ var align = this.getElm('align');
35812
+ this.state.values.align = align.value;
35813
+ };
35814
+ UIImagePositionTab.prototype.onStateValuesBorderRadiusChange = function () {
35815
+ var borderRadius = this.getElm('borderRadius');
35816
+ borderRadius.value = this.state.values.borderRadius.toString();
35817
+ };
35818
+ UIImagePositionTab.prototype.onChangeBorderRadius = function () {
35819
+ var borderRadius = this.getElm('borderRadius');
35820
+ this.state.values.borderRadius = parseFloat(borderRadius.value);
35821
+ };
35822
+ UIImagePositionTab.prototype.onStateValuesIdChange = function () {
35823
+ var id = this.getElm('id');
35824
+ id.value = this.state.values.id;
35825
+ };
35826
+ UIImagePositionTab.prototype.onChangeId = function () {
35827
+ var id = this.getElm('id');
35828
+ this.state.values.id = id.value;
35829
+ };
35830
+ UIImagePositionTab.prototype.onStateValuesStyleChange = function () {
35831
+ var style = this.getElm('style');
35832
+ style.value = this.state.values.style;
35833
+ };
35834
+ UIImagePositionTab.prototype.onChangeStyle = function () {
35835
+ var style = this.getElm('style');
35836
+ this.state.values.style = style.value;
35837
+ };
35838
+ UIImagePositionTab.prototype.onStateValuesClassesChange = function () {
35839
+ var classes = this.getElm('classes');
35840
+ classes.value = this.state.values.classes;
35841
+ };
35842
+ UIImagePositionTab.prototype.onChangClasses = function () {
35843
+ var classes = this.getElm('classes');
35844
+ this.state.values.classes = classes.value;
35845
+ };
35846
+ UIImagePositionTab.prototype.onLockMarginClick = function (e) {
35847
+ this.state.marginIsLocked = !this.state.marginIsLocked;
35848
+ e.preventDefault();
35849
+ };
35850
+ UIImagePositionTab.prototype.onChangeMarginIsLocked = function () {
35851
+ var _this = this;
35852
+ var marginBottom = this.getElm('marginBottom');
35853
+ var marginRight = this.getElm('marginRight');
35854
+ var marginLeft = this.getElm('marginLeft');
35855
+ var lockMargin = this.getElm('lockMargin');
35856
+ [marginRight, marginBottom, marginLeft].forEach(function (elm) {
35857
+ (0,jodit_core_helpers_utils_attr__WEBPACK_IMPORTED_MODULE_3__/* .attr */ .C)(elm, 'disabled', _this.state.marginIsLocked || null);
35858
+ });
35859
+ lockMargin.innerHTML = jodit_core_ui_icon__WEBPACK_IMPORTED_MODULE_5__/* .Icon */ .I.get(this.state.marginIsLocked ? 'lock' : 'unlock');
35860
+ if (this.state.marginIsLocked) {
35861
+ var marginTop = this.state.values.marginTop;
35862
+ this.state.values.marginRight = marginTop;
35863
+ this.state.values.marginBottom = marginTop;
35864
+ this.state.values.marginLeft = marginTop;
35865
+ }
35866
+ };
35867
+ UIImagePositionTab.prototype.onStateValuesMarginChange = function () {
35868
+ var marginTop = this.getElm('marginTop');
35869
+ var marginRight = this.getElm('marginRight');
35870
+ var marginBottom = this.getElm('marginBottom');
35871
+ var marginLeft = this.getElm('marginLeft');
35872
+ marginTop.value = this.state.values.marginTop.toString();
35873
+ marginRight.value = this.state.values.marginRight.toString();
35874
+ marginBottom.value = this.state.values.marginBottom.toString();
35875
+ marginLeft.value = this.state.values.marginLeft.toString();
35876
+ };
35877
+ UIImagePositionTab.prototype.onChangeMargin = function () {
35878
+ var marginTop = this.getElm('marginTop');
35879
+ var marginRight = this.getElm('marginRight');
35880
+ var marginBottom = this.getElm('marginBottom');
35881
+ var marginLeft = this.getElm('marginLeft');
35882
+ this.state.values.marginTop = (0,_utils_utils__WEBPACK_IMPORTED_MODULE_6__/* .normalSizeFromString */ .G)(marginTop.value);
35883
+ if (this.state.marginIsLocked) {
35884
+ this.state.values.marginRight = this.state.values.marginTop;
35885
+ this.state.values.marginBottom = this.state.values.marginTop;
35886
+ this.state.values.marginLeft = this.state.values.marginTop;
35887
+ }
35888
+ else {
35889
+ this.state.values.marginRight = (0,_utils_utils__WEBPACK_IMPORTED_MODULE_6__/* .normalSizeFromString */ .G)(marginRight.value);
35890
+ this.state.values.marginBottom = (0,_utils_utils__WEBPACK_IMPORTED_MODULE_6__/* .normalSizeFromString */ .G)(marginBottom.value);
35891
+ this.state.values.marginLeft = (0,_utils_utils__WEBPACK_IMPORTED_MODULE_6__/* .normalSizeFromString */ .G)(marginLeft.value);
35892
+ }
35893
+ };
35894
+ UIImagePositionTab.prototype.hideFieldByOptions = function () {
35895
+ var _this = this;
35896
+ var opt = this.j.o.image;
35897
+ [
35898
+ ['editMargins', 'editMargins'],
35899
+ ['editAlign', 'editAlign'],
35900
+ ['editStyle', 'editStyle'],
35901
+ ['editClass', 'editClass'],
35902
+ ['editId', 'editId'],
35903
+ ['editBorderRadius', 'editBorderRadius']
35904
+ ].forEach(function (_a) {
35905
+ var _b = (0,tslib__WEBPACK_IMPORTED_MODULE_7__/* .__read */ .zs)(_a, 2), optKey = _b[0], elmKey = _b[1];
35906
+ var elm = _this.getElm(elmKey);
35907
+ (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_2__.css)(elm, 'display', opt[optKey] ? null : 'none');
35908
+ });
35909
+ };
35910
+ (0,tslib__WEBPACK_IMPORTED_MODULE_7__/* .__decorate */ .Cg)([
35911
+ (0,jodit_core_decorators_hook_hook__WEBPACK_IMPORTED_MODULE_0__/* .hook */ .A)('ready'),
35912
+ (0,jodit_core_decorators_watch_watch__WEBPACK_IMPORTED_MODULE_1__/* .watch */ .w)('state.values.align')
35913
+ ], UIImagePositionTab.prototype, "onStateAlignChange", null);
35914
+ (0,tslib__WEBPACK_IMPORTED_MODULE_7__/* .__decorate */ .Cg)([
35915
+ (0,jodit_core_decorators_watch_watch__WEBPACK_IMPORTED_MODULE_1__/* .watch */ .w)('align:change')
35916
+ ], UIImagePositionTab.prototype, "onChangeAlign", null);
35917
+ (0,tslib__WEBPACK_IMPORTED_MODULE_7__/* .__decorate */ .Cg)([
35918
+ (0,jodit_core_decorators_hook_hook__WEBPACK_IMPORTED_MODULE_0__/* .hook */ .A)('ready'),
35919
+ (0,jodit_core_decorators_watch_watch__WEBPACK_IMPORTED_MODULE_1__/* .watch */ .w)('state.values.borderRadius')
35920
+ ], UIImagePositionTab.prototype, "onStateValuesBorderRadiusChange", null);
35921
+ (0,tslib__WEBPACK_IMPORTED_MODULE_7__/* .__decorate */ .Cg)([
35922
+ (0,jodit_core_decorators_watch_watch__WEBPACK_IMPORTED_MODULE_1__/* .watch */ .w)('borderRadius:change')
35923
+ ], UIImagePositionTab.prototype, "onChangeBorderRadius", null);
35924
+ (0,tslib__WEBPACK_IMPORTED_MODULE_7__/* .__decorate */ .Cg)([
35925
+ (0,jodit_core_decorators_hook_hook__WEBPACK_IMPORTED_MODULE_0__/* .hook */ .A)('ready'),
35926
+ (0,jodit_core_decorators_watch_watch__WEBPACK_IMPORTED_MODULE_1__/* .watch */ .w)('state.values.id')
35927
+ ], UIImagePositionTab.prototype, "onStateValuesIdChange", null);
35928
+ (0,tslib__WEBPACK_IMPORTED_MODULE_7__/* .__decorate */ .Cg)([
35929
+ (0,jodit_core_decorators_watch_watch__WEBPACK_IMPORTED_MODULE_1__/* .watch */ .w)('id:change')
35930
+ ], UIImagePositionTab.prototype, "onChangeId", null);
35931
+ (0,tslib__WEBPACK_IMPORTED_MODULE_7__/* .__decorate */ .Cg)([
35932
+ (0,jodit_core_decorators_hook_hook__WEBPACK_IMPORTED_MODULE_0__/* .hook */ .A)('ready'),
35933
+ (0,jodit_core_decorators_watch_watch__WEBPACK_IMPORTED_MODULE_1__/* .watch */ .w)('state.values.style')
35934
+ ], UIImagePositionTab.prototype, "onStateValuesStyleChange", null);
35935
+ (0,tslib__WEBPACK_IMPORTED_MODULE_7__/* .__decorate */ .Cg)([
35936
+ (0,jodit_core_decorators_watch_watch__WEBPACK_IMPORTED_MODULE_1__/* .watch */ .w)('style:change')
35937
+ ], UIImagePositionTab.prototype, "onChangeStyle", null);
35938
+ (0,tslib__WEBPACK_IMPORTED_MODULE_7__/* .__decorate */ .Cg)([
35939
+ (0,jodit_core_decorators_hook_hook__WEBPACK_IMPORTED_MODULE_0__/* .hook */ .A)('ready'),
35940
+ (0,jodit_core_decorators_watch_watch__WEBPACK_IMPORTED_MODULE_1__/* .watch */ .w)('state.values.classes')
35941
+ ], UIImagePositionTab.prototype, "onStateValuesClassesChange", null);
35942
+ (0,tslib__WEBPACK_IMPORTED_MODULE_7__/* .__decorate */ .Cg)([
35943
+ (0,jodit_core_decorators_watch_watch__WEBPACK_IMPORTED_MODULE_1__/* .watch */ .w)('classes:change')
35944
+ ], UIImagePositionTab.prototype, "onChangClasses", null);
35945
+ (0,tslib__WEBPACK_IMPORTED_MODULE_7__/* .__decorate */ .Cg)([
35946
+ (0,jodit_core_decorators_watch_watch__WEBPACK_IMPORTED_MODULE_1__/* .watch */ .w)('lockMargin:click')
35947
+ ], UIImagePositionTab.prototype, "onLockMarginClick", null);
35948
+ (0,tslib__WEBPACK_IMPORTED_MODULE_7__/* .__decorate */ .Cg)([
35949
+ (0,jodit_core_decorators_hook_hook__WEBPACK_IMPORTED_MODULE_0__/* .hook */ .A)('ready'),
35950
+ (0,jodit_core_decorators_watch_watch__WEBPACK_IMPORTED_MODULE_1__/* .watch */ .w)('state.marginIsLocked')
35951
+ ], UIImagePositionTab.prototype, "onChangeMarginIsLocked", null);
35952
+ (0,tslib__WEBPACK_IMPORTED_MODULE_7__/* .__decorate */ .Cg)([
35953
+ (0,jodit_core_decorators_hook_hook__WEBPACK_IMPORTED_MODULE_0__/* .hook */ .A)('ready'),
35954
+ (0,jodit_core_decorators_watch_watch__WEBPACK_IMPORTED_MODULE_1__/* .watch */ .w)([
35955
+ 'state.values.marginTop',
35956
+ 'state.values.marginRight',
35957
+ 'state.values.marginBottom',
35958
+ 'state.values.marginLeft'
35959
+ ])
35960
+ ], UIImagePositionTab.prototype, "onStateValuesMarginChange", null);
35961
+ (0,tslib__WEBPACK_IMPORTED_MODULE_7__/* .__decorate */ .Cg)([
35962
+ (0,jodit_core_decorators_watch_watch__WEBPACK_IMPORTED_MODULE_1__/* .watch */ .w)([
35963
+ 'marginTop:change',
35964
+ 'marginRight:change',
35965
+ 'marginBottom:change',
35966
+ 'marginLeft:change'
35967
+ ])
35968
+ ], UIImagePositionTab.prototype, "onChangeMargin", null);
35969
+ (0,tslib__WEBPACK_IMPORTED_MODULE_7__/* .__decorate */ .Cg)([
35970
+ (0,jodit_core_decorators_hook_hook__WEBPACK_IMPORTED_MODULE_0__/* .hook */ .A)('ready')
35971
+ ], UIImagePositionTab.prototype, "hideFieldByOptions", null);
35972
+ UIImagePositionTab = (0,tslib__WEBPACK_IMPORTED_MODULE_7__/* .__decorate */ .Cg)([
35973
+ jodit_core_decorators_component_component__WEBPACK_IMPORTED_MODULE_9__/* .component */ .s
35974
+ ], UIImagePositionTab);
35975
+ return UIImagePositionTab;
35976
+ }(jodit_core_ui_element__WEBPACK_IMPORTED_MODULE_4__/* .UIElement */ .D));
35977
+
35978
+
35979
+
35980
+ /***/ }),
35981
+
35982
+ /***/ 77137:
35983
+ /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
35984
+
35985
+ "use strict";
35986
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, {
35987
+ /* harmony export */ v: function() { return /* binding */ openImageEditorDialog; }
35988
+ /* harmony export */ });
35989
+ /* harmony import */ var jodit_core_helpers_checker_is_string__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(26986);
35990
+ /* harmony import */ var jodit_core_helpers_utils_attr__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(97099);
35991
+ /* harmony import */ var jodit_modules_image_editor_image_editor__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(60485);
35992
+ /*!
35993
+ * Jodit Editor (https://xdsoft.net/jodit/)
35994
+ * Released under MIT see LICENSE.txt in the project root for license information.
35995
+ * Copyright (c) 2013-2024 Valeriy Chupurnov. All rights reserved. https://xdsoft.net
35996
+ */
35997
+
35998
+
35999
+
36000
+ /**
36001
+ * Open image editor dialog
36002
+ * @private
36003
+ */
36004
+ function openImageEditorDialog(j, state) {
36005
+ var url = (0,jodit_core_helpers_utils_attr__WEBPACK_IMPORTED_MODULE_0__/* .attr */ .C)(state.image, 'src') || '', a = j.c.element('a'), loadExternal = function () {
36006
+ if (a.host !== location.host) {
36007
+ j.confirm('You can only edit your own images. Download this image on the host?', function (yes) {
36008
+ if (yes && j.uploader) {
36009
+ j.uploader.uploadRemoteImage(a.href.toString(), function (resp) {
36010
+ j.alert('The image has been successfully uploaded to the host!', function () {
36011
+ if ((0,jodit_core_helpers_checker_is_string__WEBPACK_IMPORTED_MODULE_2__/* .isString */ .K)(resp.newfilename)) {
36012
+ state.values.imageSrc =
36013
+ resp.baseurl +
36014
+ resp.newfilename;
36015
+ }
36016
+ });
36017
+ }, function (error) {
36018
+ j.alert('There was an error loading %s', error.message);
36019
+ });
36020
+ }
36021
+ });
36022
+ return;
36023
+ }
36024
+ };
36025
+ a.href = url;
36026
+ j.filebrowser.dataProvider
36027
+ .getPathByUrl(a.href.toString())
36028
+ .then(function (resp) {
36029
+ jodit_modules_image_editor_image_editor__WEBPACK_IMPORTED_MODULE_1__/* .openImageEditor */ .B.call(j.filebrowser, a.href, resp.name, resp.path, resp.source, function () {
36030
+ var timestamp = new Date().getTime();
36031
+ state.values.imageSrc =
36032
+ url +
36033
+ (url.indexOf('?') !== -1 ? '' : '?') +
36034
+ '&_tmp=' +
36035
+ timestamp.toString();
36036
+ }, function (error) {
36037
+ j.alert(error.message);
35412
36038
  });
35413
- classInput.push('</select>');
36039
+ })
36040
+ .catch(function (error) {
36041
+ j.alert(error.message, loadExternal);
36042
+ });
36043
+ }
36044
+
36045
+
36046
+ /***/ }),
36047
+
36048
+ /***/ 91852:
36049
+ /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
36050
+
36051
+ "use strict";
36052
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, {
36053
+ /* harmony export */ q: function() { return /* binding */ openImagePopup; }
36054
+ /* harmony export */ });
36055
+ /* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(31635);
36056
+ /* harmony import */ var jodit_core_helpers_checker_is_array__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(55010);
36057
+ /* harmony import */ var jodit_core_helpers_size_position__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(43977);
36058
+ /* harmony import */ var jodit_core_ui_popup_popup__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(34138);
36059
+ /* harmony import */ var jodit_modules_widget_file_selector_file_selector__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(31784);
36060
+ /*!
36061
+ * Jodit Editor (https://xdsoft.net/jodit/)
36062
+ * Released under MIT see LICENSE.txt in the project root for license information.
36063
+ * Copyright (c) 2013-2024 Valeriy Chupurnov. All rights reserved. https://xdsoft.net
36064
+ */
36065
+
36066
+
36067
+
36068
+
36069
+
36070
+ /** @private */
36071
+ function openImagePopup(j, dialog, state, button) {
36072
+ var _this = this;
36073
+ var popup = new jodit_core_ui_popup_popup__WEBPACK_IMPORTED_MODULE_0__/* .Popup */ .z(dialog);
36074
+ var closePopup = function () {
36075
+ popup.close();
36076
+ popup.destruct();
36077
+ };
36078
+ popup
36079
+ .setContent((0,jodit_modules_widget_file_selector_file_selector__WEBPACK_IMPORTED_MODULE_1__/* .FileSelectorWidget */ .k)(j, {
36080
+ upload: function (data) {
36081
+ if (data.files && data.files.length) {
36082
+ state.values.imageSrc =
36083
+ data.baseurl + data.files[0];
36084
+ }
36085
+ closePopup();
36086
+ },
36087
+ filebrowser: function (data) {
36088
+ return (0,tslib__WEBPACK_IMPORTED_MODULE_2__/* .__awaiter */ .sH)(_this, void 0, void 0, function () {
36089
+ return (0,tslib__WEBPACK_IMPORTED_MODULE_2__/* .__generator */ .YH)(this, function (_a) {
36090
+ if (data && (0,jodit_core_helpers_checker_is_array__WEBPACK_IMPORTED_MODULE_3__/* .isArray */ .c)(data.files) && data.files.length) {
36091
+ state.values.imageSrc = data.files[0];
36092
+ closePopup();
36093
+ }
36094
+ return [2 /*return*/];
36095
+ });
36096
+ });
36097
+ }
36098
+ }, state.image, closePopup))
36099
+ .open(function () { return (0,jodit_core_helpers_size_position__WEBPACK_IMPORTED_MODULE_4__/* .position */ .G)(button); });
36100
+ }
36101
+
36102
+
36103
+ /***/ }),
36104
+
36105
+ /***/ 10926:
36106
+ /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
36107
+
36108
+ "use strict";
36109
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, {
36110
+ /* harmony export */ G: function() { return /* binding */ normalSizeFromString; },
36111
+ /* harmony export */ n: function() { return /* binding */ normalSizeToString; }
36112
+ /* harmony export */ });
36113
+ /* harmony import */ var jodit_core_helpers_checker_is_number__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(72558);
36114
+ /* harmony import */ var jodit_core_helpers_string_trim__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(22718);
36115
+ /*!
36116
+ * Jodit Editor (https://xdsoft.net/jodit/)
36117
+ * Released under MIT see LICENSE.txt in the project root for license information.
36118
+ * Copyright (c) 2013-2024 Valeriy Chupurnov. All rights reserved. https://xdsoft.net
36119
+ */
36120
+
36121
+
36122
+ /** @private */
36123
+ var normalSizeFromString = function (value) {
36124
+ return /^[-+]?[0-9.]+(px)?$/.test(value.toString())
36125
+ ? parseFloat(value.toString())
36126
+ : value;
36127
+ };
36128
+ /** @private */
36129
+ var normalSizeToString = function (value) {
36130
+ if ((0,jodit_core_helpers_checker_is_number__WEBPACK_IMPORTED_MODULE_1__/* .isNumber */ .E)(value)) {
36131
+ return value ? value + 'px' : value.toString();
36132
+ }
36133
+ value = (0,jodit_core_helpers_string_trim__WEBPACK_IMPORTED_MODULE_0__/* .trim */ .Bq)(value);
36134
+ return /^[0-9]+$/.test(value) ? value + 'px' : value;
36135
+ };
36136
+
36137
+
36138
+ /***/ }),
36139
+
36140
+ /***/ 48570:
36141
+ /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
36142
+
36143
+ "use strict";
36144
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, {
36145
+ /* harmony export */ j: function() { return /* binding */ applyValuesToImage; }
36146
+ /* harmony export */ });
36147
+ /* harmony import */ var jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(23545);
36148
+ /* harmony import */ var jodit_core_helpers_utils__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(71122);
36149
+ /* harmony import */ var _link__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(9144);
36150
+ /* harmony import */ var _margin__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(82714);
36151
+ /* harmony import */ var _size__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(26277);
36152
+ /*!
36153
+ * Jodit Editor (https://xdsoft.net/jodit/)
36154
+ * Released under MIT see LICENSE.txt in the project root for license information.
36155
+ * Copyright (c) 2013-2024 Valeriy Chupurnov. All rights reserved. https://xdsoft.net
36156
+ */
36157
+
36158
+
36159
+
36160
+
36161
+
36162
+ /**
36163
+ * Apply form's values to image
36164
+ * @private
36165
+ */
36166
+ function applyValuesToImage(j, state, image) {
36167
+ var _a = state.values, style = _a.style, imageSrc = _a.imageSrc, borderRadius = _a.borderRadius, imageTitle = _a.imageTitle, imageAlt = _a.imageAlt, imageLink = _a.imageLink, imageWidth = _a.imageWidth, imageHeight = _a.imageHeight, marginTop = _a.marginTop, marginRight = _a.marginRight, marginBottom = _a.marginBottom, marginLeft = _a.marginLeft, imageLinkOpenInNewTab = _a.imageLinkOpenInNewTab, align = _a.align, classes = _a.classes, id = _a.id;
36168
+ var opt = j.o;
36169
+ // styles
36170
+ if (opt.image.editStyle) {
36171
+ (0,jodit_core_helpers_utils__WEBPACK_IMPORTED_MODULE_1__.attr)(image, 'style', style || null);
36172
+ }
36173
+ // Src
36174
+ if (imageSrc) {
36175
+ (0,jodit_core_helpers_utils__WEBPACK_IMPORTED_MODULE_1__.attr)(image, 'src', imageSrc);
36176
+ }
36177
+ else {
36178
+ jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_0__/* .Dom */ .J.safeRemove(image);
36179
+ return;
36180
+ }
36181
+ // Border radius
36182
+ image.style.borderRadius = borderRadius ? borderRadius + 'px' : '';
36183
+ // Title
36184
+ (0,jodit_core_helpers_utils__WEBPACK_IMPORTED_MODULE_1__.attr)(image, 'title', imageTitle || null);
36185
+ // Alt
36186
+ (0,jodit_core_helpers_utils__WEBPACK_IMPORTED_MODULE_1__.attr)(image, 'alt', imageAlt || null);
36187
+ // Link
36188
+ (0,_link__WEBPACK_IMPORTED_MODULE_2__/* .applyLink */ .j)(j, image, imageLink, imageLinkOpenInNewTab);
36189
+ // Size
36190
+ (0,_size__WEBPACK_IMPORTED_MODULE_4__/* .applySize */ .q)(image, imageWidth, imageHeight, state.sizeIsLocked);
36191
+ // Margin
36192
+ if (j.o.image.editMargins) {
36193
+ (0,_margin__WEBPACK_IMPORTED_MODULE_3__/* .applyMargin */ .N)(j, marginTop, marginRight, marginBottom, marginLeft, image, state.marginIsLocked);
36194
+ }
36195
+ if (opt.image.editClass) {
36196
+ (0,jodit_core_helpers_utils__WEBPACK_IMPORTED_MODULE_1__.attr)(image, 'class', classes || null);
36197
+ }
36198
+ if (opt.image.editId) {
36199
+ (0,jodit_core_helpers_utils__WEBPACK_IMPORTED_MODULE_1__.attr)(image, 'id', id || null);
36200
+ }
36201
+ if (opt.image.editAlign) {
36202
+ (0,jodit_core_helpers_utils__WEBPACK_IMPORTED_MODULE_1__.hAlignElement)(image, align);
36203
+ }
36204
+ }
36205
+
36206
+
36207
+ /***/ }),
36208
+
36209
+ /***/ 9144:
36210
+ /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
36211
+
36212
+ "use strict";
36213
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, {
36214
+ /* harmony export */ j: function() { return /* binding */ applyLink; }
36215
+ /* harmony export */ });
36216
+ /* harmony import */ var jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(23545);
36217
+ /* harmony import */ var jodit_core_helpers_utils_attr__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(97099);
36218
+ /*!
36219
+ * Jodit Editor (https://xdsoft.net/jodit/)
36220
+ * Released under MIT see LICENSE.txt in the project root for license information.
36221
+ * Copyright (c) 2013-2024 Valeriy Chupurnov. All rights reserved. https://xdsoft.net
36222
+ */
36223
+
36224
+
36225
+ /** @private */
36226
+ function applyLink(j, image, imageLink, imageLinkOpenInNewTab) {
36227
+ // Link
36228
+ var link = jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_0__/* .Dom */ .J.closest(image, 'a', j.editor);
36229
+ if (imageLink) {
36230
+ if (!link) {
36231
+ link = jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_0__/* .Dom */ .J.wrap(image, 'a', j.createInside);
36232
+ }
36233
+ (0,jodit_core_helpers_utils_attr__WEBPACK_IMPORTED_MODULE_1__/* .attr */ .C)(link, 'href', imageLink);
36234
+ (0,jodit_core_helpers_utils_attr__WEBPACK_IMPORTED_MODULE_1__/* .attr */ .C)(link, 'target', imageLinkOpenInNewTab ? '_blank' : null);
35414
36235
  }
35415
36236
  else {
35416
- classInput.push('<input data-ref="classes" type="text" class="jodit-input"/>');
36237
+ if (link && link.parentNode) {
36238
+ link.parentNode.replaceChild(image, link);
36239
+ }
36240
+ }
36241
+ }
36242
+
36243
+
36244
+ /***/ }),
36245
+
36246
+ /***/ 82714:
36247
+ /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
36248
+
36249
+ "use strict";
36250
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, {
36251
+ /* harmony export */ N: function() { return /* binding */ applyMargin; }
36252
+ /* harmony export */ });
36253
+ /* harmony import */ var jodit_core_helpers_utils_css__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(4401);
36254
+ /* harmony import */ var _utils_utils__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(10926);
36255
+ /*!
36256
+ * Jodit Editor (https://xdsoft.net/jodit/)
36257
+ * Released under MIT see LICENSE.txt in the project root for license information.
36258
+ * Copyright (c) 2013-2024 Valeriy Chupurnov. All rights reserved. https://xdsoft.net
36259
+ */
36260
+
36261
+
36262
+ /** @private */
36263
+ function applyMargin(j, marginTop, marginRight, marginBottom, marginLeft, image, marginIsLocked) {
36264
+ var margins = [marginTop, marginRight, marginBottom, marginLeft];
36265
+ var applyMargin = function (key, value) {
36266
+ var oldValue = (0,jodit_core_helpers_utils_css__WEBPACK_IMPORTED_MODULE_1__/* .css */ .A)(image, key);
36267
+ var v = (0,_utils_utils__WEBPACK_IMPORTED_MODULE_0__/* .normalSizeToString */ .n)(value);
36268
+ if (oldValue.toString() !== v.toString()) {
36269
+ (0,jodit_core_helpers_utils_css__WEBPACK_IMPORTED_MODULE_1__/* .css */ .A)(image, key, v);
36270
+ }
36271
+ };
36272
+ if (!marginIsLocked) {
36273
+ var sides_1 = [
36274
+ 'margin-top',
36275
+ 'margin-right',
36276
+ 'margin-bottom',
36277
+ 'margin-left'
36278
+ ];
36279
+ margins.forEach(function (margin, index) {
36280
+ var side = sides_1[index];
36281
+ applyMargin(side, margin);
36282
+ });
36283
+ }
36284
+ else {
36285
+ applyMargin('margin', marginTop);
36286
+ }
36287
+ }
36288
+
36289
+
36290
+ /***/ }),
36291
+
36292
+ /***/ 26277:
36293
+ /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
36294
+
36295
+ "use strict";
36296
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, {
36297
+ /* harmony export */ q: function() { return /* binding */ applySize; }
36298
+ /* harmony export */ });
36299
+ /* harmony import */ var jodit_core_helpers_utils_attr__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(97099);
36300
+ /* harmony import */ var jodit_core_helpers_utils_css__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(4401);
36301
+ /* harmony import */ var _utils_utils__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(10926);
36302
+ /*!
36303
+ * Jodit Editor (https://xdsoft.net/jodit/)
36304
+ * Released under MIT see LICENSE.txt in the project root for license information.
36305
+ * Copyright (c) 2013-2024 Valeriy Chupurnov. All rights reserved. https://xdsoft.net
36306
+ */
36307
+
36308
+
36309
+
36310
+ /** @private */
36311
+ function applySize(image, imageWidth, imageHeight, sizeIsLocked) {
36312
+ // Size
36313
+ if (imageWidth !== image.offsetWidth ||
36314
+ imageHeight !== image.offsetHeight) {
36315
+ var updatedWidth = imageWidth ? (0,_utils_utils__WEBPACK_IMPORTED_MODULE_1__/* .normalSizeToString */ .n)(imageWidth) : null;
36316
+ var updatedHeight = imageHeight
36317
+ ? (0,_utils_utils__WEBPACK_IMPORTED_MODULE_1__/* .normalSizeToString */ .n)(imageHeight)
36318
+ : null;
36319
+ (0,jodit_core_helpers_utils_css__WEBPACK_IMPORTED_MODULE_2__/* .css */ .A)(image, {
36320
+ width: updatedWidth,
36321
+ height: updatedWidth && sizeIsLocked ? null : updatedHeight
36322
+ });
36323
+ (0,jodit_core_helpers_utils_attr__WEBPACK_IMPORTED_MODULE_0__/* .attr */ .C)(image, 'width', (0,jodit_core_helpers_utils_attr__WEBPACK_IMPORTED_MODULE_0__/* .attr */ .C)(image, 'width') ? updatedWidth : null);
36324
+ if (!(0,jodit_core_helpers_utils_attr__WEBPACK_IMPORTED_MODULE_0__/* .attr */ .C)(image, 'width') || sizeIsLocked) {
36325
+ updatedHeight = null;
36326
+ }
36327
+ (0,jodit_core_helpers_utils_attr__WEBPACK_IMPORTED_MODULE_0__/* .attr */ .C)(image, 'height', updatedHeight);
35417
36328
  }
35418
- return editor.c.fromHTML("<div style=\"".concat(!opt.image.editMargins ? 'display:none' : '', "\" class=\"jodit-form__group\">\n\t\t\t<label>").concat(i18n('Margins'), "</label>\n\t\t\t<div class=\"jodit-grid jodit_vertical_middle\">\n\t\t\t\t<input class=\"jodit_col-lg-1-5 jodit-input\" data-ref=\"marginTop\" type=\"text\" placeholder=\"").concat(i18n('top'), "\"/>\n\t\t\t\t<a style=\"text-align: center;\" data-ref=\"lockMargin\" class=\"jodit-properties__lock jodit_col-lg-1-5\">").concat(gi('lock'), "</a>\n\t\t\t\t<input disabled=\"true\" class=\"jodit_col-lg-1-5 jodit-input\" data-ref=\"marginRight\" type=\"text\" placeholder=\"").concat(i18n('right'), "\"/>\n\t\t\t\t<input disabled=\"true\" class=\"jodit_col-lg-1-5 jodit-input\" data-ref=\"marginBottom\" type=\"text\" placeholder=\"").concat(i18n('bottom'), "\"/>\n\t\t\t\t<input disabled=\"true\" class=\"jodit_col-lg-1-5 jodit-input\" data-ref=\"marginLeft\" type=\"text\" placeholder=\"").concat(i18n('left'), "\"/>\n\t\t\t</div>\n\t\t</div>\n\t\t<div\n\t\t\tstyle=\"").concat(!opt.image.editAlign ? 'display:none' : '', "\"\n\t\t\tclass=\"jodit-form__group\"\n\t\t>\n\t\t\t<label>").concat(i18n('Align'), "</label>\n\t\t\t<select data-ref=\"align\" class=\"jodit-select\">\n\t\t\t\t<option value=\"\">").concat(i18n('--Not Set--'), "</option>\n\t\t\t\t<option value=\"left\">").concat(i18n('Left'), "</option>\n\t\t\t\t<option value=\"center\">").concat(i18n('Center'), "</option>\n\t\t\t\t<option value=\"right\">").concat(i18n('Right'), "</option>\n\t\t\t</select>\n\t\t</div>\n\t\t<div style=\"").concat(!opt.image.editStyle ? 'display:none' : '', "\" class=\"jodit-form__group\">\n\t\t\t<label>").concat(i18n('Styles'), "</label>\n\t\t\t<input data-ref=\"style\" type=\"text\" class=\"jodit-input\"/>\n\t\t</div>\n\t\t<div style=\"").concat(!opt.image.editClass ? 'display:none' : '', "\" class=\"jodit-form__group\">\n\t\t\t<label>").concat(i18n('Classes'), "</label>\n\t\t\t").concat(classInput.join(''), "\n\t\t</div>\n\t\t<div style=\"").concat(!opt.image.editId ? 'display:none' : '', "\" class=\"jodit-form__group\">\n\t\t\t<label>Id</label>\n\t\t\t<input data-ref=\"id\" type=\"text\" class=\"jodit-input\"/>\n\t\t</div>\n\t\t<div\n\t\t\tstyle=\"").concat(!opt.image.editBorderRadius ? 'display:none' : '', "\"\n\t\t\tclass=\"jodit-form__group\"\n\t\t>\n\t\t\t<label>").concat(i18n('Border radius'), "</label>\n\t\t\t\t<input data-ref=\"borderRadius\" type=\"number\" class=\"jodit-input\"/>\n\t\t</div>"));
35419
36329
  }
35420
36330
 
35421
36331
 
@@ -42138,7 +43048,8 @@ jodit_core_global__WEBPACK_IMPORTED_MODULE_3__/* .pluginSystem */ .fg.add('selec
42138
43048
  */
42139
43049
 
42140
43050
  jodit_config__WEBPACK_IMPORTED_MODULE_0__/* .Config */ .T.prototype.select = {
42141
- normalizeSelectionBeforeCutAndCopy: false
43051
+ normalizeSelectionBeforeCutAndCopy: false,
43052
+ normalizeTripleClick: true
42142
43053
  };
42143
43054
 
42144
43055
 
@@ -42218,7 +43129,7 @@ var select = /** @class */ (function (_super) {
42218
43129
  }
42219
43130
  };
42220
43131
  /**
42221
- * @event outsideClick(e) - when user clicked in the outside of editor
43132
+ * @event outsideClick(e) - when user clicked on the outside of editor
42222
43133
  */
42223
43134
  select.prototype.onOutsideClick = function (e) {
42224
43135
  var _this = this;
@@ -42231,7 +43142,7 @@ var select = /** @class */ (function (_super) {
42231
43142
  this.j.e.fire('outsideClick', e);
42232
43143
  }
42233
43144
  };
42234
- select.prototype.beforeCommandCut = function (command) {
43145
+ select.prototype.beforeCommandCut = function () {
42235
43146
  var s = this.j.s;
42236
43147
  if (!s.isCollapsed()) {
42237
43148
  var current = s.current();
@@ -42240,13 +43151,27 @@ var select = /** @class */ (function (_super) {
42240
43151
  }
42241
43152
  }
42242
43153
  };
42243
- select.prototype.beforeCommandSelectall = function (command) {
43154
+ select.prototype.beforeCommandSelectAll = function () {
42244
43155
  var s = this.j.s;
42245
43156
  s.focus();
42246
43157
  s.select(this.j.editor, true);
42247
43158
  s.expandSelection();
42248
43159
  return false;
42249
43160
  };
43161
+ /**
43162
+ * Normalize selection after triple click
43163
+ */
43164
+ select.prototype.onTripleClickNormalizeSelection = function (e) {
43165
+ if (e.detail !== 3 || !this.j.o.select.normalizeTripleClick) {
43166
+ return;
43167
+ }
43168
+ var s = this.j.s;
43169
+ var _a = s.range, startContainer = _a.startContainer, startOffset = _a.startOffset;
43170
+ if (startOffset === 0 && jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_1__/* .Dom */ .J.isText(startContainer)) {
43171
+ s.select(jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_1__/* .Dom */ .J.closest(startContainer, jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_1__/* .Dom */ .J.isBlock, this.j.editor) ||
43172
+ startContainer, true);
43173
+ }
43174
+ };
42250
43175
  select.prototype.onCopyNormalizeSelectionBound = function (e) {
42251
43176
  var _a = this.j, s = _a.s, editor = _a.editor, o = _a.o;
42252
43177
  if (!o.select.normalizeSelectionBeforeCutAndCopy || s.isCollapsed()) {
@@ -42271,7 +43196,10 @@ var select = /** @class */ (function (_super) {
42271
43196
  ], select.prototype, "beforeCommandCut", null);
42272
43197
  (0,tslib__WEBPACK_IMPORTED_MODULE_6__/* .__decorate */ .Cg)([
42273
43198
  (0,jodit_core_decorators__WEBPACK_IMPORTED_MODULE_0__.watch)([':beforeCommandSelectall'])
42274
- ], select.prototype, "beforeCommandSelectall", null);
43199
+ ], select.prototype, "beforeCommandSelectAll", null);
43200
+ (0,tslib__WEBPACK_IMPORTED_MODULE_6__/* .__decorate */ .Cg)([
43201
+ (0,jodit_core_decorators__WEBPACK_IMPORTED_MODULE_0__.watch)([':click'])
43202
+ ], select.prototype, "onTripleClickNormalizeSelection", null);
42275
43203
  (0,tslib__WEBPACK_IMPORTED_MODULE_6__/* .__decorate */ .Cg)([
42276
43204
  (0,jodit_core_decorators__WEBPACK_IMPORTED_MODULE_0__.watch)([':copy', ':cut'])
42277
43205
  ], select.prototype, "onCopyNormalizeSelectionBound", null);
@@ -51273,10 +52201,10 @@ var defineGlobalProperty = __webpack_require__(35596);
51273
52201
  var SHARED = '__core-js_shared__';
51274
52202
  var store = module.exports = globalThis[SHARED] || defineGlobalProperty(SHARED, {});
51275
52203
  (store.versions || (store.versions = [])).push({
51276
- version: '3.36.1',
52204
+ version: '3.37.0',
51277
52205
  mode: IS_PURE ? 'pure' : 'global',
51278
52206
  copyright: '© 2014-2024 Denis Pushkarev (zloirock.ru)',
51279
- license: 'https://github.com/zloirock/core-js/blob/v3.36.1/LICENSE',
52207
+ license: 'https://github.com/zloirock/core-js/blob/v3.37.0/LICENSE',
51280
52208
  source: 'https://github.com/zloirock/core-js'
51281
52209
  });
51282
52210