jodit-pro 1.3.39 → 2.0.0-beta.10

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 (455) hide show
  1. package/.nvmrc +1 -0
  2. package/CHANGELOG.md +982 -0
  3. package/LICENSE.txt +1 -0
  4. package/README.md +27 -27
  5. package/SECURITY.md +10 -0
  6. package/es2015/jodit.css +4945 -0
  7. package/es2015/jodit.fat.min.css +1 -0
  8. package/es2015/jodit.fat.min.js +10 -0
  9. package/es2015/jodit.js +42706 -0
  10. package/es2015/jodit.min.css +1 -0
  11. package/es2015/jodit.min.js +10 -0
  12. package/es2015/plugins/autocomplete/autocomplete.css +26 -0
  13. package/es2015/plugins/autocomplete/autocomplete.js +473 -0
  14. package/es2015/plugins/autocomplete/autocomplete.min.js +10 -0
  15. package/es2015/plugins/backup/backup.css +48 -0
  16. package/es2015/plugins/backup/backup.js +567 -0
  17. package/{build/plugins/backup/backup.css → es2015/plugins/backup/backup.min.css} +1 -1
  18. package/es2015/plugins/backup/backup.min.js +10 -0
  19. package/es2015/plugins/button-generator/button-generator.css +316 -0
  20. package/es2015/plugins/button-generator/button-generator.js +1363 -0
  21. package/es2015/plugins/button-generator/button-generator.min.css +1 -0
  22. package/es2015/plugins/button-generator/button-generator.min.js +10 -0
  23. package/es2015/plugins/change-case/change-case.js +171 -0
  24. package/es2015/plugins/change-case/change-case.min.js +10 -0
  25. package/es2015/plugins/color-picker/color-picker.css +133 -0
  26. package/es2015/plugins/color-picker/color-picker.js +519 -0
  27. package/es2015/plugins/color-picker/color-picker.min.css +1 -0
  28. package/es2015/plugins/color-picker/color-picker.min.js +10 -0
  29. package/es2015/plugins/emoji/emoji.css +108 -0
  30. package/es2015/plugins/emoji/emoji.js +421 -0
  31. package/es2015/plugins/emoji/emoji.min.css +1 -0
  32. package/es2015/plugins/emoji/emoji.min.js +10 -0
  33. package/es2015/plugins/export-docs/export-docs.js +153 -0
  34. package/es2015/plugins/export-docs/export-docs.min.js +10 -0
  35. package/es2015/plugins/finder/finder.css +1342 -0
  36. package/es2015/plugins/finder/finder.js +3175 -0
  37. package/es2015/plugins/finder/finder.min.css +1 -0
  38. package/es2015/plugins/finder/finder.min.js +10 -0
  39. package/es2015/plugins/google-maps/google-maps.css +397 -0
  40. package/es2015/plugins/google-maps/google-maps.js +2492 -0
  41. package/es2015/plugins/google-maps/google-maps.min.css +1 -0
  42. package/es2015/plugins/google-maps/google-maps.min.js +10 -0
  43. package/es2015/plugins/google-search/google-search.js +108 -0
  44. package/es2015/plugins/google-search/google-search.min.js +10 -0
  45. package/es2015/plugins/highlight-signature/highlight-signature.js +233 -0
  46. package/es2015/plugins/highlight-signature/highlight-signature.min.js +10 -0
  47. package/es2015/plugins/iframe-editor/iframe-editor.css +16 -0
  48. package/es2015/plugins/iframe-editor/iframe-editor.js +310 -0
  49. package/es2015/plugins/iframe-editor/iframe-editor.min.js +10 -0
  50. package/es2015/plugins/keyboard/keyboard.css +48 -0
  51. package/es2015/plugins/keyboard/keyboard.js +539 -0
  52. package/es2015/plugins/keyboard/keyboard.min.js +10 -0
  53. package/es2015/plugins/mobile-view/mobile-view.js +170 -0
  54. package/es2015/plugins/mobile-view/mobile-view.min.js +10 -0
  55. package/es2015/plugins/page-break/page-break.js +181 -0
  56. package/es2015/plugins/page-break/page-break.min.js +10 -0
  57. package/es2015/plugins/paste-code/paste-code.css +21 -0
  58. package/es2015/plugins/paste-code/paste-code.js +320 -0
  59. package/es2015/plugins/paste-code/paste-code.min.js +10 -0
  60. package/es2015/plugins/paste-from-word/paste-from-word.js +1541 -0
  61. package/es2015/plugins/paste-from-word/paste-from-word.min.js +10 -0
  62. package/es2015/plugins/show-blocks/show-blocks.js +645 -0
  63. package/es2015/plugins/show-blocks/show-blocks.min.js +10 -0
  64. package/es2015/plugins/todo-list/todo-list.css +77 -0
  65. package/es2015/plugins/todo-list/todo-list.js +314 -0
  66. package/es2015/plugins/todo-list/todo-list.min.css +1 -0
  67. package/es2015/plugins/todo-list/todo-list.min.js +10 -0
  68. package/es2015/plugins/translate/translate.css +91 -0
  69. package/es2015/plugins/translate/translate.js +630 -0
  70. package/es2015/plugins/translate/translate.min.js +10 -0
  71. package/es2015/plugins/tune-block/tune-block.css +37 -0
  72. package/es2015/plugins/tune-block/tune-block.js +387 -0
  73. package/{build/plugins/tune-block/tune-block.css → es2015/plugins/tune-block/tune-block.min.css} +1 -1
  74. package/es2015/plugins/tune-block/tune-block.min.js +10 -0
  75. package/es2018/jodit.css +4945 -0
  76. package/es2018/jodit.fat.min.css +1 -0
  77. package/es2018/jodit.fat.min.js +10 -0
  78. package/es2018/jodit.js +42762 -0
  79. package/es2018/jodit.min.css +1 -0
  80. package/es2018/jodit.min.js +10 -0
  81. package/es2018/plugins/autocomplete/autocomplete.css +26 -0
  82. package/es2018/plugins/autocomplete/autocomplete.js +471 -0
  83. package/es2018/plugins/autocomplete/autocomplete.min.js +10 -0
  84. package/es2018/plugins/backup/backup.css +48 -0
  85. package/es2018/plugins/backup/backup.js +561 -0
  86. package/{build/plugins/backup/backup.es5.css → es2018/plugins/backup/backup.min.css} +1 -1
  87. package/es2018/plugins/backup/backup.min.js +10 -0
  88. package/es2018/plugins/button-generator/button-generator.css +316 -0
  89. package/es2018/plugins/button-generator/button-generator.js +1387 -0
  90. package/es2018/plugins/button-generator/button-generator.min.css +1 -0
  91. package/es2018/plugins/button-generator/button-generator.min.js +10 -0
  92. package/es2018/plugins/change-case/change-case.js +171 -0
  93. package/es2018/plugins/change-case/change-case.min.js +10 -0
  94. package/es2018/plugins/color-picker/color-picker.css +133 -0
  95. package/es2018/plugins/color-picker/color-picker.js +519 -0
  96. package/es2018/plugins/color-picker/color-picker.min.css +1 -0
  97. package/es2018/plugins/color-picker/color-picker.min.js +10 -0
  98. package/es2018/plugins/emoji/emoji.css +108 -0
  99. package/es2018/plugins/emoji/emoji.js +425 -0
  100. package/es2018/plugins/emoji/emoji.min.css +1 -0
  101. package/es2018/plugins/emoji/emoji.min.js +10 -0
  102. package/es2018/plugins/export-docs/export-docs.js +157 -0
  103. package/es2018/plugins/export-docs/export-docs.min.js +10 -0
  104. package/es2018/plugins/finder/finder.css +1342 -0
  105. package/es2018/plugins/finder/finder.js +3160 -0
  106. package/es2018/plugins/finder/finder.min.css +1 -0
  107. package/es2018/plugins/finder/finder.min.js +10 -0
  108. package/es2018/plugins/google-maps/google-maps.css +397 -0
  109. package/es2018/plugins/google-maps/google-maps.js +2556 -0
  110. package/es2018/plugins/google-maps/google-maps.min.css +1 -0
  111. package/es2018/plugins/google-maps/google-maps.min.js +10 -0
  112. package/es2018/plugins/google-search/google-search.js +108 -0
  113. package/es2018/plugins/google-search/google-search.min.js +10 -0
  114. package/es2018/plugins/highlight-signature/highlight-signature.js +233 -0
  115. package/es2018/plugins/highlight-signature/highlight-signature.min.js +10 -0
  116. package/es2018/plugins/iframe-editor/iframe-editor.css +16 -0
  117. package/es2018/plugins/iframe-editor/iframe-editor.js +310 -0
  118. package/es2018/plugins/iframe-editor/iframe-editor.min.js +10 -0
  119. package/es2018/plugins/keyboard/keyboard.css +48 -0
  120. package/es2018/plugins/keyboard/keyboard.js +539 -0
  121. package/es2018/plugins/keyboard/keyboard.min.js +10 -0
  122. package/es2018/plugins/mobile-view/mobile-view.js +170 -0
  123. package/es2018/plugins/mobile-view/mobile-view.min.js +10 -0
  124. package/es2018/plugins/page-break/page-break.js +181 -0
  125. package/es2018/plugins/page-break/page-break.min.js +10 -0
  126. package/es2018/plugins/paste-code/paste-code.css +21 -0
  127. package/es2018/plugins/paste-code/paste-code.js +318 -0
  128. package/es2018/plugins/paste-code/paste-code.min.js +10 -0
  129. package/es2018/plugins/paste-from-word/paste-from-word.js +1541 -0
  130. package/es2018/plugins/paste-from-word/paste-from-word.min.js +10 -0
  131. package/es2018/plugins/show-blocks/show-blocks.js +645 -0
  132. package/es2018/plugins/show-blocks/show-blocks.min.js +10 -0
  133. package/es2018/plugins/todo-list/todo-list.css +77 -0
  134. package/es2018/plugins/todo-list/todo-list.js +314 -0
  135. package/es2018/plugins/todo-list/todo-list.min.css +1 -0
  136. package/es2018/plugins/todo-list/todo-list.min.js +10 -0
  137. package/es2018/plugins/translate/translate.css +91 -0
  138. package/es2018/plugins/translate/translate.js +639 -0
  139. package/es2018/plugins/translate/translate.min.js +10 -0
  140. package/es2018/plugins/tune-block/tune-block.css +37 -0
  141. package/es2018/plugins/tune-block/tune-block.js +387 -0
  142. package/{build/plugins/tune-block/tune-block.es5.css → es2018/plugins/tune-block/tune-block.min.css} +1 -1
  143. package/es2018/plugins/tune-block/tune-block.min.js +10 -0
  144. package/es2021/jodit.css +4945 -0
  145. package/es2021/jodit.fat.min.css +1 -0
  146. package/es2021/jodit.fat.min.js +10 -0
  147. package/es2021/jodit.js +42643 -0
  148. package/es2021/jodit.min.css +1 -0
  149. package/es2021/jodit.min.js +10 -0
  150. package/es2021/plugins/autocomplete/autocomplete.css +26 -0
  151. package/es2021/plugins/autocomplete/autocomplete.js +463 -0
  152. package/es2021/plugins/autocomplete/autocomplete.min.css +1 -0
  153. package/es2021/plugins/autocomplete/autocomplete.min.js +10 -0
  154. package/es2021/plugins/backup/backup.css +48 -0
  155. package/es2021/plugins/backup/backup.js +554 -0
  156. package/es2021/plugins/backup/backup.min.css +1 -0
  157. package/es2021/plugins/backup/backup.min.js +10 -0
  158. package/es2021/plugins/button-generator/button-generator.css +316 -0
  159. package/es2021/plugins/button-generator/button-generator.js +1382 -0
  160. package/es2021/plugins/button-generator/button-generator.min.css +1 -0
  161. package/es2021/plugins/button-generator/button-generator.min.js +10 -0
  162. package/es2021/plugins/change-case/change-case.js +171 -0
  163. package/es2021/plugins/change-case/change-case.min.js +10 -0
  164. package/es2021/plugins/color-picker/color-picker.css +133 -0
  165. package/es2021/plugins/color-picker/color-picker.js +517 -0
  166. package/es2021/plugins/color-picker/color-picker.min.css +1 -0
  167. package/es2021/plugins/color-picker/color-picker.min.js +10 -0
  168. package/es2021/plugins/emoji/emoji.css +108 -0
  169. package/es2021/plugins/emoji/emoji.js +425 -0
  170. package/es2021/plugins/emoji/emoji.min.css +1 -0
  171. package/es2021/plugins/emoji/emoji.min.js +10 -0
  172. package/es2021/plugins/export-docs/export-docs.js +156 -0
  173. package/es2021/plugins/export-docs/export-docs.min.js +10 -0
  174. package/es2021/plugins/finder/finder.css +1342 -0
  175. package/es2021/plugins/finder/finder.js +3152 -0
  176. package/es2021/plugins/finder/finder.min.css +1 -0
  177. package/es2021/plugins/finder/finder.min.js +10 -0
  178. package/es2021/plugins/google-maps/google-maps.css +397 -0
  179. package/es2021/plugins/google-maps/google-maps.js +2540 -0
  180. package/es2021/plugins/google-maps/google-maps.min.css +1 -0
  181. package/es2021/plugins/google-maps/google-maps.min.js +10 -0
  182. package/es2021/plugins/google-search/google-search.js +107 -0
  183. package/es2021/plugins/google-search/google-search.min.js +10 -0
  184. package/es2021/plugins/highlight-signature/highlight-signature.js +231 -0
  185. package/es2021/plugins/highlight-signature/highlight-signature.min.js +10 -0
  186. package/es2021/plugins/iframe-editor/iframe-editor.css +16 -0
  187. package/es2021/plugins/iframe-editor/iframe-editor.js +308 -0
  188. package/es2021/plugins/iframe-editor/iframe-editor.min.css +1 -0
  189. package/es2021/plugins/iframe-editor/iframe-editor.min.js +10 -0
  190. package/es2021/plugins/keyboard/keyboard.css +48 -0
  191. package/es2021/plugins/keyboard/keyboard.js +537 -0
  192. package/es2021/plugins/keyboard/keyboard.min.css +1 -0
  193. package/es2021/plugins/keyboard/keyboard.min.js +10 -0
  194. package/es2021/plugins/mobile-view/mobile-view.js +168 -0
  195. package/es2021/plugins/mobile-view/mobile-view.min.js +10 -0
  196. package/es2021/plugins/page-break/page-break.js +181 -0
  197. package/es2021/plugins/page-break/page-break.min.js +10 -0
  198. package/es2021/plugins/paste-code/paste-code.css +21 -0
  199. package/es2021/plugins/paste-code/paste-code.js +318 -0
  200. package/es2021/plugins/paste-code/paste-code.min.css +1 -0
  201. package/es2021/plugins/paste-code/paste-code.min.js +10 -0
  202. package/es2021/plugins/paste-from-word/paste-from-word.js +1528 -0
  203. package/es2021/plugins/paste-from-word/paste-from-word.min.js +10 -0
  204. package/es2021/plugins/show-blocks/show-blocks.js +645 -0
  205. package/es2021/plugins/show-blocks/show-blocks.min.js +10 -0
  206. package/es2021/plugins/todo-list/todo-list.css +77 -0
  207. package/es2021/plugins/todo-list/todo-list.js +313 -0
  208. package/es2021/plugins/todo-list/todo-list.min.css +1 -0
  209. package/es2021/plugins/todo-list/todo-list.min.js +10 -0
  210. package/es2021/plugins/translate/translate.css +91 -0
  211. package/es2021/plugins/translate/translate.js +636 -0
  212. package/es2021/plugins/translate/translate.min.css +1 -0
  213. package/es2021/plugins/translate/translate.min.js +10 -0
  214. package/es2021/plugins/tune-block/tune-block.css +37 -0
  215. package/es2021/plugins/tune-block/tune-block.js +385 -0
  216. package/es2021/plugins/tune-block/tune-block.min.css +1 -0
  217. package/es2021/plugins/tune-block/tune-block.min.js +10 -0
  218. package/es2021.en/jodit.css +4945 -0
  219. package/es2021.en/jodit.fat.min.css +1 -0
  220. package/es2021.en/jodit.fat.min.js +10 -0
  221. package/es2021.en/jodit.js +40989 -0
  222. package/es2021.en/jodit.min.css +1 -0
  223. package/es2021.en/jodit.min.js +10 -0
  224. package/es2021.en/plugins/autocomplete/autocomplete.css +26 -0
  225. package/es2021.en/plugins/autocomplete/autocomplete.js +463 -0
  226. package/es2021.en/plugins/autocomplete/autocomplete.min.css +1 -0
  227. package/es2021.en/plugins/autocomplete/autocomplete.min.js +10 -0
  228. package/es2021.en/plugins/backup/backup.css +48 -0
  229. package/es2021.en/plugins/backup/backup.js +554 -0
  230. package/es2021.en/plugins/backup/backup.min.css +1 -0
  231. package/es2021.en/plugins/backup/backup.min.js +10 -0
  232. package/es2021.en/plugins/button-generator/button-generator.css +316 -0
  233. package/es2021.en/plugins/button-generator/button-generator.js +1382 -0
  234. package/es2021.en/plugins/button-generator/button-generator.min.css +1 -0
  235. package/es2021.en/plugins/button-generator/button-generator.min.js +10 -0
  236. package/es2021.en/plugins/change-case/change-case.js +171 -0
  237. package/es2021.en/plugins/change-case/change-case.min.js +10 -0
  238. package/es2021.en/plugins/color-picker/color-picker.css +133 -0
  239. package/es2021.en/plugins/color-picker/color-picker.js +517 -0
  240. package/es2021.en/plugins/color-picker/color-picker.min.css +1 -0
  241. package/es2021.en/plugins/color-picker/color-picker.min.js +10 -0
  242. package/es2021.en/plugins/emoji/emoji.css +108 -0
  243. package/es2021.en/plugins/emoji/emoji.js +425 -0
  244. package/es2021.en/plugins/emoji/emoji.min.css +1 -0
  245. package/es2021.en/plugins/emoji/emoji.min.js +10 -0
  246. package/es2021.en/plugins/export-docs/export-docs.js +156 -0
  247. package/es2021.en/plugins/export-docs/export-docs.min.js +10 -0
  248. package/es2021.en/plugins/finder/finder.css +1342 -0
  249. package/es2021.en/plugins/finder/finder.js +3117 -0
  250. package/es2021.en/plugins/finder/finder.min.css +1 -0
  251. package/es2021.en/plugins/finder/finder.min.js +10 -0
  252. package/es2021.en/plugins/google-maps/google-maps.css +397 -0
  253. package/es2021.en/plugins/google-maps/google-maps.js +2540 -0
  254. package/es2021.en/plugins/google-maps/google-maps.min.css +1 -0
  255. package/es2021.en/plugins/google-maps/google-maps.min.js +10 -0
  256. package/es2021.en/plugins/google-search/google-search.js +107 -0
  257. package/es2021.en/plugins/google-search/google-search.min.js +10 -0
  258. package/es2021.en/plugins/highlight-signature/highlight-signature.js +231 -0
  259. package/es2021.en/plugins/highlight-signature/highlight-signature.min.js +10 -0
  260. package/es2021.en/plugins/iframe-editor/iframe-editor.css +16 -0
  261. package/es2021.en/plugins/iframe-editor/iframe-editor.js +308 -0
  262. package/es2021.en/plugins/iframe-editor/iframe-editor.min.css +1 -0
  263. package/es2021.en/plugins/iframe-editor/iframe-editor.min.js +10 -0
  264. package/es2021.en/plugins/keyboard/keyboard.css +48 -0
  265. package/es2021.en/plugins/keyboard/keyboard.js +537 -0
  266. package/es2021.en/plugins/keyboard/keyboard.min.css +1 -0
  267. package/es2021.en/plugins/keyboard/keyboard.min.js +10 -0
  268. package/es2021.en/plugins/mobile-view/mobile-view.js +168 -0
  269. package/es2021.en/plugins/mobile-view/mobile-view.min.js +10 -0
  270. package/es2021.en/plugins/page-break/page-break.js +181 -0
  271. package/es2021.en/plugins/page-break/page-break.min.js +10 -0
  272. package/es2021.en/plugins/paste-code/paste-code.css +21 -0
  273. package/es2021.en/plugins/paste-code/paste-code.js +318 -0
  274. package/es2021.en/plugins/paste-code/paste-code.min.css +1 -0
  275. package/es2021.en/plugins/paste-code/paste-code.min.js +10 -0
  276. package/es2021.en/plugins/paste-from-word/paste-from-word.js +1528 -0
  277. package/es2021.en/plugins/paste-from-word/paste-from-word.min.js +10 -0
  278. package/es2021.en/plugins/show-blocks/show-blocks.js +322 -0
  279. package/es2021.en/plugins/show-blocks/show-blocks.min.js +10 -0
  280. package/es2021.en/plugins/todo-list/todo-list.css +77 -0
  281. package/es2021.en/plugins/todo-list/todo-list.js +313 -0
  282. package/es2021.en/plugins/todo-list/todo-list.min.css +1 -0
  283. package/es2021.en/plugins/todo-list/todo-list.min.js +10 -0
  284. package/es2021.en/plugins/translate/translate.css +91 -0
  285. package/es2021.en/plugins/translate/translate.js +636 -0
  286. package/es2021.en/plugins/translate/translate.min.css +1 -0
  287. package/es2021.en/plugins/translate/translate.min.js +10 -0
  288. package/es2021.en/plugins/tune-block/tune-block.css +37 -0
  289. package/es2021.en/plugins/tune-block/tune-block.js +385 -0
  290. package/es2021.en/plugins/tune-block/tune-block.min.css +1 -0
  291. package/es2021.en/plugins/tune-block/tune-block.min.js +10 -0
  292. package/es5/jodit.css +5956 -0
  293. package/es5/jodit.fat.min.css +1 -0
  294. package/es5/jodit.fat.min.js +10 -0
  295. package/es5/jodit.js +49879 -0
  296. package/es5/jodit.min.css +15 -0
  297. package/es5/jodit.min.js +10 -0
  298. package/es5/plugins/autocomplete/autocomplete.css +26 -0
  299. package/es5/plugins/autocomplete/autocomplete.js +536 -0
  300. package/es5/plugins/autocomplete/autocomplete.min.css +1 -0
  301. package/es5/plugins/autocomplete/autocomplete.min.js +10 -0
  302. package/es5/plugins/backup/backup.css +48 -0
  303. package/es5/plugins/backup/backup.js +599 -0
  304. package/es5/plugins/backup/backup.min.css +1 -0
  305. package/es5/plugins/backup/backup.min.js +10 -0
  306. package/es5/plugins/button-generator/button-generator.css +316 -0
  307. package/es5/plugins/button-generator/button-generator.js +1310 -0
  308. package/es5/plugins/button-generator/button-generator.min.css +1 -0
  309. package/es5/plugins/button-generator/button-generator.min.js +10 -0
  310. package/es5/plugins/change-case/change-case.js +179 -0
  311. package/es5/plugins/change-case/change-case.min.js +10 -0
  312. package/es5/plugins/color-picker/color-picker.css +133 -0
  313. package/es5/plugins/color-picker/color-picker.js +525 -0
  314. package/es5/plugins/color-picker/color-picker.min.css +1 -0
  315. package/es5/plugins/color-picker/color-picker.min.js +10 -0
  316. package/es5/plugins/emoji/emoji.css +108 -0
  317. package/es5/plugins/emoji/emoji.js +459 -0
  318. package/es5/plugins/emoji/emoji.min.css +1 -0
  319. package/es5/plugins/emoji/emoji.min.js +10 -0
  320. package/es5/plugins/export-docs/export-docs.js +174 -0
  321. package/es5/plugins/export-docs/export-docs.min.js +10 -0
  322. package/es5/plugins/finder/finder.css +1342 -0
  323. package/es5/plugins/finder/finder.js +3335 -0
  324. package/es5/plugins/finder/finder.min.css +1 -0
  325. package/es5/plugins/finder/finder.min.js +10 -0
  326. package/es5/plugins/google-maps/google-maps.css +397 -0
  327. package/es5/plugins/google-maps/google-maps.js +2463 -0
  328. package/es5/plugins/google-maps/google-maps.min.css +1 -0
  329. package/es5/plugins/google-maps/google-maps.min.js +10 -0
  330. package/es5/plugins/google-search/google-search.js +113 -0
  331. package/es5/plugins/google-search/google-search.min.js +10 -0
  332. package/es5/plugins/highlight-signature/highlight-signature.js +253 -0
  333. package/es5/plugins/highlight-signature/highlight-signature.min.js +10 -0
  334. package/es5/plugins/iframe-editor/iframe-editor.css +16 -0
  335. package/es5/plugins/iframe-editor/iframe-editor.js +319 -0
  336. package/es5/plugins/iframe-editor/iframe-editor.min.css +1 -0
  337. package/es5/plugins/iframe-editor/iframe-editor.min.js +10 -0
  338. package/es5/plugins/keyboard/keyboard.css +48 -0
  339. package/es5/plugins/keyboard/keyboard.js +556 -0
  340. package/es5/plugins/keyboard/keyboard.min.css +1 -0
  341. package/es5/plugins/keyboard/keyboard.min.js +10 -0
  342. package/es5/plugins/mobile-view/mobile-view.js +176 -0
  343. package/es5/plugins/mobile-view/mobile-view.min.js +10 -0
  344. package/es5/plugins/page-break/page-break.js +169 -0
  345. package/es5/plugins/page-break/page-break.min.js +10 -0
  346. package/es5/plugins/paste-code/paste-code.css +21 -0
  347. package/es5/plugins/paste-code/paste-code.js +348 -0
  348. package/es5/plugins/paste-code/paste-code.min.css +1 -0
  349. package/es5/plugins/paste-code/paste-code.min.js +10 -0
  350. package/es5/plugins/paste-from-word/paste-from-word.js +1670 -0
  351. package/es5/plugins/paste-from-word/paste-from-word.min.js +10 -0
  352. package/es5/plugins/show-blocks/show-blocks.js +649 -0
  353. package/es5/plugins/show-blocks/show-blocks.min.js +10 -0
  354. package/es5/plugins/todo-list/todo-list.css +77 -0
  355. package/es5/plugins/todo-list/todo-list.js +324 -0
  356. package/es5/plugins/todo-list/todo-list.min.css +1 -0
  357. package/es5/plugins/todo-list/todo-list.min.js +10 -0
  358. package/es5/plugins/translate/translate.css +91 -0
  359. package/es5/plugins/translate/translate.js +657 -0
  360. package/es5/plugins/translate/translate.min.css +1 -0
  361. package/es5/plugins/translate/translate.min.js +10 -0
  362. package/es5/plugins/tune-block/tune-block.css +37 -0
  363. package/es5/plugins/tune-block/tune-block.js +397 -0
  364. package/es5/plugins/tune-block/tune-block.min.css +1 -0
  365. package/es5/plugins/tune-block/tune-block.min.js +10 -0
  366. package/examples/arabic.lang.html +8 -8
  367. package/examples/color-picker.html +6 -6
  368. package/examples/custom-icons.html +8 -8
  369. package/examples/custom-toolbar.html +8 -8
  370. package/examples/example.default.html +6 -6
  371. package/examples/fullsize.html +8 -8
  372. package/examples/index.html +6 -6
  373. package/examples/inline-mode.html +8 -8
  374. package/examples/oneinstance.html +8 -8
  375. package/examples/theme.html +6 -6
  376. package/package.json +6 -22
  377. package/LICENSE.md +0 -3
  378. package/build/jodit.css +0 -1
  379. package/build/jodit.es5.css +0 -8
  380. package/build/jodit.es5.js +0 -1
  381. package/build/jodit.fat.css +0 -1
  382. package/build/jodit.fat.es5.css +0 -1
  383. package/build/jodit.fat.es5.js +0 -1
  384. package/build/jodit.fat.js +0 -1
  385. package/build/jodit.js +0 -1
  386. package/build/plugins/autocomplete/autocomplete.es5.js +0 -1
  387. package/build/plugins/autocomplete/autocomplete.js +0 -1
  388. package/build/plugins/backup/backup.es5.js +0 -1
  389. package/build/plugins/backup/backup.js +0 -1
  390. package/build/plugins/button-generator/button-generator.css +0 -1
  391. package/build/plugins/button-generator/button-generator.es5.css +0 -1
  392. package/build/plugins/button-generator/button-generator.es5.js +0 -1
  393. package/build/plugins/button-generator/button-generator.js +0 -1
  394. package/build/plugins/change-case/change-case.es5.js +0 -1
  395. package/build/plugins/change-case/change-case.js +0 -1
  396. package/build/plugins/color-picker/color-picker.css +0 -1
  397. package/build/plugins/color-picker/color-picker.es5.css +0 -1
  398. package/build/plugins/color-picker/color-picker.es5.js +0 -1
  399. package/build/plugins/color-picker/color-picker.js +0 -1
  400. package/build/plugins/emoji/emoji.css +0 -1
  401. package/build/plugins/emoji/emoji.es5.css +0 -1
  402. package/build/plugins/emoji/emoji.es5.js +0 -1
  403. package/build/plugins/emoji/emoji.js +0 -1
  404. package/build/plugins/export-docs/export-docs.es5.js +0 -1
  405. package/build/plugins/export-docs/export-docs.js +0 -1
  406. package/build/plugins/finder/finder.css +0 -1
  407. package/build/plugins/finder/finder.es5.css +0 -1
  408. package/build/plugins/finder/finder.es5.js +0 -1
  409. package/build/plugins/finder/finder.js +0 -1
  410. package/build/plugins/google-maps/google-maps.css +0 -1
  411. package/build/plugins/google-maps/google-maps.es5.css +0 -1
  412. package/build/plugins/google-maps/google-maps.es5.js +0 -1
  413. package/build/plugins/google-maps/google-maps.js +0 -1
  414. package/build/plugins/google-search/google-search.es5.js +0 -1
  415. package/build/plugins/google-search/google-search.js +0 -1
  416. package/build/plugins/highlight-signature/highlight-signature.es5.js +0 -1
  417. package/build/plugins/highlight-signature/highlight-signature.js +0 -1
  418. package/build/plugins/iframe-editor/iframe-editor.es5.js +0 -1
  419. package/build/plugins/iframe-editor/iframe-editor.js +0 -1
  420. package/build/plugins/keyboard/keyboard.es5.js +0 -1
  421. package/build/plugins/keyboard/keyboard.js +0 -1
  422. package/build/plugins/mobile-view/mobile-view.css +0 -0
  423. package/build/plugins/mobile-view/mobile-view.es5.css +0 -0
  424. package/build/plugins/mobile-view/mobile-view.es5.js +0 -1
  425. package/build/plugins/mobile-view/mobile-view.js +0 -1
  426. package/build/plugins/page-break/page-break.css +0 -1
  427. package/build/plugins/page-break/page-break.es5.css +0 -1
  428. package/build/plugins/page-break/page-break.es5.js +0 -1
  429. package/build/plugins/page-break/page-break.js +0 -1
  430. package/build/plugins/paste-code/paste-code.es5.js +0 -1
  431. package/build/plugins/paste-code/paste-code.js +0 -1
  432. package/build/plugins/paste-from-word/paste-from-word.es5.js +0 -1
  433. package/build/plugins/paste-from-word/paste-from-word.js +0 -1
  434. package/build/plugins/show-blocks/show-blocks.es5.js +0 -1
  435. package/build/plugins/show-blocks/show-blocks.js +0 -1
  436. package/build/plugins/todo-list/todo-list.css +0 -1
  437. package/build/plugins/todo-list/todo-list.es5.css +0 -1
  438. package/build/plugins/todo-list/todo-list.es5.js +0 -1
  439. package/build/plugins/todo-list/todo-list.js +0 -1
  440. package/build/plugins/translate/translate.es5.js +0 -1
  441. package/build/plugins/translate/translate.js +0 -1
  442. package/build/plugins/tune-block/tune-block.es5.js +0 -1
  443. package/build/plugins/tune-block/tune-block.js +0 -1
  444. package/index.html +0 -268
  445. /package/{build/config.js → config.js} +0 -0
  446. /package/{build/plugins/autocomplete/autocomplete.css → es2015/plugins/autocomplete/autocomplete.min.css} +0 -0
  447. /package/{build/plugins/iframe-editor/iframe-editor.css → es2015/plugins/iframe-editor/iframe-editor.min.css} +0 -0
  448. /package/{build/plugins/keyboard/keyboard.css → es2015/plugins/keyboard/keyboard.min.css} +0 -0
  449. /package/{build/plugins/paste-code/paste-code.css → es2015/plugins/paste-code/paste-code.min.css} +0 -0
  450. /package/{build/plugins/translate/translate.css → es2015/plugins/translate/translate.min.css} +0 -0
  451. /package/{build/plugins/autocomplete/autocomplete.es5.css → es2018/plugins/autocomplete/autocomplete.min.css} +0 -0
  452. /package/{build/plugins/iframe-editor/iframe-editor.es5.css → es2018/plugins/iframe-editor/iframe-editor.min.css} +0 -0
  453. /package/{build/plugins/keyboard/keyboard.es5.css → es2018/plugins/keyboard/keyboard.min.css} +0 -0
  454. /package/{build/plugins/paste-code/paste-code.es5.css → es2018/plugins/paste-code/paste-code.min.css} +0 -0
  455. /package/{build/plugins/translate/translate.es5.css → es2018/plugins/translate/translate.min.css} +0 -0
@@ -0,0 +1,3175 @@
1
+ /*!
2
+ * jodit-pro - PRO Version of Jodit Editor
3
+ * Author: Chupurnov Valeriy <chupurnov@gmail.com>
4
+ * Version: v2.0.0-beta.10
5
+ * Url: https://xdsoft.net/jodit/pro/
6
+ * License(s): SEE LICENSE IN LICENSE.md
7
+ */
8
+
9
+ (function webpackUniversalModuleDefinition(root, factory) {
10
+ if(typeof exports === 'object' && typeof module === 'object')
11
+ module.exports = factory();
12
+ else if(typeof define === 'function' && define.amd)
13
+ define([], factory);
14
+ else {
15
+ var a = factory();
16
+ for(var i in a) (typeof exports === 'object' ? exports : root)[i] = a[i];
17
+ }
18
+ })(self, function() {
19
+ return (self["webpackChunkjodit_pro"] = self["webpackChunkjodit_pro"] || []).push([[524],{
20
+
21
+ /***/ 82942:
22
+ /***/ (function(module) {
23
+
24
+ module.exports = "<svg viewBox=\"0 0 512 512\" xmlns=\"http://www.w3.org/2000/svg\"> <path d=\"M365.4,59.628c60.56,0,109.6,49.03,109.6,109.47c0,109.47-109.6,171.8-219.06,281.271 C146.47,340.898,37,278.568,37,169.099c0-60.44,49.04-109.47,109.47-109.47c54.73,0,82.1,27.37,109.47,82.1 C283.3,86.999,310.67,59.628,365.4,59.628z\"/> </svg>"
25
+
26
+ /***/ }),
27
+
28
+ /***/ 19327:
29
+ /***/ (function(module) {
30
+
31
+ module.exports = "<svg viewBox=\"0 0 32 32\" xmlns=\"http://www.w3.org/2000/svg\"> <path d=\"M28.7,16.3l-12-13c-0.4-0.4-1.1-0.4-1.5,0l-12,13C3,16.6,2.9,17,3.1,17.4C3.2,17.8,3.6,18,4,18h3v10c0,0.6,0.4,1,1,1h16 c0.6,0,1-0.4,1-1V18h3c0.4,0,0.8-0.2,0.9-0.6C29.1,17,29,16.6,28.7,16.3z\"/> </svg>"
32
+
33
+ /***/ }),
34
+
35
+ /***/ 59239:
36
+ /***/ (function(module) {
37
+
38
+ module.exports = "<svg viewBox=\"0 0 252 252\" xmlns=\"http://www.w3.org/2000/svg\"> <path d=\"M0 16C0 7.16344 7.16344 0 16 0H85.6364C86.5205 0 87.3797 0.29288 88.0796 0.832871L120.92 26.1671C121.62 26.7071 122.48 27 123.364 27H227C235.837 27 243 34.1634 243 43V132.335C243 134.779 240.234 136.198 238.25 134.772L233 131L226.5 127L220 124L212.5 122L202.5 120L189 120.5L179.5 122.5L170.5 125.5L161.5 130.5L157 133.5L153 137L146.5 144L141 152L137 160L134 168L132.5 178L132 183.5V189.5L133 197.5L135 205.5L137.5 211.5L139.524 214.996C141.068 217.663 139.144 221 136.062 221H16C7.16344 221 0 213.837 0 205V16Z\"/> <circle cx=\"197\" cy=\"185\" r=\"56\"/> <path d=\"M188.364 215.955V151.591H204.636V215.955H188.364ZM164.318 191.909V175.636H228.682V191.909H164.318Z\" fill=\"white\"/> </svg>"
39
+
40
+ /***/ }),
41
+
42
+ /***/ 46567:
43
+ /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
44
+
45
+ "use strict";
46
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, {
47
+ /* harmony export */ "lf": function() { return /* reexport safe */ _dlgs__WEBPACK_IMPORTED_MODULE_1__.l; }
48
+ /* harmony export */ });
49
+ /* harmony import */ var _elms__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(71917);
50
+ /* harmony import */ var _dlgs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(87759);
51
+ /*!
52
+ * Jodit Editor (https://xdsoft.net/jodit/)
53
+ * Released under MIT see LICENSE.txt in the project root for license information.
54
+ * Copyright (c) 2013-2023 Valeriy Chupurnov. All rights reserved. https://xdsoft.net
55
+ */
56
+ /**
57
+ * @module traits
58
+ */
59
+
60
+
61
+
62
+
63
+
64
+ /***/ }),
65
+
66
+ /***/ 68813:
67
+ /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
68
+
69
+ "use strict";
70
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, {
71
+ /* harmony export */ "X": function() { return /* binding */ FileBrowserPro; }
72
+ /* harmony export */ });
73
+ /* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(97582);
74
+ /* harmony import */ var _ui_assets_icons__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(68349);
75
+ /* harmony import */ var jodit_modules__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(8079);
76
+ /* harmony import */ var jodit_modules_dialog__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(2932);
77
+ /* harmony import */ var _ui_panel_panel__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(96123);
78
+ /* harmony import */ var jodit_core_helpers__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(95582);
79
+ /* harmony import */ var jodit_core_decorators__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(50526);
80
+ /* harmony import */ var jodit_core_constants__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(11612);
81
+ /* harmony import */ var _helpers_state_manager__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(83568);
82
+ /* harmony import */ var _ui_header_header__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(65669);
83
+ /* harmony import */ var jodit_modules_image_editor_image_editor__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(92803);
84
+ /* harmony import */ var jodit_config__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(77628);
85
+ /* harmony import */ var _ui_progress_progress__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(22840);
86
+ /* harmony import */ var jodit_modules_file_browser_factories__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(3028);
87
+ /* harmony import */ var jodit_core_traits__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(46567);
88
+ /* harmony import */ var _helpers_persistent_store__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(93469);
89
+ /* harmony import */ var _helpers_history_manager__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(9581);
90
+ /* harmony import */ var _helpers_context_menu__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(63052);
91
+ /* harmony import */ var _helpers_helpers__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(70467);
92
+ /* harmony import */ var _JoditPro__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(88292);
93
+ /* harmony import */ var _license_license__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(19564);
94
+ /* harmony import */ var _ui_lightboox_lightbox__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(41424);
95
+ /* harmony import */ var _helpers_loading_manager__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(48086);
96
+ /*!
97
+ * Jodit Editor PRO (https://xdsoft.net/jodit/)
98
+ * See LICENSE.md in the project root for license information.
99
+ * Copyright (c) 2013-2023 Valeriy Chupurnov. All rights reserved. https://xdsoft.net/jodit/pro/
100
+ */
101
+
102
+
103
+
104
+
105
+
106
+
107
+
108
+
109
+
110
+
111
+
112
+
113
+
114
+
115
+
116
+
117
+
118
+
119
+
120
+
121
+
122
+
123
+
124
+
125
+ let FileBrowserPro = class FileBrowserPro extends jodit_modules_dialog__WEBPACK_IMPORTED_MODULE_2__/* .Dialog */ .Vq {
126
+ /** @override */
127
+ className() {
128
+ return 'FileBrowserPro';
129
+ }
130
+ /** @override */
131
+ lock(name = 'any') {
132
+ this.container.classList.add('jodit_disabled');
133
+ return super.lock(name);
134
+ }
135
+ unlock() {
136
+ this.container.classList.remove('jodit_disabled');
137
+ return super.unlock();
138
+ }
139
+ status(message, success = !(message instanceof Error)) {
140
+ if ((0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_4__.isAbort)(message)) {
141
+ return;
142
+ }
143
+ if (!jodit_core_constants__WEBPACK_IMPORTED_MODULE_6__.IS_PROD && !(0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_4__.isString)(message)) {
144
+ console.error(message);
145
+ }
146
+ this.message.message((0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_4__.isString)(message) ? message : message.message, success ? 'success' : 'error', this.options.howLongShowMsg);
147
+ }
148
+ get progressbar() {
149
+ return new _ui_progress_progress__WEBPACK_IMPORTED_MODULE_11__/* .UIProgress */ .u(this, this.stateManager.state);
150
+ }
151
+ constructor(options) {
152
+ super((0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_4__.ConfigProto)(Object.assign(options || {}, {
153
+ resizable: true,
154
+ draggable: true,
155
+ toolbarButtons: (options === null || options === void 0 ? void 0 : options.toolbarButtons) ||
156
+ jodit_config__WEBPACK_IMPORTED_MODULE_10__.Config.defaultOptions.filebrowser.buttons,
157
+ buttons: _JoditPro__WEBPACK_IMPORTED_MODULE_17__/* .JoditPro.atom */ .y.atom([
158
+ 'filebrowser.settings',
159
+ 'fullsize',
160
+ 'dialog.close'
161
+ ])
162
+ }), jodit_config__WEBPACK_IMPORTED_MODULE_10__.Config.defaultOptions.filebrowser));
163
+ this.dataProvider = (0,jodit_modules_file_browser_factories__WEBPACK_IMPORTED_MODULE_12__/* .makeDataProvider */ .S)(this, this.options);
164
+ this.state = (0,jodit_modules__WEBPACK_IMPORTED_MODULE_1__.observable)({
165
+ onSelectCallBack: null,
166
+ theme: 'default',
167
+ showSideBar: true,
168
+ showFavorites: true,
169
+ showSettings: false,
170
+ showPreview: false,
171
+ withFolders: true,
172
+ foldersPosition: 'bottom',
173
+ info: '',
174
+ metaInfo: null,
175
+ currentPath: '',
176
+ currentSource: '',
177
+ currentBaseUrl: '',
178
+ tree: [],
179
+ activeElements: [],
180
+ favorites: [],
181
+ progress: 0,
182
+ lastSelectedIndex: 0,
183
+ elements: [],
184
+ messages: [],
185
+ sources: [],
186
+ view: 'tiles',
187
+ tileSize: 'default',
188
+ sortBy: 'name-asc',
189
+ filterWord: '',
190
+ onlyImages: false
191
+ });
192
+ this.persistent = new _helpers_persistent_store__WEBPACK_IMPORTED_MODULE_14__/* .PersistentStore */ .h(this, this.state);
193
+ this.loadingManager = new _helpers_loading_manager__WEBPACK_IMPORTED_MODULE_20__/* .LoadingManager */ .l(this, this.state);
194
+ this.stateManager = new _helpers_state_manager__WEBPACK_IMPORTED_MODULE_7__/* .StateManager */ .O(this.state);
195
+ this.historyManager = new _helpers_history_manager__WEBPACK_IMPORTED_MODULE_15__/* .HistoryManager */ .E(this, this.state);
196
+ this.contextMenuManager = new _helpers_context_menu__WEBPACK_IMPORTED_MODULE_16__/* .ContextMenuManager */ .z(this);
197
+ this.header = new _ui_header_header__WEBPACK_IMPORTED_MODULE_8__/* .UIBrowserHeader */ .C(this, this.options, this.stateManager);
198
+ this.panel = new _ui_panel_panel__WEBPACK_IMPORTED_MODULE_3__/* .UIBrowserPanel */ .G(this, this.stateManager);
199
+ this.files = this.panel;
200
+ this.tree = this.panel;
201
+ _license_license__WEBPACK_IMPORTED_MODULE_18__/* .license.make */ .V.make(this);
202
+ if (!this.persistent.theme && this.options.theme) {
203
+ this.persistent.theme = this.options.theme;
204
+ }
205
+ this.panel.append(this.progressbar);
206
+ this.toolbar.setMod('mode', 'header');
207
+ this.setSize(Math.min(this.options.width, screen.width), Math.min(this.options.height, screen.height)).setHeader(this.header);
208
+ this.onResizeWindow();
209
+ this.initUploader();
210
+ this.onChangeTheme();
211
+ this.fullFillOptions();
212
+ this.dataProvider.onProgress((percentage) => {
213
+ if (percentage === 0) {
214
+ percentage = 30;
215
+ }
216
+ this.state.progress = percentage;
217
+ });
218
+ this.e.on('beforeClose', this.removeGlobalListeners);
219
+ this.e.fire('afterInit');
220
+ _JoditPro__WEBPACK_IMPORTED_MODULE_17__/* .JoditPro.prototype.afterInitHook.call */ .y.prototype.afterInitHook.call(this);
221
+ }
222
+ /** @override */
223
+ addDisclaimer(elm) {
224
+ this.dialog.appendChild(elm);
225
+ }
226
+ // @ts-ignore
227
+ open(callback = this.o
228
+ .defaultCallback, onlyImages) {
229
+ const _super = Object.create(null, {
230
+ open: { get: () => super.open }
231
+ });
232
+ return (0,tslib__WEBPACK_IMPORTED_MODULE_21__/* .__awaiter */ .mG)(this, void 0, void 0, function* () {
233
+ this.state.onlyImages = Boolean(onlyImages);
234
+ this.prepareOpening(callback);
235
+ _super.open.call(this, this.panel.container);
236
+ return this.e.fire('update.filebrowser');
237
+ });
238
+ }
239
+ /**
240
+ * Resize handler
241
+ */
242
+ onResizeWindow() {
243
+ (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_4__.css)(this.dialog, {
244
+ maxWidth: screen.width,
245
+ minHeight: Math.min(this.options.height, screen.height),
246
+ minWidth: Math.min(this.options.width, screen.width)
247
+ });
248
+ }
249
+ onChangePath() {
250
+ const { currentPath, currentSource } = this.state;
251
+ this.uploader.setPath(currentPath);
252
+ this.uploader.setSource(currentSource);
253
+ }
254
+ onChangeTheme() {
255
+ this.setMod('theme', this.state.theme);
256
+ this.header.setMod('theme', this.state.theme);
257
+ this.panel.setMod('theme', this.state.theme);
258
+ this.options.theme = this.state.theme;
259
+ }
260
+ onToggleSettings() {
261
+ this.state.showSettings = !this.state.showSettings;
262
+ }
263
+ prepareOpening(callback) {
264
+ this.registerGlobalListeners();
265
+ if (callback) {
266
+ this.state.onSelectCallBack = (data) => {
267
+ this.close();
268
+ callback(data);
269
+ };
270
+ }
271
+ this.persistent.syncWithState();
272
+ }
273
+ registerGlobalListeners() {
274
+ this.e.on(this.ow, 'keydown', this.onKeyPress);
275
+ }
276
+ onKeyPress(e) {
277
+ const { activeElement } = this.od;
278
+ if (!this.state.activeElements.length ||
279
+ !activeElement ||
280
+ !jodit_modules__WEBPACK_IMPORTED_MODULE_1__.Dom.isOrContains(this.panel.items.container, activeElement)) {
281
+ return;
282
+ }
283
+ const elms = this.state.elements;
284
+ switch (e.key) {
285
+ case jodit_core_constants__WEBPACK_IMPORTED_MODULE_6__.KEY_ENTER: {
286
+ return this.onChooseItems();
287
+ }
288
+ case jodit_core_constants__WEBPACK_IMPORTED_MODULE_6__.KEY_DELETE: {
289
+ return this.onFileRemove();
290
+ }
291
+ case jodit_core_constants__WEBPACK_IMPORTED_MODULE_6__.KEY_RIGHT:
292
+ case jodit_core_constants__WEBPACK_IMPORTED_MODULE_6__.KEY_LEFT:
293
+ case jodit_core_constants__WEBPACK_IMPORTED_MODULE_6__.KEY_DOWN:
294
+ case jodit_core_constants__WEBPACK_IMPORTED_MODULE_6__.KEY_UP: {
295
+ const next = e.key === jodit_core_constants__WEBPACK_IMPORTED_MODULE_6__.KEY_RIGHT || e.key === jodit_core_constants__WEBPACK_IMPORTED_MODULE_6__.KEY_DOWN, index = this.state.lastSelectedIndex;
296
+ let nextIndex;
297
+ if ([jodit_core_constants__WEBPACK_IMPORTED_MODULE_6__.KEY_RIGHT, jodit_core_constants__WEBPACK_IMPORTED_MODULE_6__.KEY_LEFT].includes(e.key)) {
298
+ if (next) {
299
+ nextIndex = !elms[index + 1] ? 0 : index + 1;
300
+ }
301
+ else {
302
+ nextIndex = !elms[index - 1]
303
+ ? elms.length - 1
304
+ : index - 1;
305
+ }
306
+ }
307
+ else {
308
+ const { countInRow } = this.panel;
309
+ nextIndex = Math.round(((index + 1) / countInRow + (next ? 1 : -1)) *
310
+ countInRow -
311
+ 1);
312
+ }
313
+ elms[nextIndex] &&
314
+ this.stateManager.addActive(elms[nextIndex], e.shiftKey);
315
+ return false;
316
+ }
317
+ }
318
+ }
319
+ removeGlobalListeners() {
320
+ this.e.off(this.ow, 'keydown', this.onKeyPress);
321
+ }
322
+ onFileRemove() {
323
+ if (this.state.activeElements.length) {
324
+ this.confirm('Are you sure?', 'Delete', (yes) => {
325
+ yes && void this.__itemsRemove(this.state.activeElements);
326
+ }).bindDestruct(this);
327
+ }
328
+ }
329
+ __itemsRemove(items) {
330
+ if (!items.length) {
331
+ return Promise.resolve();
332
+ }
333
+ const promises = [];
334
+ items.forEach((item) => {
335
+ var _a;
336
+ promises.push(item.type === 'folder'
337
+ ? this.__folderRemove((0,_helpers_helpers__WEBPACK_IMPORTED_MODULE_22__/* .parentPath */ .C)(item.path), (_a = item.name) !== null && _a !== void 0 ? _a : '', item.sourceName)
338
+ : this.__removeFile(item.file || item.name || '', item.sourceName));
339
+ });
340
+ this.state.activeElements.forEach((el) => {
341
+ this.stateManager.isFavorite(el) &&
342
+ this.stateManager.toggleFavorite(el);
343
+ });
344
+ this.state.activeElements = [];
345
+ return Promise.allSettled(promises).then(() => Promise.allSettled([
346
+ this.loadingManager.loadItems(),
347
+ this.loadingManager.loadFolders()
348
+ ]));
349
+ }
350
+ __removeFile(name, source) {
351
+ return this.dataProvider
352
+ .fileRemove(this.state.currentPath, name, source)
353
+ .then((message) => {
354
+ this.status(message || this.i18n('File "%s" was deleted', name), true);
355
+ })
356
+ .catch(this.status);
357
+ }
358
+ __folderRemove(path, name, sourceName) {
359
+ return this.dataProvider
360
+ .folderRemove(path, name, sourceName)
361
+ .then((message) => {
362
+ this.status(message || this.i18n('Folder "%s" was deleted', name), true);
363
+ if (this.state.currentPath === path) {
364
+ this.state.currentPath = (0,_helpers_helpers__WEBPACK_IMPORTED_MODULE_22__/* .parentPath */ .C)(path);
365
+ this.state.currentSource = sourceName;
366
+ }
367
+ })
368
+ .catch(this.status);
369
+ }
370
+ onFileEdit() {
371
+ if (this.state.activeElements.length === 1) {
372
+ const [file] = this.state.activeElements;
373
+ jodit_modules_image_editor_image_editor__WEBPACK_IMPORTED_MODULE_9__/* .openImageEditor.call */ .r.call(this, file.fileURL, file.file || '', file.path, file.sourceName, undefined, this.status);
374
+ }
375
+ }
376
+ onFolderRename(data) {
377
+ this.prompt('Enter new name', 'Rename', (newName) => {
378
+ if (!(0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_4__.isValidName)(newName) || newName === data.name) {
379
+ this.status(this.i18n('Enter new name'));
380
+ return false;
381
+ }
382
+ this.dataProvider
383
+ .folderRename((0,_helpers_helpers__WEBPACK_IMPORTED_MODULE_22__/* .parentPath */ .C)(data.path), data.name, newName, data.sourceName)
384
+ .then((message) => {
385
+ this.state.activeElements = [];
386
+ this.status(message, true);
387
+ this.state.currentPath =
388
+ (0,_helpers_helpers__WEBPACK_IMPORTED_MODULE_22__/* .parentPath */ .C)(data.path) + '/' + newName;
389
+ this.state.currentSource = data.sourceName;
390
+ this.historyManager.updateCurrent();
391
+ this.loadingManager.loadFolders();
392
+ })
393
+ .catch(this.status);
394
+ return;
395
+ }, this.i18n('type name'), data.name).bindDestruct(this);
396
+ }
397
+ onFolderRemove(data) {
398
+ this.confirm('Are you sure?', 'Delete', (yes) => {
399
+ yes &&
400
+ void this.__itemsRemove([
401
+ {
402
+ type: 'folder',
403
+ name: data.name,
404
+ path: data.path,
405
+ sourceName: data.sourceName
406
+ }
407
+ ]);
408
+ }).bindDestruct(this);
409
+ }
410
+ onFolderCreate(data) {
411
+ this.prompt('Enter Directory name', 'Create directory', (name) => {
412
+ const path = data.path || '/';
413
+ this.dataProvider
414
+ .createFolder(name, data.path || '/', data.sourceName)
415
+ .then(() => {
416
+ if (this.state.currentSource === data.sourceName &&
417
+ this.state.currentPath === path) {
418
+ this.e.fire('update.filebrowser');
419
+ }
420
+ else {
421
+ this.state.currentSource = data.sourceName;
422
+ this.state.currentPath = path;
423
+ }
424
+ this.historyManager.updateCurrent();
425
+ }, this.status);
426
+ }, this.i18n('type name')).bindDestruct(this);
427
+ }
428
+ onFileRename(item) {
429
+ const name = item.file || item.name || '';
430
+ if (this.state.activeElements.length === 1 && name) {
431
+ this.prompt('Enter new name', 'Rename', (newName) => {
432
+ if (!(0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_4__.isValidName)(newName)) {
433
+ this.status(this.i18n('Enter new name'));
434
+ return false;
435
+ }
436
+ this.dataProvider
437
+ .fileRename(this.state.currentPath, name, newName, this.state.currentSource)
438
+ .then((message) => {
439
+ this.state.activeElements = [];
440
+ this.status(message, true);
441
+ void this.loadingManager.loadItems();
442
+ })
443
+ .catch(this.status);
444
+ return;
445
+ }, this.i18n('type name'), name).bindDestruct(this);
446
+ }
447
+ }
448
+ onChooseItems() {
449
+ const act = this.stateManager.state.activeElements;
450
+ if (act.length) {
451
+ if (act[0].type === 'folder') {
452
+ this.state.currentPath =
453
+ this.state.currentPath + '/' + act[0].name;
454
+ this.state.currentSource = act[0].sourceName;
455
+ this.e.fire('afterOpenFolder.filebrowser');
456
+ return;
457
+ }
458
+ if (this.state.onSelectCallBack) {
459
+ this.stateManager.callSelectHandler();
460
+ }
461
+ else {
462
+ this.onOpenLightBox(act[0]);
463
+ }
464
+ }
465
+ }
466
+ onOpenLightBox(item) {
467
+ _ui_lightboox_lightbox__WEBPACK_IMPORTED_MODULE_19__/* .UILightBox.open */ .m.open(this, item, this.state.elements);
468
+ }
469
+ initUploader() {
470
+ const self = this, uploaderOptions = (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_4__.ConfigProto)(self.o.uploader || {}, jodit_config__WEBPACK_IMPORTED_MODULE_10__.Config.defaultOptions.uploader);
471
+ const uploadHandler = () => this.loadingManager.loadItems();
472
+ self.uploader = self.getInstance('Uploader', uploaderOptions);
473
+ self.uploader.bind(self.panel.container, uploadHandler, self.status);
474
+ self.e.on('bindUploader.filebrowser', (button) => {
475
+ self.uploader.bind(button, uploadHandler, self.status);
476
+ });
477
+ }
478
+ /** @override */
479
+ destruct() {
480
+ this.removeGlobalListeners();
481
+ this.header.destruct();
482
+ this.panel.destruct();
483
+ super.destruct();
484
+ }
485
+ fullFillOptions() {
486
+ const keys = [
487
+ 'getLocalFileByUrl',
488
+ 'crop',
489
+ 'resize',
490
+ 'create',
491
+ 'fileMove',
492
+ 'folderMove',
493
+ 'fileRename',
494
+ 'folderRename',
495
+ 'fileRemove',
496
+ 'folderRemove',
497
+ 'folder',
498
+ 'items',
499
+ 'permissions'
500
+ ];
501
+ keys.forEach((key) => {
502
+ if (this.options[key] != null) {
503
+ this.options[key] = (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_4__.ConfigProto)(this.options[key], this.o.ajax);
504
+ }
505
+ });
506
+ }
507
+ };
508
+ (0,tslib__WEBPACK_IMPORTED_MODULE_21__/* .__decorate */ .gn)([
509
+ jodit_core_decorators__WEBPACK_IMPORTED_MODULE_5__.autobind
510
+ ], FileBrowserPro.prototype, "status", null);
511
+ (0,tslib__WEBPACK_IMPORTED_MODULE_21__/* .__decorate */ .gn)([
512
+ jodit_core_decorators__WEBPACK_IMPORTED_MODULE_5__.cache
513
+ ], FileBrowserPro.prototype, "progressbar", null);
514
+ (0,tslib__WEBPACK_IMPORTED_MODULE_21__/* .__decorate */ .gn)([
515
+ (0,jodit_core_decorators__WEBPACK_IMPORTED_MODULE_5__.watch)(':resize', { context: window })
516
+ ], FileBrowserPro.prototype, "onResizeWindow", null);
517
+ (0,tslib__WEBPACK_IMPORTED_MODULE_21__/* .__decorate */ .gn)([
518
+ (0,jodit_core_decorators__WEBPACK_IMPORTED_MODULE_5__.watch)(['state.currentPath', 'state.currentSource'])
519
+ ], FileBrowserPro.prototype, "onChangePath", null);
520
+ (0,tslib__WEBPACK_IMPORTED_MODULE_21__/* .__decorate */ .gn)([
521
+ (0,jodit_core_decorators__WEBPACK_IMPORTED_MODULE_5__.watch)('state.theme')
522
+ ], FileBrowserPro.prototype, "onChangeTheme", null);
523
+ (0,tslib__WEBPACK_IMPORTED_MODULE_21__/* .__decorate */ .gn)([
524
+ (0,jodit_core_decorators__WEBPACK_IMPORTED_MODULE_5__.watch)(':toggleSettings.filebrowser')
525
+ ], FileBrowserPro.prototype, "onToggleSettings", null);
526
+ (0,tslib__WEBPACK_IMPORTED_MODULE_21__/* .__decorate */ .gn)([
527
+ jodit_core_decorators__WEBPACK_IMPORTED_MODULE_5__.autobind
528
+ ], FileBrowserPro.prototype, "onKeyPress", null);
529
+ (0,tslib__WEBPACK_IMPORTED_MODULE_21__/* .__decorate */ .gn)([
530
+ jodit_core_decorators__WEBPACK_IMPORTED_MODULE_5__.autobind
531
+ ], FileBrowserPro.prototype, "removeGlobalListeners", null);
532
+ (0,tslib__WEBPACK_IMPORTED_MODULE_21__/* .__decorate */ .gn)([
533
+ (0,jodit_core_decorators__WEBPACK_IMPORTED_MODULE_5__.watch)(':fileRemove.filebrowser')
534
+ ], FileBrowserPro.prototype, "onFileRemove", null);
535
+ (0,tslib__WEBPACK_IMPORTED_MODULE_21__/* .__decorate */ .gn)([
536
+ (0,jodit_core_decorators__WEBPACK_IMPORTED_MODULE_5__.watch)(':edit.filebrowser')
537
+ ], FileBrowserPro.prototype, "onFileEdit", null);
538
+ (0,tslib__WEBPACK_IMPORTED_MODULE_21__/* .__decorate */ .gn)([
539
+ (0,jodit_core_decorators__WEBPACK_IMPORTED_MODULE_5__.watch)(':folderRename.filebrowser')
540
+ ], FileBrowserPro.prototype, "onFolderRename", null);
541
+ (0,tslib__WEBPACK_IMPORTED_MODULE_21__/* .__decorate */ .gn)([
542
+ (0,jodit_core_decorators__WEBPACK_IMPORTED_MODULE_5__.watch)(':folderRemove.filebrowser')
543
+ ], FileBrowserPro.prototype, "onFolderRemove", null);
544
+ (0,tslib__WEBPACK_IMPORTED_MODULE_21__/* .__decorate */ .gn)([
545
+ (0,jodit_core_decorators__WEBPACK_IMPORTED_MODULE_5__.watch)(':folderCreate.filebrowser')
546
+ ], FileBrowserPro.prototype, "onFolderCreate", null);
547
+ (0,tslib__WEBPACK_IMPORTED_MODULE_21__/* .__decorate */ .gn)([
548
+ (0,jodit_core_decorators__WEBPACK_IMPORTED_MODULE_5__.watch)(':fileRename.filebrowser')
549
+ ], FileBrowserPro.prototype, "onFileRename", null);
550
+ (0,tslib__WEBPACK_IMPORTED_MODULE_21__/* .__decorate */ .gn)([
551
+ (0,jodit_core_decorators__WEBPACK_IMPORTED_MODULE_5__.watch)(':select.filebrowser')
552
+ ], FileBrowserPro.prototype, "onChooseItems", null);
553
+ (0,tslib__WEBPACK_IMPORTED_MODULE_21__/* .__decorate */ .gn)([
554
+ (0,jodit_core_decorators__WEBPACK_IMPORTED_MODULE_5__.watch)(':openLightBox.filebrowser')
555
+ ], FileBrowserPro.prototype, "onOpenLightBox", null);
556
+ FileBrowserPro = (0,tslib__WEBPACK_IMPORTED_MODULE_21__/* .__decorate */ .gn)([
557
+ jodit_core_decorators__WEBPACK_IMPORTED_MODULE_5__.component,
558
+ (0,jodit_core_decorators__WEBPACK_IMPORTED_MODULE_5__.derive)(jodit_core_traits__WEBPACK_IMPORTED_MODULE_13__/* .Dlgs */ .lf)
559
+ ], FileBrowserPro);
560
+ Object.defineProperty(_JoditPro__WEBPACK_IMPORTED_MODULE_17__/* .JoditPro.modules */ .y.modules, 'FileBrowserPro', {
561
+ value: FileBrowserPro,
562
+ writable: false,
563
+ enumerable: true,
564
+ configurable: true
565
+ });
566
+
567
+
568
+ /***/ }),
569
+
570
+ /***/ 99993:
571
+ /***/ (function(__unused_webpack_module, __unused_webpack___webpack_exports__, __webpack_require__) {
572
+
573
+ "use strict";
574
+ /* harmony import */ var jodit_config__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(77628);
575
+ /* harmony import */ var jodit_core_global__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(81160);
576
+ /*!
577
+ * Jodit Editor PRO (https://xdsoft.net/jodit/)
578
+ * See LICENSE.md in the project root for license information.
579
+ * Copyright (c) 2013-2023 Valeriy Chupurnov. All rights reserved. https://xdsoft.net/jodit/pro/
580
+ */
581
+
582
+
583
+ (0,jodit_core_global__WEBPACK_IMPORTED_MODULE_1__/* .extendLang */ .xl)(__webpack_require__(57591));
584
+ const fb = jodit_config__WEBPACK_IMPORTED_MODULE_0__.Config.prototype.controls.filebrowser;
585
+ fb.settings = {
586
+ icon: 'settings',
587
+ tooltip: 'Settings',
588
+ exec: (editor) => {
589
+ var _a;
590
+ const view = (_a = editor.parent) !== null && _a !== void 0 ? _a : editor;
591
+ view.e.fire('toggleSettings.filebrowser');
592
+ }
593
+ };
594
+ fb.home = {
595
+ icon: 'home',
596
+ tooltip: 'Home',
597
+ exec: (editor) => {
598
+ editor.e.fire('goHome.filebrowser');
599
+ }
600
+ };
601
+ fb.preview = {
602
+ icon: 'eye',
603
+ tooltip: 'Preview',
604
+ isDisabled(fb) {
605
+ return fb.state.activeElements.length === 0;
606
+ },
607
+ exec: (editor) => {
608
+ editor.e.fire('togglePreview.filebrowser');
609
+ }
610
+ };
611
+ fb.next = {
612
+ icon: 'angle-right',
613
+ tooltip: 'History next',
614
+ isDisabled: (browser) => !browser.historyManager.canNext(),
615
+ exec: (editor) => {
616
+ editor.historyManager.next();
617
+ }
618
+ };
619
+ fb.previous = {
620
+ icon: 'angle-left',
621
+ tooltip: 'History previous',
622
+ isDisabled: (browser) => !browser.historyManager.canPrevious(),
623
+ exec: (editor) => {
624
+ editor.historyManager.previous();
625
+ }
626
+ };
627
+ fb['new-folder'] = {
628
+ icon: 'new-folder',
629
+ exec: (editor) => {
630
+ editor.e.fire('folderCreate.filebrowser', {
631
+ path: editor.state.currentPath,
632
+ sourceName: editor.state.currentSource
633
+ });
634
+ },
635
+ tooltip: 'New folder'
636
+ };
637
+ Object.assign(jodit_config__WEBPACK_IMPORTED_MODULE_0__.Config.prototype.filebrowser, {
638
+ buttons: [
639
+ 'filebrowser.home',
640
+ 'filebrowser.previous',
641
+ 'filebrowser.next',
642
+ '|',
643
+ 'filebrowser.upload',
644
+ 'filebrowser.new-folder',
645
+ 'filebrowser.remove',
646
+ 'filebrowser.update',
647
+ 'filebrowser.select',
648
+ 'filebrowser.edit',
649
+ '|',
650
+ 'filebrowser.preview',
651
+ 'about'
652
+ ],
653
+ sort: false,
654
+ pixelOffsetLoadNewChunk: 300,
655
+ width: 800,
656
+ height: 400,
657
+ previewOfficeURL: 'https://view.officeapps.live.com/op/view.aspx?src='
658
+ });
659
+
660
+
661
+ /***/ }),
662
+
663
+ /***/ 48531:
664
+ /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
665
+
666
+ "use strict";
667
+ __webpack_require__.r(__webpack_exports__);
668
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, {
669
+ /* harmony export */ "finder": function() { return /* binding */ finder; }
670
+ /* harmony export */ });
671
+ /* harmony import */ var jodit_core_plugin__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(7324);
672
+ /* harmony import */ var _browser__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(68813);
673
+ /* harmony import */ var _JoditPro__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(88292);
674
+ /* harmony import */ var _config__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(99993);
675
+ /*!
676
+ * Jodit Editor PRO (https://xdsoft.net/jodit/)
677
+ * See LICENSE.md in the project root for license information.
678
+ * Copyright (c) 2013-2023 Valeriy Chupurnov. All rights reserved. https://xdsoft.net/jodit/pro/
679
+ */
680
+
681
+
682
+
683
+
684
+ class finder extends jodit_core_plugin__WEBPACK_IMPORTED_MODULE_0__/* .Plugin */ .S {
685
+ constructor() {
686
+ super(...arguments);
687
+ /** @override */
688
+ this.hasStyle = !_JoditPro__WEBPACK_IMPORTED_MODULE_2__/* .JoditPro.fatMode */ .y.fatMode;
689
+ }
690
+ /** @override */
691
+ afterInit(jodit) {
692
+ jodit.e.on('getInstanceFileBrowser', (options) => {
693
+ if (!this.__instance) {
694
+ this.__instance = new _browser__WEBPACK_IMPORTED_MODULE_1__/* .FileBrowserPro */ .X(options);
695
+ }
696
+ return this.__instance;
697
+ });
698
+ }
699
+ /** @override */
700
+ beforeDestruct(jodit) {
701
+ var _a;
702
+ jodit.e.off('getInstanceFileBrowser');
703
+ (_a = this.__instance) === null || _a === void 0 ? void 0 : _a.destruct();
704
+ }
705
+ }
706
+ /** @override */
707
+ finder.requires = ['license'];
708
+ _JoditPro__WEBPACK_IMPORTED_MODULE_2__/* .JoditPro.plugins.add */ .y.plugins.add('finder', finder);
709
+
710
+
711
+ /***/ }),
712
+
713
+ /***/ 63052:
714
+ /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
715
+
716
+ "use strict";
717
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, {
718
+ /* harmony export */ "z": function() { return /* binding */ ContextMenuManager; }
719
+ /* harmony export */ });
720
+ /* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(97582);
721
+ /* harmony import */ var jodit_modules_file_browser_factories__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(3028);
722
+ /* harmony import */ var jodit_core_component__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(22562);
723
+ /* harmony import */ var jodit_core_decorators__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(50526);
724
+ /*!
725
+ * Jodit Editor PRO (https://xdsoft.net/jodit/)
726
+ * See LICENSE.md in the project root for license information.
727
+ * Copyright (c) 2013-2023 Valeriy Chupurnov. All rights reserved. https://xdsoft.net/jodit/pro/
728
+ */
729
+
730
+
731
+
732
+
733
+ let ContextMenuManager = class ContextMenuManager extends jodit_core_component__WEBPACK_IMPORTED_MODULE_1__/* .ViewComponent */ .Hr {
734
+ /** @override */
735
+ className() {
736
+ return 'ContextMenuManager';
737
+ }
738
+ onFolderContext(item, e) {
739
+ this.buildContextItemMenu(this.getFolderContextActions(item), e);
740
+ return false;
741
+ }
742
+ onItemContext(item, _, e) {
743
+ this.buildContextItemMenu(this.getItemContextActions(item), e);
744
+ return false;
745
+ }
746
+ onSourceContext(item, e) {
747
+ this.buildContextItemMenu(this.getSourceContextActions(item), e);
748
+ return false;
749
+ }
750
+ buildContextItemMenu(actions, e) {
751
+ if (!this.j.o.contextMenu) {
752
+ return;
753
+ }
754
+ const context = (0,jodit_modules_file_browser_factories__WEBPACK_IMPORTED_MODULE_0__/* .makeContextMenu */ .L)(this.j).setMod('theme', this.j.state.theme);
755
+ context.show(e.clientX, e.clientY, actions.filter((a) => a && a.enabled !== false));
756
+ this.j.e.on(this.j, 'afterClose', () => {
757
+ if (context.isOpened) {
758
+ context.close();
759
+ }
760
+ });
761
+ }
762
+ getItemContextActions(item) {
763
+ if (!this.j.stateManager.isActive(item)) {
764
+ this.j.stateManager.addActive(item, this.j.state.activeElements.length > 1);
765
+ }
766
+ if (item.type === 'folder') {
767
+ return this.getFolderContextActions({
768
+ type: 'directory',
769
+ children: [],
770
+ name: item.name || '',
771
+ path: item.path,
772
+ sourceName: item.sourceName
773
+ });
774
+ }
775
+ const opt = this.j.options, dp = this.j.dataProvider, single = this.j.state.activeElements.length === 1;
776
+ return [
777
+ {
778
+ icon: 'pencil',
779
+ title: 'Edit',
780
+ enabled: Boolean(item.isImage) &&
781
+ opt.editImage &&
782
+ single &&
783
+ (dp.canI('ImageResize') || dp.canI('ImageCrop')),
784
+ exec: () => {
785
+ this.j.e.fire('edit.filebrowser');
786
+ }
787
+ },
788
+ {
789
+ icon: 'italic',
790
+ title: 'Rename',
791
+ enabled: dp.canI('FileRename') && single,
792
+ exec: () => this.j.e.fire('fileRename.filebrowser', item)
793
+ },
794
+ {
795
+ icon: 'bin',
796
+ title: 'Delete',
797
+ enabled: dp.canI('FileRemove'),
798
+ exec: () => this.j.e.fire('fileRemove.filebrowser', item)
799
+ },
800
+ {
801
+ icon: 'eye',
802
+ title: 'Preview',
803
+ enabled: Boolean(item.isImage || item.type === 'file') &&
804
+ opt.preview &&
805
+ single,
806
+ exec: () => this.j.e.fire('openLightBox.filebrowser', item)
807
+ },
808
+ {
809
+ icon: 'upload',
810
+ title: 'Download',
811
+ exec: () => {
812
+ // TODO Replace to download action
813
+ if (item.fileURL) {
814
+ this.j.ow.open(item.fileURL);
815
+ }
816
+ }
817
+ }
818
+ ];
819
+ }
820
+ getFolderContextActions(item) {
821
+ const dp = this.j.dataProvider;
822
+ return [
823
+ {
824
+ icon: 'pencil',
825
+ title: 'Rename',
826
+ exec: () => {
827
+ this.j.e.fire('folderRename.filebrowser', item);
828
+ },
829
+ enabled: dp.canI('FolderRename')
830
+ },
831
+ {
832
+ icon: 'bin',
833
+ title: 'Delete',
834
+ exec: () => {
835
+ this.j.e.fire('folderRemove.filebrowser', item);
836
+ },
837
+ enabled: dp.canI('FolderRemove')
838
+ },
839
+ {
840
+ icon: 'plus',
841
+ title: 'Add folder',
842
+ exec: () => {
843
+ this.j.e.fire('folderCreate.filebrowser', item);
844
+ },
845
+ enabled: dp.canI('FolderCreate')
846
+ }
847
+ ];
848
+ }
849
+ getSourceContextActions(item) {
850
+ return [
851
+ {
852
+ icon: 'plus',
853
+ title: 'Create folder',
854
+ exec: () => {
855
+ this.j.e.fire('folderCreate.filebrowser', item);
856
+ }
857
+ }
858
+ ];
859
+ }
860
+ };
861
+ (0,tslib__WEBPACK_IMPORTED_MODULE_3__/* .__decorate */ .gn)([
862
+ (0,jodit_core_decorators__WEBPACK_IMPORTED_MODULE_2__.watch)(':contextmenuFolder.filebrowser')
863
+ ], ContextMenuManager.prototype, "onFolderContext", null);
864
+ (0,tslib__WEBPACK_IMPORTED_MODULE_3__/* .__decorate */ .gn)([
865
+ (0,jodit_core_decorators__WEBPACK_IMPORTED_MODULE_2__.watch)(':contextmenuItem.filebrowser')
866
+ ], ContextMenuManager.prototype, "onItemContext", null);
867
+ (0,tslib__WEBPACK_IMPORTED_MODULE_3__/* .__decorate */ .gn)([
868
+ (0,jodit_core_decorators__WEBPACK_IMPORTED_MODULE_2__.watch)(':contextmenuSource.filebrowser')
869
+ ], ContextMenuManager.prototype, "onSourceContext", null);
870
+ ContextMenuManager = (0,tslib__WEBPACK_IMPORTED_MODULE_3__/* .__decorate */ .gn)([
871
+ jodit_core_decorators__WEBPACK_IMPORTED_MODULE_2__.component
872
+ ], ContextMenuManager);
873
+
874
+
875
+ /***/ }),
876
+
877
+ /***/ 70467:
878
+ /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
879
+
880
+ "use strict";
881
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, {
882
+ /* harmony export */ "C": function() { return /* binding */ parentPath; }
883
+ /* harmony export */ });
884
+ /*!
885
+ * Jodit Editor PRO (https://xdsoft.net/jodit/)
886
+ * See LICENSE.md in the project root for license information.
887
+ * Copyright (c) 2013-2023 Valeriy Chupurnov. All rights reserved. https://xdsoft.net/jodit/pro/
888
+ */
889
+ const parentPath = (path) => {
890
+ const parts = path.split('/').filter((p) => p.length);
891
+ parts.pop();
892
+ return parts.join('/') || '/';
893
+ };
894
+
895
+
896
+ /***/ }),
897
+
898
+ /***/ 9581:
899
+ /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
900
+
901
+ "use strict";
902
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, {
903
+ /* harmony export */ "E": function() { return /* binding */ HistoryManager; }
904
+ /* harmony export */ });
905
+ /* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(97582);
906
+ /* harmony import */ var jodit_core_helpers__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(95582);
907
+ /* harmony import */ var jodit_core_component__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(22562);
908
+ /* harmony import */ var jodit_core_decorators__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(50526);
909
+ /*!
910
+ * Jodit Editor PRO (https://xdsoft.net/jodit/)
911
+ * See LICENSE.md in the project root for license information.
912
+ * Copyright (c) 2013-2023 Valeriy Chupurnov. All rights reserved. https://xdsoft.net/jodit/pro/
913
+ */
914
+
915
+
916
+
917
+
918
+ let HistoryManager = class HistoryManager extends jodit_core_component__WEBPACK_IMPORTED_MODULE_1__/* .ViewComponent */ .Hr {
919
+ /** @override */
920
+ className() {
921
+ return 'HistoryManager';
922
+ }
923
+ constructor(jodit, state) {
924
+ super(jodit);
925
+ this.state = state;
926
+ this.history = [];
927
+ this.historyIndex = 0;
928
+ }
929
+ canNext() {
930
+ return this.historyIndex < this.history.length - 1;
931
+ }
932
+ canPrevious() {
933
+ return this.historyIndex > 0;
934
+ }
935
+ push(item) {
936
+ let { historyIndex } = this;
937
+ const current = this.history[historyIndex];
938
+ if (current &&
939
+ current.currentSource === item.currentSource &&
940
+ current.currentPath === item.currentPath) {
941
+ return;
942
+ }
943
+ let history = [...this.history];
944
+ if (history.length - 1 !== historyIndex) {
945
+ history = history.slice(0, historyIndex + 1);
946
+ }
947
+ history.push(item);
948
+ if (current) {
949
+ historyIndex += 1;
950
+ }
951
+ this.history = history;
952
+ this.historyIndex = historyIndex;
953
+ }
954
+ next() {
955
+ if (this.canNext()) {
956
+ this.historyIndex += 1;
957
+ this.updateState();
958
+ }
959
+ }
960
+ previous() {
961
+ if (this.canPrevious()) {
962
+ this.historyIndex -= 1;
963
+ this.updateState();
964
+ }
965
+ }
966
+ updateCurrent() {
967
+ this.history[this.historyIndex] = {
968
+ currentSource: this.state.currentSource,
969
+ currentPath: this.state.currentPath,
970
+ tree: (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_0__.fastClone)(this.state.tree),
971
+ elements: [...this.state.elements]
972
+ };
973
+ }
974
+ onHome() {
975
+ this.state.currentPath = '';
976
+ this.state.currentSource = '';
977
+ this.j.e.fire('afterOpenFolder.filebrowser update.filebrowser');
978
+ }
979
+ onOpenFolder() {
980
+ this.push({
981
+ tree: [],
982
+ elements: [],
983
+ currentPath: this.state.currentPath,
984
+ currentSource: this.state.currentSource
985
+ });
986
+ this.j.e.fire('changeSelection');
987
+ }
988
+ updateState() {
989
+ const { tree, elements, currentSource, currentPath } = this.history[this.historyIndex];
990
+ this.state.activeElements = [];
991
+ this.state.elements = [...elements];
992
+ this.state.tree = [...tree];
993
+ this.state.currentSource = currentSource;
994
+ this.state.currentPath = currentPath;
995
+ this.j.e.fire('changeSelection');
996
+ }
997
+ };
998
+ (0,tslib__WEBPACK_IMPORTED_MODULE_3__/* .__decorate */ .gn)([
999
+ (0,jodit_core_decorators__WEBPACK_IMPORTED_MODULE_2__.watch)(['state.elements', 'state.tree'])
1000
+ ], HistoryManager.prototype, "updateCurrent", null);
1001
+ (0,tslib__WEBPACK_IMPORTED_MODULE_3__/* .__decorate */ .gn)([
1002
+ (0,jodit_core_decorators__WEBPACK_IMPORTED_MODULE_2__.watch)(':goHome.filebrowser')
1003
+ ], HistoryManager.prototype, "onHome", null);
1004
+ (0,tslib__WEBPACK_IMPORTED_MODULE_3__/* .__decorate */ .gn)([
1005
+ (0,jodit_core_decorators__WEBPACK_IMPORTED_MODULE_2__.watch)(':afterOpenFolder.filebrowser')
1006
+ ], HistoryManager.prototype, "onOpenFolder", null);
1007
+ HistoryManager = (0,tslib__WEBPACK_IMPORTED_MODULE_3__/* .__decorate */ .gn)([
1008
+ jodit_core_decorators__WEBPACK_IMPORTED_MODULE_2__.component
1009
+ ], HistoryManager);
1010
+
1011
+
1012
+ /***/ }),
1013
+
1014
+ /***/ 48086:
1015
+ /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
1016
+
1017
+ "use strict";
1018
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, {
1019
+ /* harmony export */ "l": function() { return /* binding */ LoadingManager; }
1020
+ /* harmony export */ });
1021
+ /* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(97582);
1022
+ /* harmony import */ var jodit_core_component__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(22562);
1023
+ /* harmony import */ var jodit_core_decorators__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(50526);
1024
+ /*!
1025
+ * Jodit Editor PRO (https://xdsoft.net/jodit/)
1026
+ * See LICENSE.md in the project root for license information.
1027
+ * Copyright (c) 2013-2023 Valeriy Chupurnov. All rights reserved. https://xdsoft.net/jodit/pro/
1028
+ */
1029
+
1030
+
1031
+
1032
+ let LoadingManager = class LoadingManager extends jodit_core_component__WEBPACK_IMPORTED_MODULE_0__/* .ViewComponent */ .Hr {
1033
+ /** @override */
1034
+ className() {
1035
+ return 'LoadingManager';
1036
+ }
1037
+ /** @override */
1038
+ constructor(jodit, state) {
1039
+ super(jodit);
1040
+ this.state = state;
1041
+ this.__tick = 0;
1042
+ this.offset = 0;
1043
+ this.countInOneChunk = 20;
1044
+ this.stopLoadingParts = false;
1045
+ this.__isLoadingPart = false;
1046
+ this.__callQueueCount = 0;
1047
+ }
1048
+ onUpdateFileBrowser() {
1049
+ return (0,tslib__WEBPACK_IMPORTED_MODULE_2__/* .__awaiter */ .mG)(this, void 0, void 0, function* () {
1050
+ this.state.activeElements = [];
1051
+ this.j.panel.setMod('loading', true);
1052
+ yield Promise.all([this.loadFolders(), this.loadItems()]);
1053
+ this.j.panel.setMod('loading', false);
1054
+ });
1055
+ }
1056
+ loadFolders() {
1057
+ return (0,tslib__WEBPACK_IMPORTED_MODULE_2__/* .__awaiter */ .mG)(this, void 0, void 0, function* () {
1058
+ if (!this.j.isOpened) {
1059
+ return;
1060
+ }
1061
+ const { currentPath, currentSource } = this.state;
1062
+ try {
1063
+ const sources = yield this.j.dataProvider.tree(currentPath, currentSource);
1064
+ this.j.stateManager.fillTreeForPath(sources, currentPath);
1065
+ this.state.sources = sources;
1066
+ }
1067
+ catch (e) {
1068
+ this.j.status(e);
1069
+ }
1070
+ });
1071
+ }
1072
+ loadItems() {
1073
+ return (0,tslib__WEBPACK_IMPORTED_MODULE_2__/* .__awaiter */ .mG)(this, void 0, void 0, function* () {
1074
+ if (!this.j.isOpened) {
1075
+ return;
1076
+ }
1077
+ try {
1078
+ this.__tick += 1;
1079
+ const { __tick } = this;
1080
+ this.offset = 0;
1081
+ this.stopLoadingParts = false;
1082
+ this.__callQueueCount = 0;
1083
+ const { items, loadedTotal } = yield loadPartItems(this.state, this.j.dataProvider, this.offset, this.countInOneChunk);
1084
+ this.state.elements = items;
1085
+ this.stopLoadingParts = loadedTotal < this.countInOneChunk;
1086
+ yield this.loadItemsChunk(__tick);
1087
+ yield this.async.requestIdlePromise();
1088
+ if (this.__tick !== __tick) {
1089
+ return;
1090
+ }
1091
+ while (!this.stopLoadingParts &&
1092
+ this.j.panel.countInColumn * this.j.panel.countInRow >=
1093
+ this.state.elements.length) {
1094
+ yield this.loadItemsChunk(__tick);
1095
+ if (this.__tick !== __tick) {
1096
+ return;
1097
+ }
1098
+ }
1099
+ }
1100
+ catch (e) {
1101
+ this.j.status(e);
1102
+ }
1103
+ });
1104
+ }
1105
+ __loadItemsChunk(tick) {
1106
+ return (0,tslib__WEBPACK_IMPORTED_MODULE_2__/* .__awaiter */ .mG)(this, void 0, void 0, function* () {
1107
+ if (this.__isLoadingPart) {
1108
+ this.__callQueueCount += 1;
1109
+ return;
1110
+ }
1111
+ if (this.stopLoadingParts) {
1112
+ this.__callQueueCount = 0;
1113
+ return;
1114
+ }
1115
+ this.__isLoadingPart = true;
1116
+ this.j.panel.items.setMod('chunk-loading', true);
1117
+ try {
1118
+ this.offset += this.countInOneChunk;
1119
+ const { items, loadedTotal } = yield loadPartItems(this.state, this.j.dataProvider, this.offset, this.countInOneChunk);
1120
+ if (this.__tick !== tick) {
1121
+ return;
1122
+ }
1123
+ this.stopLoadingParts = loadedTotal < this.countInOneChunk;
1124
+ if (items.length) {
1125
+ this.state.elements = this.state.elements.concat(items);
1126
+ }
1127
+ }
1128
+ catch (e) {
1129
+ this.j.status(e);
1130
+ }
1131
+ this.j.panel.items.setMod('chunk-loading', false);
1132
+ this.__isLoadingPart = false;
1133
+ if (this.__callQueueCount > 0) {
1134
+ this.__callQueueCount -= 1;
1135
+ return this.__loadItemsChunk(tick);
1136
+ }
1137
+ });
1138
+ }
1139
+ loadItemsChunk(tick = this.__tick) {
1140
+ if (tick !== this.__tick) {
1141
+ return Promise.resolve();
1142
+ }
1143
+ return this.__loadItemsChunk(tick);
1144
+ }
1145
+ };
1146
+ (0,tslib__WEBPACK_IMPORTED_MODULE_2__/* .__decorate */ .gn)([
1147
+ (0,jodit_core_decorators__WEBPACK_IMPORTED_MODULE_1__.watch)(':update.filebrowser')
1148
+ ], LoadingManager.prototype, "onUpdateFileBrowser", null);
1149
+ (0,tslib__WEBPACK_IMPORTED_MODULE_2__/* .__decorate */ .gn)([
1150
+ (0,jodit_core_decorators__WEBPACK_IMPORTED_MODULE_1__.watch)(['state.currentPath', 'state.currentSource']),
1151
+ (0,jodit_core_decorators__WEBPACK_IMPORTED_MODULE_1__.debounce)((ctx) => ({
1152
+ timeout: ctx.defaultTimeout,
1153
+ promisify: true
1154
+ }))
1155
+ ], LoadingManager.prototype, "loadFolders", null);
1156
+ (0,tslib__WEBPACK_IMPORTED_MODULE_2__/* .__decorate */ .gn)([
1157
+ (0,jodit_core_decorators__WEBPACK_IMPORTED_MODULE_1__.watch)([
1158
+ 'state.currentPath',
1159
+ 'state.currentSource',
1160
+ 'state.sortBy',
1161
+ 'state.onlyImages',
1162
+ 'state.foldersPosition',
1163
+ 'state.filterWord'
1164
+ ]),
1165
+ (0,jodit_core_decorators__WEBPACK_IMPORTED_MODULE_1__.debounce)((ctx) => ({
1166
+ timeout: ctx.defaultTimeout,
1167
+ promisify: true
1168
+ }))
1169
+ ], LoadingManager.prototype, "loadItems", null);
1170
+ (0,tslib__WEBPACK_IMPORTED_MODULE_2__/* .__decorate */ .gn)([
1171
+ (0,jodit_core_decorators__WEBPACK_IMPORTED_MODULE_1__.debounce)((ctx) => ({
1172
+ timeout: ctx.defaultTimeout,
1173
+ promisify: true
1174
+ }))
1175
+ ], LoadingManager.prototype, "loadItemsChunk", null);
1176
+ LoadingManager = (0,tslib__WEBPACK_IMPORTED_MODULE_2__/* .__decorate */ .gn)([
1177
+ jodit_core_decorators__WEBPACK_IMPORTED_MODULE_1__.component
1178
+ ], LoadingManager);
1179
+ function loadPartItems(state, dataProvider, offset, limit) {
1180
+ const { currentPath, currentSource, sortBy, withFolders, foldersPosition, onlyImages, filterWord } = state;
1181
+ return dataProvider.itemsEx(currentPath, currentSource, {
1182
+ offset,
1183
+ limit,
1184
+ sortBy,
1185
+ withFolders,
1186
+ foldersPosition,
1187
+ onlyImages,
1188
+ filterWord
1189
+ });
1190
+ }
1191
+
1192
+
1193
+ /***/ }),
1194
+
1195
+ /***/ 93469:
1196
+ /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
1197
+
1198
+ "use strict";
1199
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, {
1200
+ /* harmony export */ "h": function() { return /* binding */ PersistentStore; }
1201
+ /* harmony export */ });
1202
+ /* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(97582);
1203
+ /* harmony import */ var jodit_core_component__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(22562);
1204
+ /* harmony import */ var jodit_core_decorators__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(50526);
1205
+ /* harmony import */ var jodit_modules_file_browser_builders_item__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(45545);
1206
+
1207
+
1208
+
1209
+
1210
+ let PersistentStore = class PersistentStore extends jodit_core_component__WEBPACK_IMPORTED_MODULE_0__/* .ViewComponent */ .Hr {
1211
+ /** @override */
1212
+ className() {
1213
+ return 'PersistentStore';
1214
+ }
1215
+ constructor(jodit, state) {
1216
+ super(jodit);
1217
+ this.state = state;
1218
+ this.sortBy = 'changed-desc';
1219
+ this.view = 'tiles';
1220
+ this.foldersPosition = 'top';
1221
+ this.tileSize = 'default';
1222
+ this.favorites = [];
1223
+ this.showSideBar = true;
1224
+ this.showPreview = false;
1225
+ this.showFavorites = true;
1226
+ }
1227
+ onChangeThemeSetField() {
1228
+ this.theme = this.state.theme;
1229
+ }
1230
+ onChangeView() {
1231
+ this.view = this.state.view;
1232
+ }
1233
+ onChangeSortBy() {
1234
+ this.sortBy = this.state.sortBy;
1235
+ }
1236
+ onChangeTileSize() {
1237
+ this.tileSize = this.state.tileSize;
1238
+ }
1239
+ onChangeFavorites() {
1240
+ this.favorites = this.state.favorites;
1241
+ }
1242
+ onChangeShowSideBar() {
1243
+ this.showSideBar = this.state.showSideBar;
1244
+ }
1245
+ onChangeShowPreview() {
1246
+ this.showPreview = this.state.showPreview;
1247
+ }
1248
+ onChangeShowFavorites() {
1249
+ this.showFavorites = this.state.showFavorites;
1250
+ }
1251
+ onChangeFoldersPosition() {
1252
+ this.foldersPosition = this.state.foldersPosition;
1253
+ }
1254
+ syncWithState() {
1255
+ this.state.tileSize = this.tileSize;
1256
+ this.state.favorites = this.favorites.map((item) => {
1257
+ if (item instanceof jodit_modules_file_browser_builders_item__WEBPACK_IMPORTED_MODULE_2__/* .FileBrowserItem */ .Z) {
1258
+ return item;
1259
+ }
1260
+ return jodit_modules_file_browser_builders_item__WEBPACK_IMPORTED_MODULE_2__/* .FileBrowserItem.create */ .Z.create(item);
1261
+ });
1262
+ this.state.view = this.view;
1263
+ this.state.theme = this.theme;
1264
+ this.state.showSideBar = this.showSideBar;
1265
+ this.state.showPreview = this.showPreview;
1266
+ this.state.showFavorites = this.showFavorites;
1267
+ this.state.sortBy = this.sortBy;
1268
+ this.state.foldersPosition = this.foldersPosition;
1269
+ }
1270
+ };
1271
+ (0,tslib__WEBPACK_IMPORTED_MODULE_3__/* .__decorate */ .gn)([
1272
+ jodit_core_decorators__WEBPACK_IMPORTED_MODULE_1__.persistent
1273
+ ], PersistentStore.prototype, "theme", void 0);
1274
+ (0,tslib__WEBPACK_IMPORTED_MODULE_3__/* .__decorate */ .gn)([
1275
+ jodit_core_decorators__WEBPACK_IMPORTED_MODULE_1__.persistent
1276
+ ], PersistentStore.prototype, "sortBy", void 0);
1277
+ (0,tslib__WEBPACK_IMPORTED_MODULE_3__/* .__decorate */ .gn)([
1278
+ jodit_core_decorators__WEBPACK_IMPORTED_MODULE_1__.persistent
1279
+ ], PersistentStore.prototype, "view", void 0);
1280
+ (0,tslib__WEBPACK_IMPORTED_MODULE_3__/* .__decorate */ .gn)([
1281
+ jodit_core_decorators__WEBPACK_IMPORTED_MODULE_1__.persistent
1282
+ ], PersistentStore.prototype, "foldersPosition", void 0);
1283
+ (0,tslib__WEBPACK_IMPORTED_MODULE_3__/* .__decorate */ .gn)([
1284
+ jodit_core_decorators__WEBPACK_IMPORTED_MODULE_1__.persistent
1285
+ ], PersistentStore.prototype, "tileSize", void 0);
1286
+ (0,tslib__WEBPACK_IMPORTED_MODULE_3__/* .__decorate */ .gn)([
1287
+ jodit_core_decorators__WEBPACK_IMPORTED_MODULE_1__.persistent
1288
+ ], PersistentStore.prototype, "favorites", void 0);
1289
+ (0,tslib__WEBPACK_IMPORTED_MODULE_3__/* .__decorate */ .gn)([
1290
+ jodit_core_decorators__WEBPACK_IMPORTED_MODULE_1__.persistent
1291
+ ], PersistentStore.prototype, "showSideBar", void 0);
1292
+ (0,tslib__WEBPACK_IMPORTED_MODULE_3__/* .__decorate */ .gn)([
1293
+ jodit_core_decorators__WEBPACK_IMPORTED_MODULE_1__.persistent
1294
+ ], PersistentStore.prototype, "showPreview", void 0);
1295
+ (0,tslib__WEBPACK_IMPORTED_MODULE_3__/* .__decorate */ .gn)([
1296
+ jodit_core_decorators__WEBPACK_IMPORTED_MODULE_1__.persistent
1297
+ ], PersistentStore.prototype, "showFavorites", void 0);
1298
+ (0,tslib__WEBPACK_IMPORTED_MODULE_3__/* .__decorate */ .gn)([
1299
+ (0,jodit_core_decorators__WEBPACK_IMPORTED_MODULE_1__.watch)('state.theme')
1300
+ ], PersistentStore.prototype, "onChangeThemeSetField", null);
1301
+ (0,tslib__WEBPACK_IMPORTED_MODULE_3__/* .__decorate */ .gn)([
1302
+ (0,jodit_core_decorators__WEBPACK_IMPORTED_MODULE_1__.watch)('state.view')
1303
+ ], PersistentStore.prototype, "onChangeView", null);
1304
+ (0,tslib__WEBPACK_IMPORTED_MODULE_3__/* .__decorate */ .gn)([
1305
+ (0,jodit_core_decorators__WEBPACK_IMPORTED_MODULE_1__.watch)('state.sortBy')
1306
+ ], PersistentStore.prototype, "onChangeSortBy", null);
1307
+ (0,tslib__WEBPACK_IMPORTED_MODULE_3__/* .__decorate */ .gn)([
1308
+ (0,jodit_core_decorators__WEBPACK_IMPORTED_MODULE_1__.watch)('state.tileSize')
1309
+ ], PersistentStore.prototype, "onChangeTileSize", null);
1310
+ (0,tslib__WEBPACK_IMPORTED_MODULE_3__/* .__decorate */ .gn)([
1311
+ (0,jodit_core_decorators__WEBPACK_IMPORTED_MODULE_1__.watch)('state.favorites')
1312
+ ], PersistentStore.prototype, "onChangeFavorites", null);
1313
+ (0,tslib__WEBPACK_IMPORTED_MODULE_3__/* .__decorate */ .gn)([
1314
+ (0,jodit_core_decorators__WEBPACK_IMPORTED_MODULE_1__.watch)('state.showSideBar')
1315
+ ], PersistentStore.prototype, "onChangeShowSideBar", null);
1316
+ (0,tslib__WEBPACK_IMPORTED_MODULE_3__/* .__decorate */ .gn)([
1317
+ (0,jodit_core_decorators__WEBPACK_IMPORTED_MODULE_1__.watch)('state.showPreview')
1318
+ ], PersistentStore.prototype, "onChangeShowPreview", null);
1319
+ (0,tslib__WEBPACK_IMPORTED_MODULE_3__/* .__decorate */ .gn)([
1320
+ (0,jodit_core_decorators__WEBPACK_IMPORTED_MODULE_1__.watch)('state.showFavorites')
1321
+ ], PersistentStore.prototype, "onChangeShowFavorites", null);
1322
+ (0,tslib__WEBPACK_IMPORTED_MODULE_3__/* .__decorate */ .gn)([
1323
+ (0,jodit_core_decorators__WEBPACK_IMPORTED_MODULE_1__.watch)('state.foldersPosition')
1324
+ ], PersistentStore.prototype, "onChangeFoldersPosition", null);
1325
+ PersistentStore = (0,tslib__WEBPACK_IMPORTED_MODULE_3__/* .__decorate */ .gn)([
1326
+ jodit_core_decorators__WEBPACK_IMPORTED_MODULE_1__.component
1327
+ ], PersistentStore);
1328
+
1329
+
1330
+ /***/ }),
1331
+
1332
+ /***/ 83568:
1333
+ /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
1334
+
1335
+ "use strict";
1336
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, {
1337
+ /* harmony export */ "O": function() { return /* binding */ StateManager; }
1338
+ /* harmony export */ });
1339
+ /* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(97582);
1340
+ /* harmony import */ var jodit_core_decorators__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(50526);
1341
+ /*!
1342
+ * Jodit Editor PRO (https://xdsoft.net/jodit/)
1343
+ * See LICENSE.md in the project root for license information.
1344
+ * Copyright (c) 2013-2023 Valeriy Chupurnov. All rights reserved. https://xdsoft.net/jodit/pro/
1345
+ */
1346
+
1347
+
1348
+ class StateManager {
1349
+ constructor(state) {
1350
+ this.state = state;
1351
+ }
1352
+ getIndex(elm, elms = this.state.elements) {
1353
+ return elms.findIndex((item) => item.uniqueHashKey === elm.uniqueHashKey);
1354
+ }
1355
+ isActive(item) {
1356
+ return Boolean(this.state.activeElements.find((data) => data.uniqueHashKey === item.uniqueHashKey));
1357
+ }
1358
+ isFavorite(item) {
1359
+ return Boolean(this.state.favorites.find((data) => data.uniqueHashKey === item.uniqueHashKey));
1360
+ }
1361
+ addActive(item, multi) {
1362
+ var _a;
1363
+ this.state.metaInfo = item;
1364
+ this.state.info = (_a = item.file) !== null && _a !== void 0 ? _a : '';
1365
+ this.state.lastSelectedIndex = this.getIndex(item);
1366
+ this.state.activeElements = multi
1367
+ ? [...this.state.activeElements, item]
1368
+ : [item];
1369
+ }
1370
+ callSelectHandler() {
1371
+ var _a;
1372
+ const act = this.state.activeElements;
1373
+ (_a = this.state.onSelectCallBack) === null || _a === void 0 ? void 0 : _a.call(this, {
1374
+ baseurl: '',
1375
+ files: act.map((data) => data.fileURL),
1376
+ isImages: act.map((data) => Boolean(data.isImage))
1377
+ });
1378
+ }
1379
+ setFilter(value) {
1380
+ this.state.filterWord = value;
1381
+ }
1382
+ toggleFavorite(item) {
1383
+ const favoriteIndex = this.getIndex(item, this.state.favorites);
1384
+ const favorites = [...this.state.favorites];
1385
+ if (favoriteIndex === -1) {
1386
+ favorites.push(item);
1387
+ }
1388
+ else {
1389
+ favorites.splice(favoriteIndex, 1);
1390
+ }
1391
+ this.state.favorites = favorites;
1392
+ }
1393
+ fillTreeForPath(sources, path) {
1394
+ if (!this.state.tree.length || !path || path === '/') {
1395
+ this.state.tree = sources.map(sourceToTreeItem);
1396
+ return;
1397
+ }
1398
+ this.removeActive(this.state.tree);
1399
+ sources.forEach((source) => {
1400
+ let sourceItem = findItem(this.state.tree, source.name);
1401
+ if (!sourceItem) {
1402
+ sourceItem = sourceToTreeItem(source);
1403
+ this.state.tree.push(sourceItem);
1404
+ }
1405
+ sourceItem.isActive = true;
1406
+ const childrenItem = findTreeItem(path, sourceItem);
1407
+ if (!childrenItem) {
1408
+ return;
1409
+ }
1410
+ childrenItem.isActive = true;
1411
+ childrenItem.children = filterFolders(source.folders).map((folder) => folderToTreeItem(folder, path + '/' + folder, source.name));
1412
+ });
1413
+ this.state.tree = [...this.state.tree];
1414
+ }
1415
+ removeActive(tree) {
1416
+ tree.forEach((item) => {
1417
+ item.isActive = false;
1418
+ this.removeActive(item.children);
1419
+ });
1420
+ }
1421
+ get isFavoriteItems() {
1422
+ return this.state.favorites === this.state.elements;
1423
+ }
1424
+ }
1425
+ (0,tslib__WEBPACK_IMPORTED_MODULE_1__/* .__decorate */ .gn)([
1426
+ jodit_core_decorators__WEBPACK_IMPORTED_MODULE_0__.autobind
1427
+ ], StateManager.prototype, "getIndex", null);
1428
+ (0,tslib__WEBPACK_IMPORTED_MODULE_1__/* .__decorate */ .gn)([
1429
+ jodit_core_decorators__WEBPACK_IMPORTED_MODULE_0__.autobind
1430
+ ], StateManager.prototype, "isActive", null);
1431
+ (0,tslib__WEBPACK_IMPORTED_MODULE_1__/* .__decorate */ .gn)([
1432
+ jodit_core_decorators__WEBPACK_IMPORTED_MODULE_0__.autobind
1433
+ ], StateManager.prototype, "isFavorite", null);
1434
+ function findTreeItem(path, sourceItem) {
1435
+ return path
1436
+ .split('/')
1437
+ .reduce((item, part) => item && findItem(item.children, part), sourceItem);
1438
+ }
1439
+ function findItem(children, name) {
1440
+ var _a;
1441
+ return (_a = children.find((item) => item.name === name)) !== null && _a !== void 0 ? _a : null;
1442
+ }
1443
+ function filterFolders(folders) {
1444
+ return folders.filter((folder) => folder !== '.' && folder !== '..');
1445
+ }
1446
+ function sourceToTreeItem(source) {
1447
+ return {
1448
+ type: 'source',
1449
+ name: source.name,
1450
+ title: source.title,
1451
+ sourceName: source.name,
1452
+ path: '/',
1453
+ children: filterFolders(source.folders).map((folder) => folderToTreeItem(folder, folder, source.name))
1454
+ };
1455
+ }
1456
+ function folderToTreeItem(name, path, sourceName) {
1457
+ return {
1458
+ type: 'directory',
1459
+ name,
1460
+ path,
1461
+ sourceName,
1462
+ children: []
1463
+ };
1464
+ }
1465
+
1466
+
1467
+ /***/ }),
1468
+
1469
+ /***/ 57591:
1470
+ /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
1471
+
1472
+ "use strict";
1473
+ __webpack_require__.r(__webpack_exports__);
1474
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, {
1475
+ /* harmony export */ "ru": function() { return /* binding */ ru; }
1476
+ /* harmony export */ });
1477
+ /*!
1478
+ * Jodit Editor PRO (https://xdsoft.net/jodit/)
1479
+ * See LICENSE.md in the project root for license information.
1480
+ * Copyright (c) 2013-2023 Valeriy Chupurnov. All rights reserved. https://xdsoft.net/jodit/pro/
1481
+ */
1482
+ const ru = __webpack_require__(11937);
1483
+
1484
+
1485
+
1486
+ /***/ }),
1487
+
1488
+ /***/ 11937:
1489
+ /***/ (function(module) {
1490
+
1491
+ "use strict";
1492
+
1493
+ /*!
1494
+ * Jodit Editor PRO (https://xdsoft.net/jodit/)
1495
+ * See LICENSE.md in the project root for license information.
1496
+ * Copyright (c) 2013-2023 Valeriy Chupurnov. All rights reserved. https://xdsoft.net/jodit/pro/
1497
+ */
1498
+ module.exports = {
1499
+ Favorites: 'Избранное',
1500
+ Settings: 'Настройки',
1501
+ Light: 'Светлая',
1502
+ Dark: 'Темная',
1503
+ Theme: 'Тема',
1504
+ Show: 'Показать',
1505
+ Hide: 'Скрыть',
1506
+ 'Show favorites': 'Показывать избранное',
1507
+ Tiles: 'Плитка',
1508
+ List: 'Список',
1509
+ Compact: 'Компактный',
1510
+ View: 'Отображение',
1511
+ 'Folders position': 'Позиция папок',
1512
+ 'Sort by': 'Сортировать по',
1513
+ 'Extra small': 'Очень маленькие',
1514
+ Small: 'Маленькие',
1515
+ Large: 'Большие',
1516
+ 'Extra large': 'Очень большие',
1517
+ 'Tile size': 'Размер плитки'
1518
+ };
1519
+
1520
+
1521
+ /***/ }),
1522
+
1523
+ /***/ 68349:
1524
+ /***/ (function(__unused_webpack_module, __unused_webpack___webpack_exports__, __webpack_require__) {
1525
+
1526
+ "use strict";
1527
+ /* harmony import */ var jodit_core_ui__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(75004);
1528
+ /* harmony import */ var _heart_svg__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(82942);
1529
+ /* harmony import */ var _heart_svg__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_heart_svg__WEBPACK_IMPORTED_MODULE_1__);
1530
+ /* harmony import */ var _home_svg__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(19327);
1531
+ /* harmony import */ var _home_svg__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_home_svg__WEBPACK_IMPORTED_MODULE_2__);
1532
+ /* harmony import */ var _new_folder_svg__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(59239);
1533
+ /* harmony import */ var _new_folder_svg__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_new_folder_svg__WEBPACK_IMPORTED_MODULE_3__);
1534
+ /*!
1535
+ * Jodit Editor PRO (https://xdsoft.net/jodit/)
1536
+ * See LICENSE.md in the project root for license information.
1537
+ * Copyright (c) 2013-2023 Valeriy Chupurnov. All rights reserved. https://xdsoft.net/jodit/pro/
1538
+ */
1539
+
1540
+
1541
+
1542
+
1543
+ jodit_core_ui__WEBPACK_IMPORTED_MODULE_0__/* .Icon.set */ .JO.set('heart', String(_heart_svg__WEBPACK_IMPORTED_MODULE_1__));
1544
+ jodit_core_ui__WEBPACK_IMPORTED_MODULE_0__/* .Icon.set */ .JO.set('home', String(_home_svg__WEBPACK_IMPORTED_MODULE_2__));
1545
+ jodit_core_ui__WEBPACK_IMPORTED_MODULE_0__/* .Icon.set */ .JO.set('new-folder', String(_new_folder_svg__WEBPACK_IMPORTED_MODULE_3__));
1546
+
1547
+
1548
+ /***/ }),
1549
+
1550
+ /***/ 9890:
1551
+ /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
1552
+
1553
+ "use strict";
1554
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, {
1555
+ /* harmony export */ "D": function() { return /* binding */ UIBrowserFolder; }
1556
+ /* harmony export */ });
1557
+ /* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(97582);
1558
+ /* harmony import */ var jodit_core_ui__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(75004);
1559
+ /* harmony import */ var jodit_core_decorators_index__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(50526);
1560
+ /* harmony import */ var jodit_core_helpers__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(95582);
1561
+ /*!
1562
+ * Jodit Editor PRO (https://xdsoft.net/jodit/)
1563
+ * See LICENSE.md in the project root for license information.
1564
+ * Copyright (c) 2013-2023 Valeriy Chupurnov. All rights reserved. https://xdsoft.net/jodit/pro/
1565
+ */
1566
+
1567
+
1568
+
1569
+
1570
+
1571
+ let UIBrowserFolder = class UIBrowserFolder extends jodit_core_ui__WEBPACK_IMPORTED_MODULE_0__/* .UIElement */ .u1 {
1572
+ /** @override */
1573
+ className() {
1574
+ return 'UIBrowserFolder';
1575
+ }
1576
+ /** @override */
1577
+ render() {
1578
+ return `<div>
1579
+ <div class="&__icon">
1580
+ <div class='&__loader'></div>
1581
+ <div class="&__icon-wrapper">
1582
+ *folder*
1583
+ </div>
1584
+ </div>
1585
+ <div class="&__name"></div>
1586
+ <div class="&__arrow">*angle-right*</div>
1587
+ </div>`;
1588
+ }
1589
+ constructor(jodit, item) {
1590
+ super(jodit);
1591
+ this.item = item;
1592
+ /** @override */
1593
+ this.syncMod = true;
1594
+ const name = this.getElm('name');
1595
+ void 0;
1596
+ name.innerText = item.name;
1597
+ jodit.e
1598
+ .on(this.container, 'click', () => {
1599
+ if (!this.getMod('active')) {
1600
+ this.setMod('loading', true);
1601
+ }
1602
+ return jodit.e.fire('openFolder', item);
1603
+ })
1604
+ .on(this.container, 'contextmenu', (e) => {
1605
+ return jodit.e.fire('contextmenuFolder.filebrowser', item, e);
1606
+ });
1607
+ }
1608
+ };
1609
+ UIBrowserFolder = (0,tslib__WEBPACK_IMPORTED_MODULE_3__/* .__decorate */ .gn)([
1610
+ jodit_core_decorators_index__WEBPACK_IMPORTED_MODULE_1__.component
1611
+ ], UIBrowserFolder);
1612
+
1613
+
1614
+ /***/ }),
1615
+
1616
+ /***/ 65669:
1617
+ /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
1618
+
1619
+ "use strict";
1620
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, {
1621
+ /* harmony export */ "C": function() { return /* binding */ UIBrowserHeader; }
1622
+ /* harmony export */ });
1623
+ /* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(97582);
1624
+ /* harmony import */ var jodit_core_ui__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(75004);
1625
+ /* harmony import */ var jodit_core_decorators__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(50526);
1626
+ /* harmony import */ var jodit_modules_toolbar_factory__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(45429);
1627
+ /* harmony import */ var jodit_core_helpers_checker_is_string__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(4682);
1628
+ /*!
1629
+ * Jodit Editor PRO (https://xdsoft.net/jodit/)
1630
+ * See LICENSE.md in the project root for license information.
1631
+ * Copyright (c) 2013-2023 Valeriy Chupurnov. All rights reserved. https://xdsoft.net/jodit/pro/
1632
+ */
1633
+
1634
+
1635
+
1636
+
1637
+
1638
+
1639
+ let UIBrowserHeader = class UIBrowserHeader extends jodit_core_ui__WEBPACK_IMPORTED_MODULE_0__/* .UIGroup */ .qe {
1640
+ /** @override */
1641
+ className() {
1642
+ return 'UIBrowserHeader';
1643
+ }
1644
+ constructor(jodit, options, stateManager) {
1645
+ super(jodit);
1646
+ this.options = options;
1647
+ this.stateManager = stateManager;
1648
+ /** @override */
1649
+ this.syncMod = true;
1650
+ this.toolbar = (0,jodit_modules_toolbar_factory__WEBPACK_IMPORTED_MODULE_2__/* .makeCollection */ .R)(this.j);
1651
+ this.filter = new jodit_core_ui__WEBPACK_IMPORTED_MODULE_0__/* .UIInput */ .u3(this.j, {
1652
+ icon: 'search',
1653
+ placeholder: 'Filter',
1654
+ clearButton: true,
1655
+ onChange: (value) => {
1656
+ this.stateManager.setFilter(value);
1657
+ }
1658
+ });
1659
+ this.append(this.toolbar).append(this.filter);
1660
+ this.filter.container.classList.add(this.getFullElName('filter'));
1661
+ this.toolbar.setMod('mode', 'header').build(this.__getButtons());
1662
+ }
1663
+ __getButtons() {
1664
+ var _a;
1665
+ const options = ((_a = this.options.toolbarButtons) !== null && _a !== void 0 ? _a : []);
1666
+ return options.filter((btn) => {
1667
+ if (!(0,jodit_core_helpers_checker_is_string__WEBPACK_IMPORTED_MODULE_3__/* .isString */ .H)(btn)) {
1668
+ return true;
1669
+ }
1670
+ switch (btn) {
1671
+ case 'filebrowser.edit':
1672
+ return (this.j.dataProvider.canI('ImageResize') ||
1673
+ this.j.dataProvider.canI('ImageCrop'));
1674
+ case 'filebrowser.new-folder':
1675
+ return this.j.dataProvider.canI('FolderCreate');
1676
+ case 'filebrowser.upload':
1677
+ return this.j.dataProvider.canI('FileUpload');
1678
+ case 'filebrowser.remove':
1679
+ return this.j.dataProvider.canI('FileRemove');
1680
+ }
1681
+ return true;
1682
+ });
1683
+ }
1684
+ };
1685
+ UIBrowserHeader = (0,tslib__WEBPACK_IMPORTED_MODULE_4__/* .__decorate */ .gn)([
1686
+ jodit_core_decorators__WEBPACK_IMPORTED_MODULE_1__.component
1687
+ ], UIBrowserHeader);
1688
+
1689
+
1690
+ /***/ }),
1691
+
1692
+ /***/ 87695:
1693
+ /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
1694
+
1695
+ "use strict";
1696
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, {
1697
+ /* harmony export */ "u": function() { return /* binding */ UIBrowserItem; }
1698
+ /* harmony export */ });
1699
+ /* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(97582);
1700
+ /* harmony import */ var jodit_core_ui__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(75004);
1701
+ /* harmony import */ var jodit_core_decorators__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(50526);
1702
+ /* harmony import */ var jodit_modules_file_browser_builders_item__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(45545);
1703
+ /* harmony import */ var jodit_modules__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(8079);
1704
+ /* harmony import */ var jodit_core_helpers__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(95582);
1705
+ /*!
1706
+ * Jodit Editor PRO (https://xdsoft.net/jodit/)
1707
+ * See LICENSE.md in the project root for license information.
1708
+ * Copyright (c) 2013-2023 Valeriy Chupurnov. All rights reserved. https://xdsoft.net/jodit/pro/
1709
+ */
1710
+
1711
+
1712
+
1713
+
1714
+
1715
+
1716
+
1717
+
1718
+ let UIBrowserItem = class UIBrowserItem extends jodit_core_ui__WEBPACK_IMPORTED_MODULE_0__/* .UIElement */ .u1 {
1719
+ /** @override */
1720
+ className() {
1721
+ return 'UIBrowserItem';
1722
+ }
1723
+ constructor(jodit, item) {
1724
+ super(jodit);
1725
+ this.item = jodit_modules_file_browser_builders_item__WEBPACK_IMPORTED_MODULE_2__/* .FileBrowserItem.create */ .Z.create(item);
1726
+ jodit.e.on(this.container, 'click contextmenu dblclick', (e) => {
1727
+ jodit.e.fire(e.type + 'Item.filebrowser', this.item, (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_4__.ctrlKey)(e) || e.shiftKey, e);
1728
+ return false;
1729
+ });
1730
+ }
1731
+ /** @override */
1732
+ render() {
1733
+ return `<div tabindex='-1'>
1734
+ <div class='&__image'></div>
1735
+ <div class='&__info'></div>
1736
+ <div class='&__heart'>*heart*</div>
1737
+ </div>`;
1738
+ }
1739
+ onClickFavorite() {
1740
+ this.bubble((box) => {
1741
+ this.jodit.e.fire(box, 'toggleFavoriteItem', this.item);
1742
+ });
1743
+ return false;
1744
+ }
1745
+ onAction(e) {
1746
+ this.jodit.e.fire(e.type + 'Item.filebrowser', this.item, (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_4__.ctrlKey)(e) || e.shiftKey, e);
1747
+ return false;
1748
+ }
1749
+ /** @override */
1750
+ update() {
1751
+ const image = this.getElm('image');
1752
+ void 0;
1753
+ (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_4__.css)(image, 'backgroundImage', `url(${encodeURI(this.item.imageURL)})`);
1754
+ const { type, file, time, size } = this.item;
1755
+ this.setMod('is-file', this.item.isImage === false)
1756
+ .setMod('type', type !== null && type !== void 0 ? type : 'file')
1757
+ .setElementValue('name', file)
1758
+ .setElementValue('time', time)
1759
+ .setElementValue('filesize', size);
1760
+ (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_4__.attr)(this.container, 'title', type !== 'folder' ? `${file} ${time} ${size}` : file);
1761
+ super.update();
1762
+ }
1763
+ /**
1764
+ * Create element and set value
1765
+ */
1766
+ setElementValue(name, value) {
1767
+ const elementClassName = this.getFullElName(name);
1768
+ let element = this.getElm(name);
1769
+ if (!value) {
1770
+ element && jodit_modules__WEBPACK_IMPORTED_MODULE_3__.Dom.safeRemove(element);
1771
+ return this;
1772
+ }
1773
+ if (!element) {
1774
+ const wrapper = this.getElm('info');
1775
+ void 0;
1776
+ element = this.j.create.div(elementClassName);
1777
+ wrapper.appendChild(element);
1778
+ }
1779
+ element.innerText = value;
1780
+ return this;
1781
+ }
1782
+ };
1783
+ (0,tslib__WEBPACK_IMPORTED_MODULE_5__/* .__decorate */ .gn)([
1784
+ (0,jodit_core_decorators__WEBPACK_IMPORTED_MODULE_1__.watch)('heart:click')
1785
+ ], UIBrowserItem.prototype, "onClickFavorite", null);
1786
+ (0,tslib__WEBPACK_IMPORTED_MODULE_5__/* .__decorate */ .gn)([
1787
+ (0,jodit_core_decorators__WEBPACK_IMPORTED_MODULE_1__.watch)(['container:click', 'container:contextmenu', 'container:dblclick'])
1788
+ ], UIBrowserItem.prototype, "onAction", null);
1789
+ UIBrowserItem = (0,tslib__WEBPACK_IMPORTED_MODULE_5__/* .__decorate */ .gn)([
1790
+ jodit_core_decorators__WEBPACK_IMPORTED_MODULE_1__.component
1791
+ ], UIBrowserItem);
1792
+
1793
+
1794
+ /***/ }),
1795
+
1796
+ /***/ 41424:
1797
+ /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
1798
+
1799
+ "use strict";
1800
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, {
1801
+ /* harmony export */ "m": function() { return /* binding */ UILightBox; }
1802
+ /* harmony export */ });
1803
+ /* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(97582);
1804
+ /* harmony import */ var jodit_modules__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(8079);
1805
+ /* harmony import */ var jodit_core_decorators__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(50526);
1806
+ /* harmony import */ var jodit_core_helpers__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(95582);
1807
+ /* harmony import */ var jodit_core_constants__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(11612);
1808
+ /*!
1809
+ * Jodit Editor PRO (https://xdsoft.net/jodit/)
1810
+ * See LICENSE.md in the project root for license information.
1811
+ * Copyright (c) 2013-2023 Valeriy Chupurnov. All rights reserved. https://xdsoft.net/jodit/pro/
1812
+ */
1813
+ var UILightBox_1;
1814
+
1815
+
1816
+
1817
+
1818
+
1819
+
1820
+
1821
+ let UILightBox = UILightBox_1 = class UILightBox extends jodit_modules__WEBPACK_IMPORTED_MODULE_0__.UIElement {
1822
+ /** @override */
1823
+ className() {
1824
+ return 'UILightBox';
1825
+ }
1826
+ render() {
1827
+ return `<div>
1828
+ <div class='&__previous'>*angle-left*</div>
1829
+ <div class='&__preview'></div>
1830
+ <div class='&__loader'></div>
1831
+ <div class='&__next'>*angle-right*</div>
1832
+ </div>`;
1833
+ }
1834
+ constructor(jodit, current, elements) {
1835
+ super(jodit);
1836
+ this.current = current;
1837
+ this.elements = elements;
1838
+ this.dialog = new jodit_modules__WEBPACK_IMPORTED_MODULE_0__.Dialog();
1839
+ const { dialog } = this;
1840
+ dialog
1841
+ .setMod('theme', jodit.state.theme)
1842
+ .toolbar.setMod('mode', 'header');
1843
+ dialog.open(this);
1844
+ this.elements = this.elements.filter((e) => e.isImage);
1845
+ dialog.e.on(dialog, 'afterClose', () => {
1846
+ this.destruct();
1847
+ });
1848
+ this.addGlobalListeners();
1849
+ this.onChangeCurrent();
1850
+ dialog.toolbar.build([
1851
+ {
1852
+ icon: 'check',
1853
+ exec: () => {
1854
+ jodit.stateManager.addActive(this.current, false);
1855
+ jodit.e.fire('select.filebrowser');
1856
+ dialog.close();
1857
+ }
1858
+ },
1859
+ 'dialog.close'
1860
+ ]);
1861
+ }
1862
+ onChangeCurrent() {
1863
+ return (0,tslib__WEBPACK_IMPORTED_MODULE_4__/* .__awaiter */ .mG)(this, void 0, void 0, function* () {
1864
+ const { current } = this;
1865
+ this.setMod('loading', true);
1866
+ const preview = this.getElm('preview');
1867
+ void 0;
1868
+ jodit_modules__WEBPACK_IMPORTED_MODULE_0__.Dom.detach(preview);
1869
+ (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_2__.css)(preview, {
1870
+ backgroundImage: null
1871
+ });
1872
+ if (current.isImage) {
1873
+ const image = yield (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_2__.loadImage)(current.fileURL, this.j);
1874
+ this.dialog.setPosition();
1875
+ (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_2__.css)(preview, {
1876
+ width: Math.min(this.jodit.ow.innerWidth, image.naturalWidth),
1877
+ height: Math.min(this.jodit.ow.innerHeight - 100, image.naturalHeight),
1878
+ backgroundImage: `url(${image.src})`
1879
+ });
1880
+ }
1881
+ else {
1882
+ const iframe = yield this.makeIframe(current.fileURL);
1883
+ preview.appendChild(iframe);
1884
+ }
1885
+ this.dialog.setSize();
1886
+ this.dialog.setPosition();
1887
+ this.setMod('loading', false);
1888
+ });
1889
+ }
1890
+ makeIframe(url) {
1891
+ const iframe = this.j.c.element('iframe');
1892
+ iframe.classList.add(this.getFullElName('office-iframe'));
1893
+ iframe.src = /\.pdf/.test(url)
1894
+ ? url
1895
+ : this.j.o.previewOfficeURL + encodeURIComponent(url);
1896
+ return iframe;
1897
+ }
1898
+ onPreviousClick() {
1899
+ const { current } = this;
1900
+ let index = this.j.stateManager.getIndex(current, this.elements);
1901
+ if (index <= 0) {
1902
+ index = this.elements.length - 1;
1903
+ }
1904
+ else {
1905
+ index -= 1;
1906
+ }
1907
+ this.current = this.elements[index];
1908
+ }
1909
+ onNextClick() {
1910
+ const { current } = this;
1911
+ let index = this.j.stateManager.getIndex(current, this.elements);
1912
+ if (index >= this.elements.length - 1) {
1913
+ index = 0;
1914
+ }
1915
+ else {
1916
+ index += 1;
1917
+ }
1918
+ this.current = this.elements[index];
1919
+ }
1920
+ static open(jodit, current, elements) {
1921
+ return new UILightBox_1(jodit, current, elements);
1922
+ }
1923
+ addGlobalListeners() {
1924
+ this.j.e.on(this.j.od, 'keydown', this.onKeyPress);
1925
+ }
1926
+ onKeyPress(e) {
1927
+ if (e.key === jodit_core_constants__WEBPACK_IMPORTED_MODULE_3__.KEY_LEFT || e.key === jodit_core_constants__WEBPACK_IMPORTED_MODULE_3__.KEY_RIGHT || e.key === jodit_core_constants__WEBPACK_IMPORTED_MODULE_3__.KEY_SPACE) {
1928
+ e.key === jodit_core_constants__WEBPACK_IMPORTED_MODULE_3__.KEY_LEFT ? this.onPreviousClick() : this.onNextClick();
1929
+ return false;
1930
+ }
1931
+ }
1932
+ removeGlobalListeners() {
1933
+ this.j.e.off(this.j.od, 'keydown', this.onKeyPress);
1934
+ }
1935
+ destruct() {
1936
+ this.removeGlobalListeners();
1937
+ this.dialog.destruct();
1938
+ return super.destruct();
1939
+ }
1940
+ };
1941
+ (0,tslib__WEBPACK_IMPORTED_MODULE_4__/* .__decorate */ .gn)([
1942
+ (0,jodit_core_decorators__WEBPACK_IMPORTED_MODULE_1__.watch)('current')
1943
+ ], UILightBox.prototype, "onChangeCurrent", null);
1944
+ (0,tslib__WEBPACK_IMPORTED_MODULE_4__/* .__decorate */ .gn)([
1945
+ (0,jodit_core_decorators__WEBPACK_IMPORTED_MODULE_1__.watch)('previous:click')
1946
+ ], UILightBox.prototype, "onPreviousClick", null);
1947
+ (0,tslib__WEBPACK_IMPORTED_MODULE_4__/* .__decorate */ .gn)([
1948
+ (0,jodit_core_decorators__WEBPACK_IMPORTED_MODULE_1__.watch)('next:click')
1949
+ ], UILightBox.prototype, "onNextClick", null);
1950
+ (0,tslib__WEBPACK_IMPORTED_MODULE_4__/* .__decorate */ .gn)([
1951
+ jodit_core_decorators__WEBPACK_IMPORTED_MODULE_1__.autobind
1952
+ ], UILightBox.prototype, "onKeyPress", null);
1953
+ UILightBox = UILightBox_1 = (0,tslib__WEBPACK_IMPORTED_MODULE_4__/* .__decorate */ .gn)([
1954
+ jodit_core_decorators__WEBPACK_IMPORTED_MODULE_1__.component
1955
+ ], UILightBox);
1956
+
1957
+
1958
+ /***/ }),
1959
+
1960
+ /***/ 96123:
1961
+ /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
1962
+
1963
+ "use strict";
1964
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, {
1965
+ /* harmony export */ "G": function() { return /* binding */ UIBrowserPanel; }
1966
+ /* harmony export */ });
1967
+ /* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(97582);
1968
+ /* harmony import */ var jodit_core_ui__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(75004);
1969
+ /* harmony import */ var _virtual_scroll_virtual_scroll__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(72618);
1970
+ /* harmony import */ var jodit_core_decorators__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(50526);
1971
+ /* harmony import */ var _sidebar_sidebar__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(68787);
1972
+ /* harmony import */ var _settings_settings__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(62983);
1973
+ /* harmony import */ var jodit_core_helpers__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(95582);
1974
+ /* harmony import */ var _sources_sources__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(93582);
1975
+ /* harmony import */ var _statusbar_statusbar__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(67775);
1976
+ /* harmony import */ var _preview_preview__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(96945);
1977
+ /*!
1978
+ * Jodit Editor PRO (https://xdsoft.net/jodit/)
1979
+ * See LICENSE.md in the project root for license information.
1980
+ * Copyright (c) 2013-2023 Valeriy Chupurnov. All rights reserved. https://xdsoft.net/jodit/pro/
1981
+ */
1982
+
1983
+
1984
+
1985
+
1986
+
1987
+
1988
+
1989
+
1990
+
1991
+
1992
+
1993
+ let UIBrowserPanel = class UIBrowserPanel extends jodit_core_ui__WEBPACK_IMPORTED_MODULE_0__/* .UIGroup */ .qe {
1994
+ /** @override */
1995
+ className() {
1996
+ return 'UIBrowserPanel';
1997
+ }
1998
+ /**
1999
+ * Count elements in one row for calculate navigation
2000
+ */
2001
+ get countInRow() {
2002
+ if (this.state.view === 'list') {
2003
+ return 1;
2004
+ }
2005
+ if (!this.items.elements.length) {
2006
+ return 1;
2007
+ }
2008
+ const { container } = this.items.elements[0], margin = (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_5__.css)(container, 'marginLeft');
2009
+ return Math.floor(this.items.container.offsetWidth /
2010
+ (container.offsetWidth + ((0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_5__.isNumber)(margin) ? margin : 0)));
2011
+ }
2012
+ /**
2013
+ * Count elements in one column for calculate navigation
2014
+ */
2015
+ get countInColumn() {
2016
+ if (!this.items.elements.length) {
2017
+ return 1;
2018
+ }
2019
+ const { container } = this.items.elements[0], margin = (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_5__.css)(container, 'marginTop');
2020
+ return Math.floor(this.items.container.offsetHeight /
2021
+ (container.offsetHeight + ((0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_5__.isNumber)(margin) ? margin : 0)));
2022
+ }
2023
+ /** @override */
2024
+ render() {
2025
+ return `<div>
2026
+ <div class='&__content'></div>
2027
+ <div class='&__footer'></div>
2028
+ </div>`;
2029
+ }
2030
+ constructor(jodit, stateManager) {
2031
+ super(jodit);
2032
+ this.stateManager = stateManager;
2033
+ /** @override */
2034
+ this.syncMod = true;
2035
+ this.sources = new _sources_sources__WEBPACK_IMPORTED_MODULE_6__/* .UIBrowserSources */ .L(this.j);
2036
+ this.sidebar = new _sidebar_sidebar__WEBPACK_IMPORTED_MODULE_3__/* .UISidebar */ .o(this.jodit, [this.sources], this.stateManager.state);
2037
+ this.preview = new _preview_preview__WEBPACK_IMPORTED_MODULE_8__/* .UIPreview */ .o(this.jodit, this.stateManager.state);
2038
+ this.statusbar = new _statusbar_statusbar__WEBPACK_IMPORTED_MODULE_7__/* .UIBrowserStatusBar */ .s(this.j);
2039
+ this.items = new _virtual_scroll_virtual_scroll__WEBPACK_IMPORTED_MODULE_1__/* .UIVirtualScroll */ .d(this.j, this.stateManager);
2040
+ this.settings = new _settings_settings__WEBPACK_IMPORTED_MODULE_4__/* .UIBrowserSettings */ .r(this.jodit, this.stateManager.state);
2041
+ this.state = stateManager.state;
2042
+ this.append(this.sidebar, 'content');
2043
+ this.append(this.items, 'content');
2044
+ this.append(this.settings, 'content');
2045
+ this.append(this.preview, 'content');
2046
+ this.append(this.statusbar, 'footer');
2047
+ this.onChangeElements();
2048
+ this.onChangeSources();
2049
+ this.onChangeView();
2050
+ this.onChangeTileSize();
2051
+ this.onChangeShowFavorites();
2052
+ this.onChangeActiveElements();
2053
+ this.onChangeFavorites();
2054
+ this.onChangeShowSideBar();
2055
+ this.onChangeShowSettings();
2056
+ this.onChangeShowPreview();
2057
+ this.onChangeTheme();
2058
+ }
2059
+ onChangeTheme() {
2060
+ this.setMod('theme', this.stateManager.state.theme);
2061
+ }
2062
+ onChangeElements() {
2063
+ this.items.build(this.stateManager.state.elements);
2064
+ }
2065
+ onChangeActiveElements() {
2066
+ if (!this.state.activeElements.length) {
2067
+ this.state.info = '';
2068
+ this.state.metaInfo = null;
2069
+ }
2070
+ this.items.elements.forEach((elm) => {
2071
+ elm.setMod('active', Boolean(this.stateManager.isActive(elm.item)));
2072
+ });
2073
+ this.j.e.fire('changeSelection');
2074
+ }
2075
+ onChangeFavorites() {
2076
+ this.items.elements.forEach((elm) => {
2077
+ elm.setMod('favorite', Boolean(this.stateManager.isFavorite(elm.item)));
2078
+ });
2079
+ }
2080
+ onChangeSources() {
2081
+ this.sources.build(this.stateManager.state.tree);
2082
+ }
2083
+ onChangeLastSelectedIndex() {
2084
+ var _a;
2085
+ const container = (_a = this.items.elements[this.stateManager.state.lastSelectedIndex]) === null || _a === void 0 ? void 0 : _a.container;
2086
+ if (container) {
2087
+ (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_5__.scrollIntoViewIfNeeded)(container, this.items.container, this.j.od);
2088
+ container.focus();
2089
+ }
2090
+ }
2091
+ onChangeInfo() {
2092
+ this.statusbar.value(this.state.info, 'center');
2093
+ }
2094
+ onChangePathOrSource() {
2095
+ this.statusbar.value(this.state.currentPath
2096
+ ? `${this.state.currentPath} (${this.state.currentSource})`
2097
+ : this.i18n('Home'), 'left');
2098
+ }
2099
+ onChangeShowSettings() {
2100
+ this.settings.setMod('hidden', !this.stateManager.state.showSettings);
2101
+ }
2102
+ onChangeShowPreview() {
2103
+ this.preview.setMod('hidden', !this.stateManager.state.showPreview);
2104
+ }
2105
+ onChangeShowSideBar() {
2106
+ this.sidebar.setMod('hidden', !this.stateManager.state.showSideBar);
2107
+ }
2108
+ onChangeView() {
2109
+ this.items.setMod('view', this.stateManager.state.view);
2110
+ }
2111
+ onChangeTileSize() {
2112
+ this.items.setMod('size', this.stateManager.state.tileSize);
2113
+ }
2114
+ onChangeShowFavorites() {
2115
+ this.sidebar.setMod('show-favorites', this.stateManager.state.showFavorites);
2116
+ this.items.setMod('show-favorites', this.stateManager.state.showFavorites);
2117
+ }
2118
+ onItemDblClick() {
2119
+ this.j.e.fire('select.filebrowser');
2120
+ return false;
2121
+ }
2122
+ onItemClick(data, multi) {
2123
+ this.stateManager.addActive(data, multi);
2124
+ }
2125
+ onTogglePreview() {
2126
+ this.state.showPreview = !this.state.showPreview;
2127
+ return false;
2128
+ }
2129
+ onToggleFavoriteItem(data) {
2130
+ this.stateManager.toggleFavorite(data);
2131
+ }
2132
+ onFolderClick(data) {
2133
+ this.stateManager.state.currentSource = data.sourceName;
2134
+ this.stateManager.state.currentPath = data.path || '/';
2135
+ this.j.e.fire('afterOpenFolder.filebrowser');
2136
+ }
2137
+ };
2138
+ (0,tslib__WEBPACK_IMPORTED_MODULE_9__/* .__decorate */ .gn)([
2139
+ (0,jodit_core_decorators__WEBPACK_IMPORTED_MODULE_2__.watch)('state.theme')
2140
+ ], UIBrowserPanel.prototype, "onChangeTheme", null);
2141
+ (0,tslib__WEBPACK_IMPORTED_MODULE_9__/* .__decorate */ .gn)([
2142
+ (0,jodit_core_decorators__WEBPACK_IMPORTED_MODULE_2__.watch)('state.elements')
2143
+ ], UIBrowserPanel.prototype, "onChangeElements", null);
2144
+ (0,tslib__WEBPACK_IMPORTED_MODULE_9__/* .__decorate */ .gn)([
2145
+ (0,jodit_core_decorators__WEBPACK_IMPORTED_MODULE_2__.watch)('state.activeElements')
2146
+ ], UIBrowserPanel.prototype, "onChangeActiveElements", null);
2147
+ (0,tslib__WEBPACK_IMPORTED_MODULE_9__/* .__decorate */ .gn)([
2148
+ (0,jodit_core_decorators__WEBPACK_IMPORTED_MODULE_2__.watch)(['state.favorites', 'state.elements'])
2149
+ ], UIBrowserPanel.prototype, "onChangeFavorites", null);
2150
+ (0,tslib__WEBPACK_IMPORTED_MODULE_9__/* .__decorate */ .gn)([
2151
+ (0,jodit_core_decorators__WEBPACK_IMPORTED_MODULE_2__.watch)('state.sources')
2152
+ ], UIBrowserPanel.prototype, "onChangeSources", null);
2153
+ (0,tslib__WEBPACK_IMPORTED_MODULE_9__/* .__decorate */ .gn)([
2154
+ (0,jodit_core_decorators__WEBPACK_IMPORTED_MODULE_2__.watch)('state.lastSelectedIndex')
2155
+ ], UIBrowserPanel.prototype, "onChangeLastSelectedIndex", null);
2156
+ (0,tslib__WEBPACK_IMPORTED_MODULE_9__/* .__decorate */ .gn)([
2157
+ (0,jodit_core_decorators__WEBPACK_IMPORTED_MODULE_2__.watch)('state.info')
2158
+ ], UIBrowserPanel.prototype, "onChangeInfo", null);
2159
+ (0,tslib__WEBPACK_IMPORTED_MODULE_9__/* .__decorate */ .gn)([
2160
+ (0,jodit_core_decorators__WEBPACK_IMPORTED_MODULE_2__.watch)(['state.currentPath', 'state.currentSource'])
2161
+ ], UIBrowserPanel.prototype, "onChangePathOrSource", null);
2162
+ (0,tslib__WEBPACK_IMPORTED_MODULE_9__/* .__decorate */ .gn)([
2163
+ (0,jodit_core_decorators__WEBPACK_IMPORTED_MODULE_2__.watch)('state.showSettings')
2164
+ ], UIBrowserPanel.prototype, "onChangeShowSettings", null);
2165
+ (0,tslib__WEBPACK_IMPORTED_MODULE_9__/* .__decorate */ .gn)([
2166
+ (0,jodit_core_decorators__WEBPACK_IMPORTED_MODULE_2__.watch)('state.showPreview')
2167
+ ], UIBrowserPanel.prototype, "onChangeShowPreview", null);
2168
+ (0,tslib__WEBPACK_IMPORTED_MODULE_9__/* .__decorate */ .gn)([
2169
+ (0,jodit_core_decorators__WEBPACK_IMPORTED_MODULE_2__.watch)('state.showSideBar')
2170
+ ], UIBrowserPanel.prototype, "onChangeShowSideBar", null);
2171
+ (0,tslib__WEBPACK_IMPORTED_MODULE_9__/* .__decorate */ .gn)([
2172
+ (0,jodit_core_decorators__WEBPACK_IMPORTED_MODULE_2__.watch)('state.view')
2173
+ ], UIBrowserPanel.prototype, "onChangeView", null);
2174
+ (0,tslib__WEBPACK_IMPORTED_MODULE_9__/* .__decorate */ .gn)([
2175
+ (0,jodit_core_decorators__WEBPACK_IMPORTED_MODULE_2__.watch)('state.tileSize')
2176
+ ], UIBrowserPanel.prototype, "onChangeTileSize", null);
2177
+ (0,tslib__WEBPACK_IMPORTED_MODULE_9__/* .__decorate */ .gn)([
2178
+ (0,jodit_core_decorators__WEBPACK_IMPORTED_MODULE_2__.watch)('state.showFavorites')
2179
+ ], UIBrowserPanel.prototype, "onChangeShowFavorites", null);
2180
+ (0,tslib__WEBPACK_IMPORTED_MODULE_9__/* .__decorate */ .gn)([
2181
+ (0,jodit_core_decorators__WEBPACK_IMPORTED_MODULE_2__.watch)(':dblclickItem.filebrowser')
2182
+ ], UIBrowserPanel.prototype, "onItemDblClick", null);
2183
+ (0,tslib__WEBPACK_IMPORTED_MODULE_9__/* .__decorate */ .gn)([
2184
+ (0,jodit_core_decorators__WEBPACK_IMPORTED_MODULE_2__.watch)(':clickItem.filebrowser')
2185
+ ], UIBrowserPanel.prototype, "onItemClick", null);
2186
+ (0,tslib__WEBPACK_IMPORTED_MODULE_9__/* .__decorate */ .gn)([
2187
+ (0,jodit_core_decorators__WEBPACK_IMPORTED_MODULE_2__.watch)(':togglePreview.filebrowser')
2188
+ ], UIBrowserPanel.prototype, "onTogglePreview", null);
2189
+ (0,tslib__WEBPACK_IMPORTED_MODULE_9__/* .__decorate */ .gn)([
2190
+ (0,jodit_core_decorators__WEBPACK_IMPORTED_MODULE_2__.watch)(':toggleFavoriteItem')
2191
+ ], UIBrowserPanel.prototype, "onToggleFavoriteItem", null);
2192
+ (0,tslib__WEBPACK_IMPORTED_MODULE_9__/* .__decorate */ .gn)([
2193
+ (0,jodit_core_decorators__WEBPACK_IMPORTED_MODULE_2__.watch)(':openFolder')
2194
+ ], UIBrowserPanel.prototype, "onFolderClick", null);
2195
+ UIBrowserPanel = (0,tslib__WEBPACK_IMPORTED_MODULE_9__/* .__decorate */ .gn)([
2196
+ jodit_core_decorators__WEBPACK_IMPORTED_MODULE_2__.component
2197
+ ], UIBrowserPanel);
2198
+
2199
+
2200
+ /***/ }),
2201
+
2202
+ /***/ 96945:
2203
+ /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
2204
+
2205
+ "use strict";
2206
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, {
2207
+ /* harmony export */ "o": function() { return /* binding */ UIPreview; }
2208
+ /* harmony export */ });
2209
+ /* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(97582);
2210
+ /* harmony import */ var jodit_core_ui__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(75004);
2211
+ /* harmony import */ var jodit_core_decorators__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(50526);
2212
+ /* harmony import */ var _traits_resize_resize__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(62499);
2213
+ /* harmony import */ var jodit_core_helpers__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(95582);
2214
+ /* harmony import */ var jodit_core_dom__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(8138);
2215
+ /* harmony import */ var _item_item__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(87695);
2216
+
2217
+ /*!
2218
+ * Jodit Editor PRO (https://xdsoft.net/jodit/)
2219
+ * See LICENSE.md in the project root for license information.
2220
+ * Copyright (c) 2013-2023 Valeriy Chupurnov. All rights reserved. https://xdsoft.net/jodit/pro/
2221
+ */
2222
+
2223
+
2224
+
2225
+
2226
+
2227
+
2228
+
2229
+
2230
+ let UIPreview = class UIPreview extends jodit_core_ui__WEBPACK_IMPORTED_MODULE_0__/* .UIGroup */ .qe {
2231
+ /** @override */
2232
+ className() {
2233
+ return 'UIPreview';
2234
+ }
2235
+ /**
2236
+ * Add handle resizer
2237
+ */
2238
+ addResize() {
2239
+ _traits_resize_resize__WEBPACK_IMPORTED_MODULE_2__/* .UIResize.remove */ .c.remove(this);
2240
+ _traits_resize_resize__WEBPACK_IMPORTED_MODULE_2__/* .UIResize.install */ .c.install(this, screen.width > 450 ? 'left' : 'top');
2241
+ }
2242
+ /** @override */
2243
+ render() {
2244
+ return `<div>
2245
+ <div class="&__image"></div>
2246
+ <div class="&__info"></div>
2247
+ <div class="&__loader"></div>
2248
+ <div class="&__empty-message">~Select image~</div>
2249
+ </div>`;
2250
+ }
2251
+ constructor(jodit, state) {
2252
+ super(jodit);
2253
+ this.state = state;
2254
+ this.lastLoadPromise = null;
2255
+ this.onChangeMetaInfo();
2256
+ }
2257
+ afterSetMod(name, value) {
2258
+ if (name === 'hidden' && value === false) {
2259
+ this.onChangeMetaInfo();
2260
+ }
2261
+ super.afterSetMod(name, value);
2262
+ }
2263
+ onChangeMetaInfo() {
2264
+ var _a, _b;
2265
+ if (this.getMod('hidden')) {
2266
+ return;
2267
+ }
2268
+ const { metaInfo } = this.state;
2269
+ this.setMod('empty', !metaInfo);
2270
+ const info = this.getElm('info');
2271
+ void 0;
2272
+ jodit_core_dom__WEBPACK_IMPORTED_MODULE_4__/* .Dom.detach */ .i.detach(info);
2273
+ const image = this.getElm('image');
2274
+ void 0;
2275
+ (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_3__.css)(image, {
2276
+ backgroundImage: null
2277
+ });
2278
+ if (!metaInfo) {
2279
+ return;
2280
+ }
2281
+ this.setMod('is-file', metaInfo.isImage === false).setMod('type', (_a = metaInfo.type) !== null && _a !== void 0 ? _a : 'file');
2282
+ _item_item__WEBPACK_IMPORTED_MODULE_5__/* .UIBrowserItem.prototype.setElementValue.call */ .u.prototype.setElementValue.call(this, 'name', metaInfo.file);
2283
+ _item_item__WEBPACK_IMPORTED_MODULE_5__/* .UIBrowserItem.prototype.setElementValue.call */ .u.prototype.setElementValue.call(this, 'time', metaInfo.time);
2284
+ _item_item__WEBPACK_IMPORTED_MODULE_5__/* .UIBrowserItem.prototype.setElementValue.call */ .u.prototype.setElementValue.call(this, 'filesize', metaInfo.size);
2285
+ this.setMod('loading', true);
2286
+ (_b = this.lastLoadPromise) === null || _b === void 0 ? void 0 : _b.rejectCallback();
2287
+ this.lastLoadPromise = (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_3__.loadImage)(metaInfo.isImage ? metaInfo.fileURL : metaInfo.imageURL, this.j);
2288
+ this.lastLoadPromise
2289
+ .then((image) => {
2290
+ const elm = this.getElm('image');
2291
+ void 0;
2292
+ image &&
2293
+ (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_3__.css)(elm, {
2294
+ backgroundImage: `url(${image.src})`
2295
+ });
2296
+ })
2297
+ .finally(() => {
2298
+ this.setMod('loading', false);
2299
+ })
2300
+ .catch(() => { });
2301
+ }
2302
+ };
2303
+ (0,tslib__WEBPACK_IMPORTED_MODULE_6__/* .__decorate */ .gn)([
2304
+ (0,jodit_core_decorators__WEBPACK_IMPORTED_MODULE_1__.hook)('ready'),
2305
+ (0,jodit_core_decorators__WEBPACK_IMPORTED_MODULE_1__.watch)(':resize', { context: window }),
2306
+ (0,jodit_core_decorators__WEBPACK_IMPORTED_MODULE_1__.debounce)()
2307
+ ], UIPreview.prototype, "addResize", null);
2308
+ (0,tslib__WEBPACK_IMPORTED_MODULE_6__/* .__decorate */ .gn)([
2309
+ (0,jodit_core_decorators__WEBPACK_IMPORTED_MODULE_1__.watch)('state.metaInfo')
2310
+ ], UIPreview.prototype, "onChangeMetaInfo", null);
2311
+ UIPreview = (0,tslib__WEBPACK_IMPORTED_MODULE_6__/* .__decorate */ .gn)([
2312
+ jodit_core_decorators__WEBPACK_IMPORTED_MODULE_1__.component
2313
+ ], UIPreview);
2314
+
2315
+
2316
+ /***/ }),
2317
+
2318
+ /***/ 22840:
2319
+ /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
2320
+
2321
+ "use strict";
2322
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, {
2323
+ /* harmony export */ "u": function() { return /* binding */ UIProgress; }
2324
+ /* harmony export */ });
2325
+ /* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(97582);
2326
+ /* harmony import */ var jodit_core_ui__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(75004);
2327
+ /* harmony import */ var jodit_core_decorators__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(50526);
2328
+
2329
+ /*!
2330
+ * Jodit Editor PRO (https://xdsoft.net/jodit/)
2331
+ * See LICENSE.md in the project root for license information.
2332
+ * Copyright (c) 2013-2023 Valeriy Chupurnov. All rights reserved. https://xdsoft.net/jodit/pro/
2333
+ */
2334
+
2335
+
2336
+
2337
+ let UIProgress = class UIProgress extends jodit_core_ui__WEBPACK_IMPORTED_MODULE_0__/* .ProgressBar */ .ko {
2338
+ /** @override */
2339
+ className() {
2340
+ return 'UIProgress';
2341
+ }
2342
+ constructor(jodit, state) {
2343
+ super(jodit);
2344
+ this.state = state;
2345
+ this.onProgress();
2346
+ }
2347
+ onProgress() {
2348
+ if (this.state.progress) {
2349
+ this.show();
2350
+ }
2351
+ else {
2352
+ this.hide();
2353
+ }
2354
+ this.progress(this.state.progress);
2355
+ }
2356
+ hide() {
2357
+ this.setMod('hidden', true);
2358
+ return this;
2359
+ }
2360
+ progress(percentage) {
2361
+ this.container.style.width = percentage.toFixed(2) + '%';
2362
+ if (percentage >= 98) {
2363
+ this.j.async.setTimeout(() => {
2364
+ this.hide();
2365
+ }, {
2366
+ label: 'progress',
2367
+ timeout: 300
2368
+ });
2369
+ }
2370
+ return this;
2371
+ }
2372
+ show() {
2373
+ this.setMod('hidden', false);
2374
+ return this;
2375
+ }
2376
+ };
2377
+ (0,tslib__WEBPACK_IMPORTED_MODULE_2__/* .__decorate */ .gn)([
2378
+ (0,jodit_core_decorators__WEBPACK_IMPORTED_MODULE_1__.watch)('state.progress')
2379
+ ], UIProgress.prototype, "onProgress", null);
2380
+ UIProgress = (0,tslib__WEBPACK_IMPORTED_MODULE_2__/* .__decorate */ .gn)([
2381
+ jodit_core_decorators__WEBPACK_IMPORTED_MODULE_1__.component
2382
+ ], UIProgress);
2383
+
2384
+
2385
+ /***/ }),
2386
+
2387
+ /***/ 62983:
2388
+ /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
2389
+
2390
+ "use strict";
2391
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, {
2392
+ /* harmony export */ "r": function() { return /* binding */ UIBrowserSettings; }
2393
+ /* harmony export */ });
2394
+ /* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(97582);
2395
+ /* harmony import */ var jodit_core_ui__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(75004);
2396
+ /* harmony import */ var jodit_core_decorators__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(50526);
2397
+ /* harmony import */ var jodit_core_helpers__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(95582);
2398
+ /*!
2399
+ * Jodit Editor PRO (https://xdsoft.net/jodit/)
2400
+ * See LICENSE.md in the project root for license information.
2401
+ * Copyright (c) 2013-2023 Valeriy Chupurnov. All rights reserved. https://xdsoft.net/jodit/pro/
2402
+ */
2403
+
2404
+
2405
+
2406
+
2407
+
2408
+ let UIBrowserSettings = class UIBrowserSettings extends jodit_core_ui__WEBPACK_IMPORTED_MODULE_0__/* .UIGroup */ .qe {
2409
+ /** @override */
2410
+ className() {
2411
+ return 'UIBrowserSettings';
2412
+ }
2413
+ /** @override */
2414
+ render() {
2415
+ return `<div>
2416
+ <div class="${this.getFullElName('close')}">${jodit_core_ui__WEBPACK_IMPORTED_MODULE_0__/* .Icon.get */ .JO.get('cancel')}</div>
2417
+ <div class="${this.getFullElName('title')}">${this.j.i18n('Settings')}</div>
2418
+ <div class="${this.getFullElName('options')}"></div>
2419
+ </div>`;
2420
+ }
2421
+ /** @override */
2422
+ appendChildToContainer(childContainer) {
2423
+ const options = this.getElm('options');
2424
+ void 0;
2425
+ options.appendChild(childContainer);
2426
+ }
2427
+ afterSetMod(name, value) {
2428
+ if (name === 'hidden' && value === false) {
2429
+ this.generateSettings();
2430
+ }
2431
+ super.afterSetMod(name, value);
2432
+ }
2433
+ constructor(jodit, state) {
2434
+ super(jodit);
2435
+ this.state = state;
2436
+ const close = this.getElm('close');
2437
+ void 0;
2438
+ jodit.e.on(close, 'click', () => {
2439
+ this.state.showSettings = false;
2440
+ });
2441
+ }
2442
+ onChangeView() {
2443
+ const tileSize = this.getElm('tile-size');
2444
+ if (tileSize) {
2445
+ tileSize.style.display =
2446
+ this.state.view === 'tiles' ? 'block' : 'none';
2447
+ }
2448
+ }
2449
+ /**
2450
+ * Generate options list
2451
+ */
2452
+ generateSettings() {
2453
+ this.clear();
2454
+ const { j } = this;
2455
+ this.append([
2456
+ new jodit_core_ui__WEBPACK_IMPORTED_MODULE_0__/* .UIButtonGroup */ .BO(j, {
2457
+ label: 'Theme',
2458
+ name: 'theme',
2459
+ value: this.state.theme,
2460
+ radio: true,
2461
+ options: [
2462
+ { value: 'default', text: 'Light' },
2463
+ { value: 'dark', text: 'Dark' }
2464
+ ],
2465
+ onChange: (values) => {
2466
+ if (this.state.theme !== 'default' &&
2467
+ this.state.theme !== 'dark') {
2468
+ this.state.theme = 'default';
2469
+ return;
2470
+ }
2471
+ this.state.theme = values[0].value;
2472
+ }
2473
+ }),
2474
+ new jodit_core_ui__WEBPACK_IMPORTED_MODULE_0__/* .UIButtonGroup */ .BO(j, {
2475
+ label: 'Show favorites',
2476
+ name: 'showFavorites',
2477
+ value: this.state.showFavorites,
2478
+ radio: true,
2479
+ options: [
2480
+ { value: true, text: 'Show' },
2481
+ { value: false, text: 'Hide' }
2482
+ ],
2483
+ onChange: (values) => {
2484
+ this.state.showFavorites = values[0].value;
2485
+ }
2486
+ }),
2487
+ new jodit_core_ui__WEBPACK_IMPORTED_MODULE_0__/* .UIButtonGroup */ .BO(j, {
2488
+ label: 'View',
2489
+ name: 'view',
2490
+ value: this.state.view,
2491
+ radio: true,
2492
+ options: [
2493
+ { value: 'tiles', text: 'Tiles' },
2494
+ { value: 'list', text: 'List' },
2495
+ { value: 'compact', text: 'Compact' }
2496
+ ],
2497
+ onChange: (values) => {
2498
+ this.state.view = values[0].value;
2499
+ }
2500
+ }),
2501
+ new jodit_core_ui__WEBPACK_IMPORTED_MODULE_0__/* .UIButtonGroup */ .BO(j, {
2502
+ label: 'Folders position',
2503
+ name: 'foldersPosition',
2504
+ value: this.state.foldersPosition,
2505
+ radio: true,
2506
+ options: [
2507
+ { value: 'top', text: 'Top' },
2508
+ { value: 'bottom', text: 'Bottom' },
2509
+ { value: 'default', text: 'Default' }
2510
+ ],
2511
+ onChange: (values) => {
2512
+ this.state.foldersPosition = values[0].value;
2513
+ }
2514
+ }),
2515
+ new jodit_core_ui__WEBPACK_IMPORTED_MODULE_0__/* .UISelect */ .Cj(j, {
2516
+ label: 'Sort by',
2517
+ name: 'sort-by',
2518
+ value: this.state.sortBy,
2519
+ options: [
2520
+ {
2521
+ value: 'changed-asc',
2522
+ text: j.i18n('Sort by changed') + '(⬆)'
2523
+ },
2524
+ {
2525
+ value: 'changed-desc',
2526
+ text: j.i18n('Sort by changed') + '(⬇)'
2527
+ },
2528
+ {
2529
+ value: 'name-asc',
2530
+ text: j.i18n('Sort by name') + '(⬆)'
2531
+ },
2532
+ {
2533
+ value: 'name-desc',
2534
+ text: j.i18n('Sort by name') + '(⬇)'
2535
+ },
2536
+ {
2537
+ value: 'size-asc',
2538
+ text: j.i18n('Sort by size') + '(⬆)'
2539
+ },
2540
+ {
2541
+ value: 'size-desc',
2542
+ text: j.i18n('Sort by size') + '(⬇)'
2543
+ }
2544
+ ],
2545
+ onChange: (value) => {
2546
+ this.state.sortBy = value;
2547
+ }
2548
+ }),
2549
+ new jodit_core_ui__WEBPACK_IMPORTED_MODULE_0__/* .UISelect */ .Cj(j, {
2550
+ label: 'Tile size',
2551
+ name: 'tile-size',
2552
+ value: this.state.tileSize,
2553
+ options: [
2554
+ {
2555
+ value: 'xsmall',
2556
+ text: 'Extra small'
2557
+ },
2558
+ {
2559
+ value: 'small',
2560
+ text: 'Small'
2561
+ },
2562
+ {
2563
+ value: 'default',
2564
+ text: 'Default'
2565
+ },
2566
+ {
2567
+ value: 'large',
2568
+ text: 'Large'
2569
+ },
2570
+ {
2571
+ value: 'xlarge',
2572
+ text: 'Extra large'
2573
+ }
2574
+ ],
2575
+ onChange: (value) => {
2576
+ this.state.tileSize =
2577
+ value;
2578
+ }
2579
+ })
2580
+ ]);
2581
+ this.onChangeView();
2582
+ }
2583
+ };
2584
+ (0,tslib__WEBPACK_IMPORTED_MODULE_3__/* .__decorate */ .gn)([
2585
+ (0,jodit_core_decorators__WEBPACK_IMPORTED_MODULE_1__.watch)('state.view')
2586
+ ], UIBrowserSettings.prototype, "onChangeView", null);
2587
+ UIBrowserSettings = (0,tslib__WEBPACK_IMPORTED_MODULE_3__/* .__decorate */ .gn)([
2588
+ jodit_core_decorators__WEBPACK_IMPORTED_MODULE_1__.component
2589
+ ], UIBrowserSettings);
2590
+
2591
+
2592
+ /***/ }),
2593
+
2594
+ /***/ 68787:
2595
+ /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
2596
+
2597
+ "use strict";
2598
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, {
2599
+ /* harmony export */ "o": function() { return /* binding */ UISidebar; }
2600
+ /* harmony export */ });
2601
+ /* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(97582);
2602
+ /* harmony import */ var jodit_core_ui__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(75004);
2603
+ /* harmony import */ var jodit_core_decorators__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(50526);
2604
+ /* harmony import */ var _traits_resize_resize__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(62499);
2605
+ /* harmony import */ var jodit_core_helpers__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(95582);
2606
+
2607
+ /*!
2608
+ * Jodit Editor PRO (https://xdsoft.net/jodit/)
2609
+ * See LICENSE.md in the project root for license information.
2610
+ * Copyright (c) 2013-2023 Valeriy Chupurnov. All rights reserved. https://xdsoft.net/jodit/pro/
2611
+ */
2612
+
2613
+
2614
+
2615
+
2616
+
2617
+ let UISidebar = class UISidebar extends jodit_core_ui__WEBPACK_IMPORTED_MODULE_0__/* .UIGroup */ .qe {
2618
+ /** @override */
2619
+ className() {
2620
+ return 'UISidebar';
2621
+ }
2622
+ /** @override */
2623
+ render() {
2624
+ return `<div>
2625
+ <div class='&__hide-btn'>*angle-left*</div>
2626
+ <div class='&__favorites'>*heart* ~Favorites~</div>
2627
+ <div class='&__box'></div>
2628
+ </div>`;
2629
+ }
2630
+ /** @override */
2631
+ appendChildToContainer(childContainer) {
2632
+ const box = this.getElm('box');
2633
+ void 0;
2634
+ box.appendChild(childContainer);
2635
+ }
2636
+ /**
2637
+ * Add handle resizer
2638
+ */
2639
+ addResize() {
2640
+ _traits_resize_resize__WEBPACK_IMPORTED_MODULE_2__/* .UIResize.remove */ .c.remove(this);
2641
+ _traits_resize_resize__WEBPACK_IMPORTED_MODULE_2__/* .UIResize.install */ .c.install(this, screen.width > 450 ? 'right' : 'bottom');
2642
+ }
2643
+ constructor(jodit, elements, state) {
2644
+ super(jodit, elements);
2645
+ this.state = state;
2646
+ this.onChangeFavorites();
2647
+ }
2648
+ onChangeFavorites() {
2649
+ this.setMod('has-favorites', Boolean(this.state.favorites.length));
2650
+ }
2651
+ onClickHideButton() {
2652
+ this.state.showSideBar = !this.state.showSideBar;
2653
+ return false;
2654
+ }
2655
+ onClickFavorites() {
2656
+ this.state.elements = this.state.favorites;
2657
+ return false;
2658
+ }
2659
+ };
2660
+ (0,tslib__WEBPACK_IMPORTED_MODULE_4__/* .__decorate */ .gn)([
2661
+ (0,jodit_core_decorators__WEBPACK_IMPORTED_MODULE_1__.hook)('ready'),
2662
+ (0,jodit_core_decorators__WEBPACK_IMPORTED_MODULE_1__.watch)(':resize', { context: window }),
2663
+ (0,jodit_core_decorators__WEBPACK_IMPORTED_MODULE_1__.debounce)()
2664
+ ], UISidebar.prototype, "addResize", null);
2665
+ (0,tslib__WEBPACK_IMPORTED_MODULE_4__/* .__decorate */ .gn)([
2666
+ (0,jodit_core_decorators__WEBPACK_IMPORTED_MODULE_1__.watch)('state.favorites')
2667
+ ], UISidebar.prototype, "onChangeFavorites", null);
2668
+ (0,tslib__WEBPACK_IMPORTED_MODULE_4__/* .__decorate */ .gn)([
2669
+ (0,jodit_core_decorators__WEBPACK_IMPORTED_MODULE_1__.watch)('hide-btn:click')
2670
+ ], UISidebar.prototype, "onClickHideButton", null);
2671
+ (0,tslib__WEBPACK_IMPORTED_MODULE_4__/* .__decorate */ .gn)([
2672
+ (0,jodit_core_decorators__WEBPACK_IMPORTED_MODULE_1__.watch)('favorites:click')
2673
+ ], UISidebar.prototype, "onClickFavorites", null);
2674
+ UISidebar = (0,tslib__WEBPACK_IMPORTED_MODULE_4__/* .__decorate */ .gn)([
2675
+ jodit_core_decorators__WEBPACK_IMPORTED_MODULE_1__.component
2676
+ ], UISidebar);
2677
+
2678
+
2679
+ /***/ }),
2680
+
2681
+ /***/ 21596:
2682
+ /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
2683
+
2684
+ "use strict";
2685
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, {
2686
+ /* harmony export */ "f": function() { return /* binding */ UIBrowserSource; }
2687
+ /* harmony export */ });
2688
+ /* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(97582);
2689
+ /* harmony import */ var jodit_core_ui__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(75004);
2690
+ /* harmony import */ var jodit_core_decorators__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(50526);
2691
+ /* harmony import */ var _tree_tree__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(91919);
2692
+ /* harmony import */ var jodit_core_helpers__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(95582);
2693
+ /*!
2694
+ * Jodit Editor PRO (https://xdsoft.net/jodit/)
2695
+ * See LICENSE.md in the project root for license information.
2696
+ * Copyright (c) 2013-2023 Valeriy Chupurnov. All rights reserved. https://xdsoft.net/jodit/pro/
2697
+ */
2698
+
2699
+
2700
+
2701
+
2702
+
2703
+
2704
+ let UIBrowserSource = class UIBrowserSource extends jodit_core_ui__WEBPACK_IMPORTED_MODULE_0__/* .UIElement */ .u1 {
2705
+ /** @override */
2706
+ className() {
2707
+ return 'UIBrowserSource';
2708
+ }
2709
+ /** @override */
2710
+ render() {
2711
+ return `<div>
2712
+ <div class="&__name"></div>
2713
+ <div class="&__tree"></div>
2714
+ </div>`;
2715
+ }
2716
+ constructor(jodit, data) {
2717
+ super(jodit, data);
2718
+ this.data = data;
2719
+ this.tree = new _tree_tree__WEBPACK_IMPORTED_MODULE_2__/* .UITree */ .v(this.j, this.data.children);
2720
+ /** @override */
2721
+ this.syncMod = true;
2722
+ const name = this.getElm('name');
2723
+ void 0;
2724
+ name.innerText = data.title || data.name;
2725
+ const tree = this.getElm('tree');
2726
+ void 0;
2727
+ tree.appendChild(this.tree.container);
2728
+ jodit.e.on(this.container, 'contextmenu', (e) => {
2729
+ return jodit.e.fire('contextmenuSource.filebrowser', data, e);
2730
+ });
2731
+ }
2732
+ };
2733
+ UIBrowserSource = (0,tslib__WEBPACK_IMPORTED_MODULE_4__/* .__decorate */ .gn)([
2734
+ jodit_core_decorators__WEBPACK_IMPORTED_MODULE_1__.component
2735
+ ], UIBrowserSource);
2736
+
2737
+
2738
+ /***/ }),
2739
+
2740
+ /***/ 93582:
2741
+ /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
2742
+
2743
+ "use strict";
2744
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, {
2745
+ /* harmony export */ "L": function() { return /* binding */ UIBrowserSources; }
2746
+ /* harmony export */ });
2747
+ /* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(97582);
2748
+ /* harmony import */ var jodit_core_ui__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(75004);
2749
+ /* harmony import */ var jodit_core_decorators__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(50526);
2750
+ /* harmony import */ var _source_source__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(21596);
2751
+ /*!
2752
+ * Jodit Editor PRO (https://xdsoft.net/jodit/)
2753
+ * See LICENSE.md in the project root for license information.
2754
+ * Copyright (c) 2013-2023 Valeriy Chupurnov. All rights reserved. https://xdsoft.net/jodit/pro/
2755
+ */
2756
+
2757
+
2758
+
2759
+
2760
+
2761
+ let UIBrowserSources = class UIBrowserSources extends jodit_core_ui__WEBPACK_IMPORTED_MODULE_0__/* .UIGroup */ .qe {
2762
+ constructor() {
2763
+ super(...arguments);
2764
+ /** @override */
2765
+ this.syncMod = true;
2766
+ }
2767
+ /** @override */
2768
+ className() {
2769
+ return 'UIBrowserSources';
2770
+ }
2771
+ build(items) {
2772
+ this.clear();
2773
+ items.forEach((item) => {
2774
+ this.append(new _source_source__WEBPACK_IMPORTED_MODULE_2__/* .UIBrowserSource */ .f(this.jodit, item));
2775
+ });
2776
+ }
2777
+ };
2778
+ UIBrowserSources = (0,tslib__WEBPACK_IMPORTED_MODULE_3__/* .__decorate */ .gn)([
2779
+ jodit_core_decorators__WEBPACK_IMPORTED_MODULE_1__.component
2780
+ ], UIBrowserSources);
2781
+
2782
+
2783
+ /***/ }),
2784
+
2785
+ /***/ 67775:
2786
+ /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
2787
+
2788
+ "use strict";
2789
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, {
2790
+ /* harmony export */ "s": function() { return /* binding */ UIBrowserStatusBar; }
2791
+ /* harmony export */ });
2792
+ /* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(97582);
2793
+ /* harmony import */ var jodit_core_ui__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(75004);
2794
+ /* harmony import */ var jodit_core_decorators__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(50526);
2795
+ /* harmony import */ var jodit_core_helpers__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(95582);
2796
+ /*!
2797
+ * Jodit Editor PRO (https://xdsoft.net/jodit/)
2798
+ * See LICENSE.md in the project root for license information.
2799
+ * Copyright (c) 2013-2023 Valeriy Chupurnov. All rights reserved. https://xdsoft.net/jodit/pro/
2800
+ */
2801
+
2802
+
2803
+
2804
+
2805
+
2806
+ let UIBrowserStatusBar = class UIBrowserStatusBar extends jodit_core_ui__WEBPACK_IMPORTED_MODULE_0__/* .UIElement */ .u1 {
2807
+ /** @override */
2808
+ className() {
2809
+ return 'UIBrowserStatusBar';
2810
+ }
2811
+ /** @override */
2812
+ render() {
2813
+ return `<div>
2814
+ <div class='&__slot-left'></div>
2815
+ <div class='&__slot-center'></div>
2816
+ <div class='&__slot-right'></div>
2817
+ </div>`;
2818
+ }
2819
+ value(text, slot = 'left') {
2820
+ const slotElm = this.getElm(`slot-${slot}`);
2821
+ void 0;
2822
+ slotElm.innerText = text;
2823
+ return this;
2824
+ }
2825
+ };
2826
+ UIBrowserStatusBar = (0,tslib__WEBPACK_IMPORTED_MODULE_3__/* .__decorate */ .gn)([
2827
+ jodit_core_decorators__WEBPACK_IMPORTED_MODULE_1__.component
2828
+ ], UIBrowserStatusBar);
2829
+
2830
+
2831
+ /***/ }),
2832
+
2833
+ /***/ 91919:
2834
+ /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
2835
+
2836
+ "use strict";
2837
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, {
2838
+ /* harmony export */ "v": function() { return /* binding */ UITree; }
2839
+ /* harmony export */ });
2840
+ /* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(97582);
2841
+ /* harmony import */ var jodit_core_ui__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(75004);
2842
+ /* harmony import */ var jodit_core_decorators_index__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(50526);
2843
+ /* harmony import */ var _folder_folder__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(9890);
2844
+ /*!
2845
+ * Jodit Editor PRO (https://xdsoft.net/jodit/)
2846
+ * See LICENSE.md in the project root for license information.
2847
+ * Copyright (c) 2013-2023 Valeriy Chupurnov. All rights reserved. https://xdsoft.net/jodit/pro/
2848
+ */
2849
+ var UITree_1;
2850
+
2851
+
2852
+
2853
+
2854
+
2855
+ let UITree = UITree_1 = class UITree extends jodit_core_ui__WEBPACK_IMPORTED_MODULE_0__/* .UIGroup */ .qe {
2856
+ /** @override */
2857
+ className() {
2858
+ return 'UITree';
2859
+ }
2860
+ constructor(jodit, items) {
2861
+ super(jodit);
2862
+ /** @override */
2863
+ this.syncMod = true;
2864
+ this.build(items);
2865
+ }
2866
+ build(items) {
2867
+ this.clear();
2868
+ items.forEach((item) => {
2869
+ const folder = new _folder_folder__WEBPACK_IMPORTED_MODULE_2__/* .UIBrowserFolder */ .D(this.jodit, item);
2870
+ this.append(folder);
2871
+ if (item.isActive) {
2872
+ folder.setMod('active', true);
2873
+ }
2874
+ if (item.children.length) {
2875
+ this.append(new UITree_1(this.jodit, item.children));
2876
+ }
2877
+ });
2878
+ }
2879
+ };
2880
+ UITree = UITree_1 = (0,tslib__WEBPACK_IMPORTED_MODULE_3__/* .__decorate */ .gn)([
2881
+ jodit_core_decorators_index__WEBPACK_IMPORTED_MODULE_1__.component
2882
+ ], UITree);
2883
+
2884
+
2885
+ /***/ }),
2886
+
2887
+ /***/ 72618:
2888
+ /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
2889
+
2890
+ "use strict";
2891
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, {
2892
+ /* harmony export */ "d": function() { return /* binding */ UIVirtualScroll; }
2893
+ /* harmony export */ });
2894
+ /* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(97582);
2895
+ /* harmony import */ var jodit_core_ui__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(75004);
2896
+ /* harmony import */ var jodit_core_decorators__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(50526);
2897
+ /* harmony import */ var _item_item__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(87695);
2898
+ /* harmony import */ var jodit_modules_file_browser_builders_item__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(45545);
2899
+ /* harmony import */ var _traits_select_items_select_items__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(81766);
2900
+ /* harmony import */ var jodit_core_helpers__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(95582);
2901
+ /*!
2902
+ * Jodit Editor PRO (https://xdsoft.net/jodit/)
2903
+ * See LICENSE.md in the project root for license information.
2904
+ * Copyright (c) 2013-2023 Valeriy Chupurnov. All rights reserved. https://xdsoft.net/jodit/pro/
2905
+ */
2906
+ var UIVirtualScroll_1;
2907
+
2908
+
2909
+
2910
+
2911
+
2912
+
2913
+
2914
+
2915
+ let UIVirtualScroll = UIVirtualScroll_1 = class UIVirtualScroll extends jodit_core_ui__WEBPACK_IMPORTED_MODULE_0__/* .UIGroup */ .qe {
2916
+ /** @override */
2917
+ className() {
2918
+ return 'UIVirtualScroll';
2919
+ }
2920
+ /** @override */
2921
+ render() {
2922
+ return `<div>
2923
+ <div class="&__empty-message">~There are no files~</div>
2924
+ <div class='&__loader'></div>
2925
+ <div class='&__drag-area'>~Drop image~</div>
2926
+ </div>`;
2927
+ }
2928
+ constructor(jodit, stateManager) {
2929
+ super(jodit);
2930
+ this.stateManager = stateManager;
2931
+ /** @override */
2932
+ this.syncMod = true;
2933
+ this.addItemsSelector();
2934
+ }
2935
+ reconcile(items) {
2936
+ const clearIndex = this.elements.findIndex((elm, index) => {
2937
+ return (!items[index] ||
2938
+ elm.item.uniqueHashKey !==
2939
+ jodit_modules_file_browser_builders_item__WEBPACK_IMPORTED_MODULE_3__/* .FileBrowserItem.create */ .Z.create(items[index]).uniqueHashKey);
2940
+ });
2941
+ if (clearIndex > -1) {
2942
+ for (let i = clearIndex; i < this.elements.length; i += 1) {
2943
+ this.elements[i].destruct();
2944
+ }
2945
+ this.elements.length = clearIndex;
2946
+ }
2947
+ return clearIndex;
2948
+ }
2949
+ build(items) {
2950
+ const clearIndex = this.reconcile(items);
2951
+ items
2952
+ .slice(clearIndex > -1 ? clearIndex : this.elements.length)
2953
+ .forEach((item) => {
2954
+ const elm = new _item_item__WEBPACK_IMPORTED_MODULE_2__/* .UIBrowserItem */ .u(this.jodit, item);
2955
+ Object.keys(this.mods).forEach((mod) => {
2956
+ elm.setMod(mod, this.mods[mod]);
2957
+ });
2958
+ this.append(elm);
2959
+ });
2960
+ this.setMod('empty', !this.elements.length);
2961
+ }
2962
+ onScrollLoadChunk() {
2963
+ if (!this.stateManager.isFavoriteItems &&
2964
+ this.container.scrollHeight -
2965
+ (this.container.scrollTop + this.container.offsetHeight) <
2966
+ this.j.o.pixelOffsetLoadNewChunk) {
2967
+ void this.j.loadingManager.loadItemsChunk();
2968
+ }
2969
+ }
2970
+ onDragOver(e) {
2971
+ e.preventDefault();
2972
+ this.setMod('dragover', true);
2973
+ }
2974
+ onDragLeave(e) {
2975
+ e.preventDefault();
2976
+ this.setMod('dragover', false);
2977
+ }
2978
+ addItemsSelector() {
2979
+ _traits_select_items_select_items__WEBPACK_IMPORTED_MODULE_4__/* .UISelectItems.install */ .r.install(this);
2980
+ }
2981
+ static intersectRect(r1, r2) {
2982
+ return !(r2.left > r1.left + r1.width ||
2983
+ r2.left + r2.width < r1.left ||
2984
+ r2.top > r1.top + r1.height ||
2985
+ r2.top + r2.height < r1.top);
2986
+ }
2987
+ onSelectItems(bound) {
2988
+ const selected = [];
2989
+ this.elements.forEach((elm) => {
2990
+ const pos = (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_5__.position)(elm.container);
2991
+ if (UIVirtualScroll_1.intersectRect(pos, bound)) {
2992
+ selected.push(elm.item);
2993
+ }
2994
+ });
2995
+ this.stateManager.state.activeElements = selected;
2996
+ }
2997
+ };
2998
+ (0,tslib__WEBPACK_IMPORTED_MODULE_6__/* .__decorate */ .gn)([
2999
+ (0,jodit_core_decorators__WEBPACK_IMPORTED_MODULE_1__.watch)(':afterResize'),
3000
+ (0,jodit_core_decorators__WEBPACK_IMPORTED_MODULE_1__.watch)(':resize'),
3001
+ (0,jodit_core_decorators__WEBPACK_IMPORTED_MODULE_1__.watch)('container:scroll'),
3002
+ (0,jodit_core_decorators__WEBPACK_IMPORTED_MODULE_1__.throttle)()
3003
+ ], UIVirtualScroll.prototype, "onScrollLoadChunk", null);
3004
+ (0,tslib__WEBPACK_IMPORTED_MODULE_6__/* .__decorate */ .gn)([
3005
+ (0,jodit_core_decorators__WEBPACK_IMPORTED_MODULE_1__.watch)('container:dragover')
3006
+ ], UIVirtualScroll.prototype, "onDragOver", null);
3007
+ (0,tslib__WEBPACK_IMPORTED_MODULE_6__/* .__decorate */ .gn)([
3008
+ (0,jodit_core_decorators__WEBPACK_IMPORTED_MODULE_1__.watch)(['container:dragleave', 'container:drop'])
3009
+ ], UIVirtualScroll.prototype, "onDragLeave", null);
3010
+ UIVirtualScroll = UIVirtualScroll_1 = (0,tslib__WEBPACK_IMPORTED_MODULE_6__/* .__decorate */ .gn)([
3011
+ jodit_core_decorators__WEBPACK_IMPORTED_MODULE_1__.component
3012
+ ], UIVirtualScroll);
3013
+
3014
+
3015
+ /***/ }),
3016
+
3017
+ /***/ 62499:
3018
+ /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
3019
+
3020
+ "use strict";
3021
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, {
3022
+ /* harmony export */ "c": function() { return /* binding */ UIResize; }
3023
+ /* harmony export */ });
3024
+ /* harmony import */ var jodit_core_helpers_utils_css__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(18002);
3025
+ /* harmony import */ var jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(44913);
3026
+ /*!
3027
+ * Jodit Editor PRO (https://xdsoft.net/jodit/)
3028
+ * See LICENSE.md in the project root for license information.
3029
+ * Copyright (c) 2013-2023 Valeriy Chupurnov. All rights reserved. https://xdsoft.net/jodit/pro/
3030
+ */
3031
+
3032
+
3033
+
3034
+ class UIResize {
3035
+ static remove(element) {
3036
+ (0,jodit_core_helpers_utils_css__WEBPACK_IMPORTED_MODULE_1__/* .css */ .i)(element.container, {
3037
+ width: null,
3038
+ height: null
3039
+ });
3040
+ element.container.classList.remove('jodit-ui-resize');
3041
+ jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_0__/* .Dom.safeRemove */ .i.safeRemove(element.container.querySelector('.jodit-ui-resize__handle'));
3042
+ }
3043
+ static install(element, direction) {
3044
+ element.container.classList.add('jodit-ui-resize');
3045
+ if ((0,jodit_core_helpers_utils_css__WEBPACK_IMPORTED_MODULE_1__/* .css */ .i)(element.container, 'position') === 'static') {
3046
+ (0,jodit_core_helpers_utils_css__WEBPACK_IMPORTED_MODULE_1__/* .css */ .i)(element.container, 'position', 'relative');
3047
+ }
3048
+ const handle = element.j.c.div('jodit-ui-resize__handle');
3049
+ handle.classList.add('jodit-ui-resize__handle_type_' + direction);
3050
+ element.container.appendChild(handle);
3051
+ element.j.e.on(handle, 'mousedown touchstart', this.onStartResize.bind(this, element, direction));
3052
+ }
3053
+ static onStartResize(element, direction, e) {
3054
+ const start = {
3055
+ x: e.clientX,
3056
+ y: e.clientY,
3057
+ w: element.container.offsetWidth,
3058
+ h: element.container.offsetHeight,
3059
+ direction
3060
+ }, onResize = element.j.async.throttle(this.onResize.bind(this, element, start), element.j.defaultTimeout / 10);
3061
+ element.j.lock();
3062
+ element.j.e
3063
+ .on(element.j.ow, 'mousemove touchmove', onResize)
3064
+ .one(element.j.ow, 'mouseup touchend', this.onEndResize.bind(this, element, onResize));
3065
+ }
3066
+ static onResize(element, start, e) {
3067
+ const byWidth = ['left', 'right'].includes(start.direction), parentElement = element.container.parentElement;
3068
+ if (!parentElement) {
3069
+ return;
3070
+ }
3071
+ let diff;
3072
+ if (byWidth) {
3073
+ diff =
3074
+ (start.w +
3075
+ (e.clientX - start.x) *
3076
+ (start.direction === 'right' ? 1 : -1)) /
3077
+ parentElement.offsetWidth;
3078
+ }
3079
+ else {
3080
+ diff =
3081
+ (start.h +
3082
+ (e.clientY - start.y) *
3083
+ (start.direction === 'top' ? 1 : -1)) /
3084
+ parentElement.offsetHeight;
3085
+ }
3086
+ (0,jodit_core_helpers_utils_css__WEBPACK_IMPORTED_MODULE_1__/* .css */ .i)(element.container, byWidth ? 'width' : 'height', diff * 100 + '%');
3087
+ }
3088
+ static onEndResize(element, onResize, _) {
3089
+ element.j.e.off(element.j.ow, 'mousemove touchmove', onResize);
3090
+ element.j.unlock();
3091
+ }
3092
+ }
3093
+
3094
+
3095
+ /***/ }),
3096
+
3097
+ /***/ 81766:
3098
+ /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
3099
+
3100
+ "use strict";
3101
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, {
3102
+ /* harmony export */ "r": function() { return /* binding */ UISelectItems; }
3103
+ /* harmony export */ });
3104
+ /* harmony import */ var jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(44913);
3105
+ /* harmony import */ var jodit_core_helpers_utils_css__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(18002);
3106
+ /*!
3107
+ * Jodit Editor PRO (https://xdsoft.net/jodit/)
3108
+ * See LICENSE.md in the project root for license information.
3109
+ * Copyright (c) 2013-2023 Valeriy Chupurnov. All rights reserved. https://xdsoft.net/jodit/pro/
3110
+ */
3111
+
3112
+
3113
+
3114
+ class UISelectItems {
3115
+ static remove(element) {
3116
+ jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_0__/* .Dom.safeRemove */ .i.safeRemove(element.container.querySelector('.jodit-ui-select-items'));
3117
+ element.j.e.off(element.container, 'mousedown.uiselectitems touchstart.uiselectitems');
3118
+ }
3119
+ static install(element) {
3120
+ const bound = element.j.c.div('jodit-ui-select-items');
3121
+ element.j.e.on(element.container, 'mousedown.uiselectitems touchstart.uiselectitems', this.onStartSelect.bind(this, element, bound));
3122
+ }
3123
+ static onStartSelect(element, bound, e) {
3124
+ if (e.target !== element.container) {
3125
+ return;
3126
+ }
3127
+ (0,jodit_core_helpers_utils_css__WEBPACK_IMPORTED_MODULE_1__/* .css */ .i)(bound, { width: 0, height: 0 });
3128
+ element.container.appendChild(bound);
3129
+ const start = {
3130
+ x: e.clientX,
3131
+ y: e.clientY,
3132
+ w: element.container.offsetWidth,
3133
+ h: element.container.offsetHeight
3134
+ }, onSelect = element.j.async.throttle(this.onSelect.bind(this, element, bound, start), element.j.defaultTimeout / 10);
3135
+ element.j.lock();
3136
+ element.j.e
3137
+ .on(element.j.ow, 'mousemove touchmove', onSelect)
3138
+ .one(element.j.ow, 'mouseup touchend', this.onEndSelect.bind(this, element, bound, onSelect));
3139
+ element.onSelectItems({
3140
+ left: start.x,
3141
+ top: start.y,
3142
+ width: 0,
3143
+ height: 0
3144
+ });
3145
+ }
3146
+ static onSelect(element, bound, start, e) {
3147
+ const left = start.x > e.clientX ? e.clientX : start.x;
3148
+ const top = start.y > e.clientY ? e.clientY : start.y;
3149
+ const selectBound = {
3150
+ left,
3151
+ top,
3152
+ width: Math.abs(start.x - e.clientX),
3153
+ height: Math.abs(start.y - e.clientY)
3154
+ };
3155
+ (0,jodit_core_helpers_utils_css__WEBPACK_IMPORTED_MODULE_1__/* .css */ .i)(bound, selectBound);
3156
+ element.onSelectItems(selectBound);
3157
+ }
3158
+ static onEndSelect(element, bound, onResize, _) {
3159
+ jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_0__/* .Dom.safeRemove */ .i.safeRemove(bound);
3160
+ element.j.e.off(element.j.ow, 'mousemove touchmove', onResize);
3161
+ element.j.unlock();
3162
+ }
3163
+ }
3164
+
3165
+
3166
+ /***/ })
3167
+
3168
+ },
3169
+ /******/ function(__webpack_require__) { // webpackRuntimeModules
3170
+ /******/ var __webpack_exec__ = function(moduleId) { return __webpack_require__(__webpack_require__.s = moduleId); }
3171
+ /******/ var __webpack_exports__ = (__webpack_exec__(48531));
3172
+ /******/ return __webpack_exports__;
3173
+ /******/ }
3174
+ ]);
3175
+ });