argous 1.2.132 → 1.2.136

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 (554) hide show
  1. package/dist/api/index.d.ts +1 -0
  2. package/dist/api/index.js +18 -1
  3. package/dist/components/AutoCompleteFavorites/AutoCompleteFavorites.d.ts +21 -0
  4. package/dist/components/AutoCompleteFavorites/AutoCompleteFavorites.js +331 -0
  5. package/dist/components/Compartilhar/Compartilhar.js +1 -1
  6. package/lib/actions/index.ts +57 -0
  7. package/lib/api/WebSocket.js +148 -0
  8. package/lib/api/index.js +402 -0
  9. package/lib/api/ws.js +27 -0
  10. package/lib/components/Alert/Alert.d.ts +8 -0
  11. package/lib/components/Alert/Alert.js +49 -0
  12. package/lib/components/Alert/index.d.ts +2 -0
  13. package/lib/components/Alert/index.js +1 -0
  14. package/lib/components/ArgousAction/ArgousAction.d.ts +8 -0
  15. package/lib/components/ArgousAction/ArgousAction.js +78 -0
  16. package/lib/components/ArgousAction/index.d.ts +2 -0
  17. package/lib/components/ArgousAction/index.js +1 -0
  18. package/lib/components/ArgousAvatar/ArgousAvatar.d.ts +14 -0
  19. package/lib/components/ArgousAvatar/ArgousAvatar.js +79 -0
  20. package/lib/components/ArgousAvatar/index.d.ts +2 -0
  21. package/lib/components/ArgousAvatar/index.js +1 -0
  22. package/lib/components/ArgousComplexPagination/ArgousComplexPagination.d.ts +76 -0
  23. package/lib/components/ArgousComplexPagination/ArgousComplexPagination.js +182 -0
  24. package/lib/components/ArgousComplexPagination/index.d.ts +2 -0
  25. package/lib/components/ArgousComplexPagination/index.js +1 -0
  26. package/lib/components/ArgousComplexTable/ArgousComplexTable.d.ts +131 -0
  27. package/lib/components/ArgousComplexTable/ArgousComplexTable.js +360 -0
  28. package/lib/components/ArgousComplexTable/index.d.ts +2 -0
  29. package/lib/components/ArgousComplexTable/index.js +1 -0
  30. package/lib/components/ArgousComplexTableBody/ArgousComplexTableBody.d.ts +177 -0
  31. package/lib/components/ArgousComplexTableBody/ArgousComplexTableBody.js +162 -0
  32. package/lib/components/ArgousComplexTableBody/index.d.ts +2 -0
  33. package/lib/components/ArgousComplexTableBody/index.js +1 -0
  34. package/lib/components/ArgousComplexTableHead/ArgousComplexTableHead.d.ts +73 -0
  35. package/lib/components/ArgousComplexTableHead/ArgousComplexTableHead.js +98 -0
  36. package/lib/components/ArgousComplexTableHead/index.d.ts +2 -0
  37. package/lib/components/ArgousComplexTableHead/index.js +1 -0
  38. package/lib/components/ArgousComplexTableToolbar/ArgousComplexTableToolBar.d.ts +58 -0
  39. package/lib/components/ArgousComplexTableToolbar/ArgousComplexTableToolBar.js +66 -0
  40. package/lib/components/ArgousComplexTableToolbar/index.d.ts +2 -0
  41. package/lib/components/ArgousComplexTableToolbar/index.js +1 -0
  42. package/lib/components/ArgousInput/ArgousInput.d.ts +8 -0
  43. package/lib/components/ArgousInput/ArgousInput.js +616 -0
  44. package/lib/components/ArgousInput/index.d.ts +2 -0
  45. package/lib/components/ArgousInput/index.js +1 -0
  46. package/lib/components/ArgousPagination/ArgousPagination.d.ts +8 -0
  47. package/lib/components/ArgousPagination/ArgousPagination.js +43 -0
  48. package/lib/components/ArgousPagination/index.d.ts +2 -0
  49. package/lib/components/ArgousPagination/index.js +1 -0
  50. package/lib/components/ArgousProgressBar/ArgousProgressBar.d.ts +22 -0
  51. package/lib/components/ArgousProgressBar/ArgousProgressBar.js +167 -0
  52. package/lib/components/ArgousProgressBar/index.d.ts +2 -0
  53. package/lib/components/ArgousProgressBar/index.js +1 -0
  54. package/lib/components/ArgousSimpleTable/ArgousSimpleTable.d.ts +8 -0
  55. package/lib/components/ArgousSimpleTable/ArgousSimpleTable.js +241 -0
  56. package/lib/components/ArgousSimpleTable/index.d.ts +2 -0
  57. package/lib/components/ArgousSimpleTable/index.js +1 -0
  58. package/lib/components/AutoComplete/AutoComplete.d.ts +8 -0
  59. package/lib/components/AutoComplete/AutoComplete.js +189 -0
  60. package/lib/components/AutoComplete/index.d.ts +2 -0
  61. package/lib/components/AutoComplete/index.js +1 -0
  62. package/lib/components/AutoCompleteFavorites/AutoCompleteFavorites.js +298 -0
  63. package/lib/components/BarChart/BarChart.d.ts +8 -0
  64. package/lib/components/BarChart/BarChart.js +92 -0
  65. package/lib/components/BarChart/index.d.ts +2 -0
  66. package/lib/components/BarChart/index.js +1 -0
  67. package/lib/components/BarraFerramentas/BarraFerramentas.d.ts +21 -0
  68. package/lib/components/BarraFerramentas/BarraFerramentas.js +277 -0
  69. package/lib/components/BarraFerramentas/index.d.ts +2 -0
  70. package/lib/components/BarraFerramentas/index.js +1 -0
  71. package/lib/components/Button/Button.d.ts +8 -0
  72. package/lib/components/Button/Button.js +135 -0
  73. package/lib/components/Button/index.d.ts +2 -0
  74. package/lib/components/Button/index.js +1 -0
  75. package/lib/components/Cabecalho/Cabecalho.d.ts +8 -0
  76. package/lib/components/Cabecalho/Cabecalho.js +245 -0
  77. package/lib/components/Cabecalho/index.d.ts +2 -0
  78. package/lib/components/Cabecalho/index.js +1 -0
  79. package/lib/components/Calendar/Calendar.d.ts +8 -0
  80. package/lib/components/Calendar/Calendar.js +156 -0
  81. package/lib/components/Calendar/index.d.ts +2 -0
  82. package/lib/components/Calendar/index.js +1 -0
  83. package/lib/components/CartaoUsuario/CartaoUsuario.d.ts +9 -0
  84. package/lib/components/CartaoUsuario/CartaoUsuario.js +108 -0
  85. package/lib/components/CartaoUsuario/index.d.ts +2 -0
  86. package/lib/components/CartaoUsuario/index.js +1 -0
  87. package/lib/components/Collapse/Collapse.d.ts +60 -0
  88. package/lib/components/Collapse/Collapse.js +317 -0
  89. package/lib/components/Collapse/index.d.ts +3 -0
  90. package/lib/components/Collapse/index.js +1 -0
  91. package/lib/components/Compartilhar/Compartilhar.d.ts +7 -0
  92. package/lib/components/Compartilhar/Compartilhar.js +314 -0
  93. package/lib/components/Compartilhar/index.d.ts +2 -0
  94. package/lib/components/Compartilhar/index.js +1 -0
  95. package/lib/components/ConfirmModal/BasicModal.tsx +63 -0
  96. package/lib/components/ConfirmModal/ModalProvider.tsx +81 -0
  97. package/lib/components/ConfirmModal/WrapperModal.tsx +33 -0
  98. package/lib/components/ConfirmModal/index.d.ts +20 -0
  99. package/lib/components/ConfirmModal/index.js +8 -0
  100. package/lib/components/DropArea/DropArea.d.ts +21 -0
  101. package/lib/components/DropArea/DropArea.js +90 -0
  102. package/lib/components/DropArea/Html5FileSelector.js +164 -0
  103. package/lib/components/DropArea/index.d.ts +2 -0
  104. package/lib/components/DropArea/index.js +1 -0
  105. package/lib/components/Editor/Events.ts +83 -0
  106. package/lib/components/Editor/ScriptLoader.ts +96 -0
  107. package/lib/components/Editor/TinyMCE.ts +19 -0
  108. package/lib/components/Editor/Utils.ts +95 -0
  109. package/lib/components/Editor/components/Editor.tsx +375 -0
  110. package/lib/components/Editor/components/EditorPropTypes.ts +106 -0
  111. package/lib/components/Editor/index.tsx +11 -0
  112. package/lib/components/Editor/skins/content/dark/content.css +72 -0
  113. package/lib/components/Editor/skins/content/dark/content.min.css +8 -0
  114. package/lib/components/Editor/skins/content/dark/content.min.css.map +1 -0
  115. package/lib/components/Editor/skins/content/default/content.css +67 -0
  116. package/lib/components/Editor/skins/content/default/content.min.css +8 -0
  117. package/lib/components/Editor/skins/content/default/content.min.css.map +1 -0
  118. package/lib/components/Editor/skins/content/document/content.css +72 -0
  119. package/lib/components/Editor/skins/content/document/content.min.css +8 -0
  120. package/lib/components/Editor/skins/content/document/content.min.css.map +1 -0
  121. package/lib/components/Editor/skins/content/writer/content.css +68 -0
  122. package/lib/components/Editor/skins/content/writer/content.min.css +8 -0
  123. package/lib/components/Editor/skins/content/writer/content.min.css.map +1 -0
  124. package/lib/components/Editor/skins/ui/dark/content.css +714 -0
  125. package/lib/components/Editor/skins/ui/dark/content.inline.css +726 -0
  126. package/lib/components/Editor/skins/ui/dark/content.inline.min.css +8 -0
  127. package/lib/components/Editor/skins/ui/dark/content.inline.min.css.map +1 -0
  128. package/lib/components/Editor/skins/ui/dark/content.min.css +8 -0
  129. package/lib/components/Editor/skins/ui/dark/content.min.css.map +1 -0
  130. package/lib/components/Editor/skins/ui/dark/content.mobile.css +29 -0
  131. package/lib/components/Editor/skins/ui/dark/content.mobile.min.css +8 -0
  132. package/lib/components/Editor/skins/ui/dark/content.mobile.min.css.map +1 -0
  133. package/lib/components/Editor/skins/ui/dark/fonts/tinymce-mobile.woff +0 -0
  134. package/lib/components/Editor/skins/ui/dark/skin.css +3034 -0
  135. package/lib/components/Editor/skins/ui/dark/skin.min.css +8 -0
  136. package/lib/components/Editor/skins/ui/dark/skin.min.css.map +1 -0
  137. package/lib/components/Editor/skins/ui/dark/skin.mobile.css +673 -0
  138. package/lib/components/Editor/skins/ui/dark/skin.mobile.min.css +8 -0
  139. package/lib/components/Editor/skins/ui/dark/skin.mobile.min.css.map +1 -0
  140. package/lib/components/Editor/skins/ui/dark/skin.shadowdom.css +37 -0
  141. package/lib/components/Editor/skins/ui/dark/skin.shadowdom.min.css +8 -0
  142. package/lib/components/Editor/skins/ui/dark/skin.shadowdom.min.css.map +1 -0
  143. package/lib/components/Editor/skins/ui/default/content.css +732 -0
  144. package/lib/components/Editor/skins/ui/default/content.inline.css +726 -0
  145. package/lib/components/Editor/skins/ui/default/content.inline.min.css +8 -0
  146. package/lib/components/Editor/skins/ui/default/content.inline.min.css.map +1 -0
  147. package/lib/components/Editor/skins/ui/default/content.min.css +8 -0
  148. package/lib/components/Editor/skins/ui/default/content.min.css.map +1 -0
  149. package/lib/components/Editor/skins/ui/default/content.mobile.css +29 -0
  150. package/lib/components/Editor/skins/ui/default/content.mobile.min.css +8 -0
  151. package/lib/components/Editor/skins/ui/default/content.mobile.min.css.map +1 -0
  152. package/lib/components/Editor/skins/ui/default/fonts/tinymce-mobile.woff +0 -0
  153. package/lib/components/Editor/skins/ui/default/skin.css +3034 -0
  154. package/lib/components/Editor/skins/ui/default/skin.min.css +8 -0
  155. package/lib/components/Editor/skins/ui/default/skin.min.css.map +1 -0
  156. package/lib/components/Editor/skins/ui/default/skin.mobile.css +673 -0
  157. package/lib/components/Editor/skins/ui/default/skin.mobile.min.css +8 -0
  158. package/lib/components/Editor/skins/ui/default/skin.mobile.min.css.map +1 -0
  159. package/lib/components/Editor/skins/ui/default/skin.shadowdom.css +37 -0
  160. package/lib/components/Editor/skins/ui/default/skin.shadowdom.min.css +8 -0
  161. package/lib/components/Editor/skins/ui/default/skin.shadowdom.min.css.map +1 -0
  162. package/lib/components/Editor/skins/ui/plugin-tinycomments-tinymce4/fonts/tinymce-mobile.woff +0 -0
  163. package/lib/components/Editor/skins/ui/plugin-tinycomments-tinymce4/plugin-tinycomments-tinymce4.css +1641 -0
  164. package/lib/components/Editor/skins/ui/plugin-tinycomments-tinymce4/plugin-tinycomments-tinymce4.min.css +8 -0
  165. package/lib/components/Editor/skins/ui/plugin-tinycomments-tinymce4/plugin-tinycomments-tinymce4.min.css.map +1 -0
  166. package/lib/components/Editor/tinymce/README.md +63 -0
  167. package/lib/components/Editor/tinymce/icons/default/icons.js +172 -0
  168. package/lib/components/Editor/tinymce/icons/default/icons.min.js +1 -0
  169. package/lib/components/Editor/tinymce/jquery.tinymce.min.js +92 -0
  170. package/lib/components/Editor/tinymce/langs/README.md +3 -0
  171. package/lib/components/Editor/tinymce/langs/pt_BR.js +419 -0
  172. package/lib/components/Editor/tinymce/license.txt +504 -0
  173. package/lib/components/Editor/tinymce/plugins/advlist/plugin.js +280 -0
  174. package/lib/components/Editor/tinymce/plugins/advlist/plugin.min.js +9 -0
  175. package/lib/components/Editor/tinymce/plugins/anchor/plugin.js +216 -0
  176. package/lib/components/Editor/tinymce/plugins/anchor/plugin.min.js +9 -0
  177. package/lib/components/Editor/tinymce/plugins/autolink/plugin.js +185 -0
  178. package/lib/components/Editor/tinymce/plugins/autolink/plugin.min.js +9 -0
  179. package/lib/components/Editor/tinymce/plugins/autoresize/plugin.js +171 -0
  180. package/lib/components/Editor/tinymce/plugins/autoresize/plugin.min.js +9 -0
  181. package/lib/components/Editor/tinymce/plugins/autosave/plugin.js +212 -0
  182. package/lib/components/Editor/tinymce/plugins/autosave/plugin.min.js +9 -0
  183. package/lib/components/Editor/tinymce/plugins/bbcode/plugin.js +99 -0
  184. package/lib/components/Editor/tinymce/plugins/bbcode/plugin.min.js +9 -0
  185. package/lib/components/Editor/tinymce/plugins/charmap/plugin.js +1706 -0
  186. package/lib/components/Editor/tinymce/plugins/charmap/plugin.min.js +9 -0
  187. package/lib/components/Editor/tinymce/plugins/code/plugin.js +92 -0
  188. package/lib/components/Editor/tinymce/plugins/code/plugin.min.js +9 -0
  189. package/lib/components/Editor/tinymce/plugins/codesample/plugin.js +2332 -0
  190. package/lib/components/Editor/tinymce/plugins/codesample/plugin.min.js +9 -0
  191. package/{dist/components/Editor/tinymce/plugins/textcolor → lib/components/Editor/tinymce/plugins/colorpicker}/plugin.js +8 -5
  192. package/lib/components/Editor/tinymce/plugins/colorpicker/plugin.min.js +9 -0
  193. package/{dist/components/Editor/tinymce/plugins/colorpicker → lib/components/Editor/tinymce/plugins/contextmenu}/plugin.js +8 -5
  194. package/lib/components/Editor/tinymce/plugins/contextmenu/plugin.min.js +9 -0
  195. package/lib/components/Editor/tinymce/plugins/directionality/plugin.js +320 -0
  196. package/lib/components/Editor/tinymce/plugins/directionality/plugin.min.js +9 -0
  197. package/lib/components/Editor/tinymce/plugins/emoticons/js/emojiimages.js +9424 -0
  198. package/lib/components/Editor/tinymce/plugins/emoticons/js/emojiimages.min.js +3 -0
  199. package/lib/components/Editor/tinymce/plugins/emoticons/js/emojis.js +9423 -0
  200. package/lib/components/Editor/tinymce/plugins/emoticons/js/emojis.min.js +2 -0
  201. package/lib/components/Editor/tinymce/plugins/emoticons/plugin.js +605 -0
  202. package/lib/components/Editor/tinymce/plugins/emoticons/plugin.min.js +9 -0
  203. package/lib/components/Editor/tinymce/plugins/fullpage/plugin.js +544 -0
  204. package/lib/components/Editor/tinymce/plugins/fullpage/plugin.min.js +9 -0
  205. package/lib/components/Editor/tinymce/plugins/fullscreen/plugin.js +979 -0
  206. package/lib/components/Editor/tinymce/plugins/fullscreen/plugin.min.js +9 -0
  207. package/lib/components/Editor/tinymce/plugins/help/plugin.js +873 -0
  208. package/lib/components/Editor/tinymce/plugins/help/plugin.min.js +9 -0
  209. package/lib/components/Editor/tinymce/plugins/hr/plugin.js +46 -0
  210. package/lib/components/Editor/tinymce/plugins/hr/plugin.min.js +9 -0
  211. package/lib/components/Editor/tinymce/plugins/image/plugin.js +1661 -0
  212. package/lib/components/Editor/tinymce/plugins/image/plugin.min.js +9 -0
  213. package/lib/components/Editor/tinymce/plugins/imagetools/plugin.js +1354 -0
  214. package/lib/components/Editor/tinymce/plugins/imagetools/plugin.min.js +9 -0
  215. package/lib/components/Editor/tinymce/plugins/importcss/plugin.js +343 -0
  216. package/lib/components/Editor/tinymce/plugins/importcss/plugin.min.js +9 -0
  217. package/lib/components/Editor/tinymce/plugins/insertdatetime/plugin.js +177 -0
  218. package/lib/components/Editor/tinymce/plugins/insertdatetime/plugin.min.js +9 -0
  219. package/lib/components/Editor/tinymce/plugins/legacyoutput/plugin.js +199 -0
  220. package/lib/components/Editor/tinymce/plugins/legacyoutput/plugin.min.js +9 -0
  221. package/lib/components/Editor/tinymce/plugins/link/plugin.js +1287 -0
  222. package/lib/components/Editor/tinymce/plugins/link/plugin.min.js +9 -0
  223. package/lib/components/Editor/tinymce/plugins/lists/plugin.js +2286 -0
  224. package/lib/components/Editor/tinymce/plugins/lists/plugin.min.js +9 -0
  225. package/lib/components/Editor/tinymce/plugins/media/plugin.js +1382 -0
  226. package/lib/components/Editor/tinymce/plugins/media/plugin.min.js +9 -0
  227. package/lib/components/Editor/tinymce/plugins/nonbreaking/plugin.js +101 -0
  228. package/lib/components/Editor/tinymce/plugins/nonbreaking/plugin.min.js +9 -0
  229. package/lib/components/Editor/tinymce/plugins/noneditable/plugin.js +117 -0
  230. package/lib/components/Editor/tinymce/plugins/noneditable/plugin.min.js +9 -0
  231. package/lib/components/Editor/tinymce/plugins/pagebreak/plugin.js +105 -0
  232. package/lib/components/Editor/tinymce/plugins/pagebreak/plugin.min.js +9 -0
  233. package/lib/components/Editor/tinymce/plugins/paste/plugin.js +1764 -0
  234. package/lib/components/Editor/tinymce/plugins/paste/plugin.min.js +9 -0
  235. package/lib/components/Editor/tinymce/plugins/preview/plugin.js +127 -0
  236. package/lib/components/Editor/tinymce/plugins/preview/plugin.min.js +9 -0
  237. package/lib/components/Editor/tinymce/plugins/print/plugin.js +53 -0
  238. package/lib/components/Editor/tinymce/plugins/print/plugin.min.js +9 -0
  239. package/lib/components/Editor/tinymce/plugins/quickbars/plugin.js +489 -0
  240. package/lib/components/Editor/tinymce/plugins/quickbars/plugin.min.js +9 -0
  241. package/lib/components/Editor/tinymce/plugins/save/plugin.js +119 -0
  242. package/lib/components/Editor/tinymce/plugins/save/plugin.min.js +9 -0
  243. package/lib/components/Editor/tinymce/plugins/searchreplace/plugin.js +1163 -0
  244. package/lib/components/Editor/tinymce/plugins/searchreplace/plugin.min.js +9 -0
  245. package/lib/components/Editor/tinymce/plugins/spellchecker/plugin.js +731 -0
  246. package/lib/components/Editor/tinymce/plugins/spellchecker/plugin.min.js +9 -0
  247. package/lib/components/Editor/tinymce/plugins/tabfocus/plugin.js +129 -0
  248. package/lib/components/Editor/tinymce/plugins/tabfocus/plugin.min.js +9 -0
  249. package/lib/components/Editor/tinymce/plugins/table/plugin.js +10938 -0
  250. package/lib/components/Editor/tinymce/plugins/table/plugin.min.js +9 -0
  251. package/lib/components/Editor/tinymce/plugins/template/plugin.js +577 -0
  252. package/lib/components/Editor/tinymce/plugins/template/plugin.min.js +9 -0
  253. package/{dist/components/Editor/tinymce/plugins/contextmenu → lib/components/Editor/tinymce/plugins/textcolor}/plugin.js +8 -5
  254. package/lib/components/Editor/tinymce/plugins/textcolor/plugin.min.js +9 -0
  255. package/lib/components/Editor/tinymce/plugins/textpattern/plugin.js +1394 -0
  256. package/lib/components/Editor/tinymce/plugins/textpattern/plugin.min.js +9 -0
  257. package/lib/components/Editor/tinymce/plugins/toc/plugin.js +236 -0
  258. package/lib/components/Editor/tinymce/plugins/toc/plugin.min.js +9 -0
  259. package/lib/components/Editor/tinymce/plugins/visualblocks/plugin.js +104 -0
  260. package/lib/components/Editor/tinymce/plugins/visualblocks/plugin.min.js +9 -0
  261. package/lib/components/Editor/tinymce/plugins/visualchars/plugin.js +541 -0
  262. package/lib/components/Editor/tinymce/plugins/visualchars/plugin.min.js +9 -0
  263. package/lib/components/Editor/tinymce/plugins/wordcount/plugin.js +416 -0
  264. package/lib/components/Editor/tinymce/plugins/wordcount/plugin.min.js +9 -0
  265. package/lib/components/Editor/tinymce/skins/content/dark/content.css +72 -0
  266. package/lib/components/Editor/tinymce/skins/content/dark/content.min.css +8 -0
  267. package/lib/components/Editor/tinymce/skins/content/dark/content.min.css.map +1 -0
  268. package/lib/components/Editor/tinymce/skins/content/default/content.css +67 -0
  269. package/lib/components/Editor/tinymce/skins/content/default/content.min.css +8 -0
  270. package/lib/components/Editor/tinymce/skins/content/default/content.min.css.map +1 -0
  271. package/lib/components/Editor/tinymce/skins/content/document/content.css +72 -0
  272. package/lib/components/Editor/tinymce/skins/content/document/content.min.css +8 -0
  273. package/lib/components/Editor/tinymce/skins/content/document/content.min.css.map +1 -0
  274. package/lib/components/Editor/tinymce/skins/content/writer/content.css +68 -0
  275. package/lib/components/Editor/tinymce/skins/content/writer/content.min.css +8 -0
  276. package/lib/components/Editor/tinymce/skins/content/writer/content.min.css.map +1 -0
  277. package/lib/components/Editor/tinymce/skins/ui/oxide/content.css +732 -0
  278. package/lib/components/Editor/tinymce/skins/ui/oxide/content.inline.css +726 -0
  279. package/lib/components/Editor/tinymce/skins/ui/oxide/content.inline.min.css +8 -0
  280. package/lib/components/Editor/tinymce/skins/ui/oxide/content.inline.min.css.map +1 -0
  281. package/lib/components/Editor/tinymce/skins/ui/oxide/content.min.css +8 -0
  282. package/lib/components/Editor/tinymce/skins/ui/oxide/content.min.css.map +1 -0
  283. package/lib/components/Editor/tinymce/skins/ui/oxide/content.mobile.css +29 -0
  284. package/lib/components/Editor/tinymce/skins/ui/oxide/content.mobile.min.css +8 -0
  285. package/lib/components/Editor/tinymce/skins/ui/oxide/content.mobile.min.css.map +1 -0
  286. package/lib/components/Editor/tinymce/skins/ui/oxide/fonts/tinymce-mobile.woff +0 -0
  287. package/lib/components/Editor/tinymce/skins/ui/oxide/skin.css +3034 -0
  288. package/lib/components/Editor/tinymce/skins/ui/oxide/skin.min.css +8 -0
  289. package/lib/components/Editor/tinymce/skins/ui/oxide/skin.min.css.map +1 -0
  290. package/lib/components/Editor/tinymce/skins/ui/oxide/skin.mobile.css +673 -0
  291. package/lib/components/Editor/tinymce/skins/ui/oxide/skin.mobile.min.css +8 -0
  292. package/lib/components/Editor/tinymce/skins/ui/oxide/skin.mobile.min.css.map +1 -0
  293. package/lib/components/Editor/tinymce/skins/ui/oxide/skin.shadowdom.css +37 -0
  294. package/lib/components/Editor/tinymce/skins/ui/oxide/skin.shadowdom.min.css +8 -0
  295. package/lib/components/Editor/tinymce/skins/ui/oxide/skin.shadowdom.min.css.map +1 -0
  296. package/lib/components/Editor/tinymce/skins/ui/oxide-dark/content.css +714 -0
  297. package/lib/components/Editor/tinymce/skins/ui/oxide-dark/content.inline.css +726 -0
  298. package/lib/components/Editor/tinymce/skins/ui/oxide-dark/content.inline.min.css +8 -0
  299. package/lib/components/Editor/tinymce/skins/ui/oxide-dark/content.inline.min.css.map +1 -0
  300. package/lib/components/Editor/tinymce/skins/ui/oxide-dark/content.min.css +8 -0
  301. package/lib/components/Editor/tinymce/skins/ui/oxide-dark/content.min.css.map +1 -0
  302. package/lib/components/Editor/tinymce/skins/ui/oxide-dark/content.mobile.css +29 -0
  303. package/lib/components/Editor/tinymce/skins/ui/oxide-dark/content.mobile.min.css +8 -0
  304. package/lib/components/Editor/tinymce/skins/ui/oxide-dark/content.mobile.min.css.map +1 -0
  305. package/lib/components/Editor/tinymce/skins/ui/oxide-dark/fonts/tinymce-mobile.woff +0 -0
  306. package/lib/components/Editor/tinymce/skins/ui/oxide-dark/skin.css +3034 -0
  307. package/lib/components/Editor/tinymce/skins/ui/oxide-dark/skin.min.css +8 -0
  308. package/lib/components/Editor/tinymce/skins/ui/oxide-dark/skin.min.css.map +1 -0
  309. package/lib/components/Editor/tinymce/skins/ui/oxide-dark/skin.mobile.css +673 -0
  310. package/lib/components/Editor/tinymce/skins/ui/oxide-dark/skin.mobile.min.css +8 -0
  311. package/lib/components/Editor/tinymce/skins/ui/oxide-dark/skin.mobile.min.css.map +1 -0
  312. package/lib/components/Editor/tinymce/skins/ui/oxide-dark/skin.shadowdom.css +37 -0
  313. package/lib/components/Editor/tinymce/skins/ui/oxide-dark/skin.shadowdom.min.css +8 -0
  314. package/lib/components/Editor/tinymce/skins/ui/oxide-dark/skin.shadowdom.min.css.map +1 -0
  315. package/lib/components/Editor/tinymce/themes/mobile/theme.js +13587 -0
  316. package/lib/components/Editor/tinymce/themes/mobile/theme.min.js +9 -0
  317. package/lib/components/Editor/tinymce/themes/silver/theme.js +32480 -0
  318. package/lib/components/Editor/tinymce/themes/silver/theme.min.js +9 -0
  319. package/lib/components/Editor/tinymce/tinymce.d.ts +2963 -0
  320. package/lib/components/Editor/tinymce/tinymce.js +30106 -0
  321. package/lib/components/Editor/tinymce/tinymce.min.js +30106 -0
  322. package/lib/components/FilePreparer/FilePreparer.d.ts +26 -0
  323. package/lib/components/FilePreparer/FilePreparer.js +247 -0
  324. package/lib/components/FilePreparer/index.d.ts +2 -0
  325. package/lib/components/FilePreparer/index.js +1 -0
  326. package/lib/components/FileUploader/FileUploader.d.ts +9 -0
  327. package/lib/components/FileUploader/FileUploader.js +318 -0
  328. package/lib/components/FileUploader/index.d.ts +2 -0
  329. package/lib/components/FileUploader/index.js +1 -0
  330. package/lib/components/FormVisualizer/FormVisualizer.d.ts +92 -0
  331. package/lib/components/FormVisualizer/FormVisualizer.js +289 -0
  332. package/lib/components/FormVisualizer/index.d.ts +2 -0
  333. package/lib/components/FormVisualizer/index.js +1 -0
  334. package/lib/components/Highlight/Highlight.d.ts +7 -0
  335. package/lib/components/Highlight/Highlight.js +51 -0
  336. package/lib/components/Highlight/index.d.ts +2 -0
  337. package/lib/components/Highlight/index.js +1 -0
  338. package/lib/components/ImageResize/ImageResize.d.ts +28 -0
  339. package/lib/components/ImageResize/ImageResize.js +479 -0
  340. package/lib/components/ImageResize/index.d.ts +2 -0
  341. package/lib/components/ImageResize/index.js +1 -0
  342. package/lib/components/ImageResizeButton/ImageResizeButton.d.ts +26 -0
  343. package/lib/components/ImageResizeButton/ImageResizeButton.js +65 -0
  344. package/lib/components/ImageResizeButton/index.d.ts +2 -0
  345. package/lib/components/ImageResizeButton/index.js +1 -0
  346. package/lib/components/Input/Input.d.ts +8 -0
  347. package/lib/components/Input/Input.js +353 -0
  348. package/lib/components/Input/index.d.ts +2 -0
  349. package/lib/components/Input/index.js +1 -0
  350. package/lib/components/InputTags/InputTags.d.ts +8 -0
  351. package/lib/components/InputTags/InputTags.js +94 -0
  352. package/lib/components/InputTags/index.d.ts +2 -0
  353. package/lib/components/InputTags/index.js +1 -0
  354. package/lib/components/ListSelect/ListSelect.d.ts +8 -0
  355. package/lib/components/ListSelect/ListSelect.js +94 -0
  356. package/lib/components/ListSelect/index.d.ts +2 -0
  357. package/lib/components/ListSelect/index.js +1 -0
  358. package/lib/components/MaterialButton/MaterialButton.d.ts +13 -0
  359. package/lib/components/MaterialButton/MaterialButton.js +177 -0
  360. package/lib/components/MaterialButton/index.d.ts +2 -0
  361. package/lib/components/MaterialButton/index.js +1 -0
  362. package/lib/components/MenuBar/MenuBar.d.ts +8 -0
  363. package/lib/components/MenuBar/MenuBar.js +139 -0
  364. package/lib/components/MenuBar/index.d.ts +2 -0
  365. package/lib/components/MenuBar/index.js +1 -0
  366. package/lib/components/MonthPicker/MonthPicker.d.ts +8 -0
  367. package/lib/components/MonthPicker/MonthPicker.js +313 -0
  368. package/lib/components/MonthPicker/index.d.ts +2 -0
  369. package/lib/components/MonthPicker/index.js +1 -0
  370. package/lib/components/MultipleSelect/MultipleSelect.d.ts +8 -0
  371. package/lib/components/MultipleSelect/MultipleSelect.js +106 -0
  372. package/lib/components/MultipleSelect/index.d.ts +2 -0
  373. package/lib/components/MultipleSelect/index.js +1 -0
  374. package/lib/components/OtpInput/OtpInput.tsx +244 -0
  375. package/lib/components/OtpInput/index.d.ts +2 -0
  376. package/lib/components/OtpInput/index.js +1 -0
  377. package/lib/components/OutputText/OutputText.d.ts +8 -0
  378. package/lib/components/OutputText/OutputText.js +57 -0
  379. package/lib/components/OutputText/index.d.ts +2 -0
  380. package/lib/components/OutputText/index.js +1 -0
  381. package/lib/components/Pagination/Pagination.d.ts +8 -0
  382. package/lib/components/Pagination/Pagination.js +32 -0
  383. package/lib/components/Pagination/index.d.ts +2 -0
  384. package/lib/components/Pagination/index.js +1 -0
  385. package/lib/components/Programa/Programa.d.ts +31 -0
  386. package/lib/components/Programa/Programa.js +172 -0
  387. package/lib/components/Programa/index.d.ts +2 -0
  388. package/lib/components/Programa/index.js +1 -0
  389. package/lib/components/ProgressBar/ProgressBar.d.ts +8 -0
  390. package/lib/components/ProgressBar/ProgressBar.js +71 -0
  391. package/lib/components/ProgressBar/index.d.ts +2 -0
  392. package/lib/components/ProgressBar/index.js +1 -0
  393. package/lib/components/Select/Select.d.ts +8 -0
  394. package/lib/components/Select/Select.js +117 -0
  395. package/lib/components/Select/index.d.ts +2 -0
  396. package/lib/components/Select/index.js +1 -0
  397. package/lib/components/SimpleTable/SimpleTable.d.ts +13 -0
  398. package/lib/components/SimpleTable/SimpleTable.js +504 -0
  399. package/lib/components/SimpleTable/index.d.ts +2 -0
  400. package/lib/components/SimpleTable/index.js +2 -0
  401. package/lib/components/Stepper/Stepper.d.ts +54 -0
  402. package/lib/components/Stepper/Stepper.js +222 -0
  403. package/lib/components/Stepper/index.d.ts +2 -0
  404. package/lib/components/Stepper/index.js +1 -0
  405. package/lib/components/TablePicker/TablePicker.d.ts +8 -0
  406. package/lib/components/TablePicker/TablePicker.js +238 -0
  407. package/lib/components/TablePicker/index.d.ts +2 -0
  408. package/lib/components/TablePicker/index.js +1 -0
  409. package/lib/components/Tabs/Tabs.d.ts +8 -0
  410. package/lib/components/Tabs/Tabs.js +59 -0
  411. package/lib/components/Tabs/index.d.ts +2 -0
  412. package/lib/components/Tabs/index.js +1 -0
  413. package/lib/components/TextArea/TextArea.d.ts +8 -0
  414. package/lib/components/TextArea/TextArea.js +123 -0
  415. package/lib/components/TextArea/index.d.ts +2 -0
  416. package/lib/components/TextArea/index.js +1 -0
  417. package/lib/components/ThreadLog/ThreadLog.d.ts +8 -0
  418. package/lib/components/ThreadLog/ThreadLog.js +189 -0
  419. package/lib/components/ThreadLog/index.d.ts +2 -0
  420. package/lib/components/ThreadLog/index.js +1 -0
  421. package/lib/components/UtilAutoComplete/UtilAutoComplete.d.ts +93 -0
  422. package/lib/components/UtilAutoComplete/UtilAutoComplete.js +130 -0
  423. package/lib/components/UtilAutoComplete/index.d.ts +2 -0
  424. package/lib/components/UtilAutoComplete/index.js +1 -0
  425. package/lib/components/index.d.ts +148 -0
  426. package/lib/components/index.js +146 -0
  427. package/lib/fieldsRedux/createField.d.ts +8 -0
  428. package/lib/fieldsRedux/createField.js +120 -0
  429. package/lib/fieldsRedux/fieldsRedux.d.ts +71 -0
  430. package/lib/fieldsRedux/fieldsRedux.js +391 -0
  431. package/lib/fieldsRedux/index.d.ts +4 -0
  432. package/lib/fieldsRedux/index.js +5 -0
  433. package/lib/fieldsRedux/passFields.d.ts +5 -0
  434. package/lib/fieldsRedux/passFields.js +76 -0
  435. package/lib/reducers/argous.ts +103 -0
  436. package/lib/reducers/index.ts +6 -0
  437. package/lib/types.d.ts +144 -0
  438. package/lib/utils/api.ts +153 -0
  439. package/lib/utils/config.ts +12 -0
  440. package/lib/utils/date.ts +63 -0
  441. package/lib/utils/index.ts +314 -0
  442. package/lib/utils/rippleEffect.js +211 -0
  443. package/lib/utils/store.ts +11 -0
  444. package/lib/utils/xmlToJson.js +117 -0
  445. package/package.json +1 -1
  446. package/dist/components/ArgousComplexTableBody/dnd/Container.d.ts +0 -55
  447. package/dist/components/ArgousComplexTableBody/dnd/Container.js +0 -173
  448. package/dist/components/ArgousComplexTableBody/dnd/Draggable.d.ts +0 -14
  449. package/dist/components/ArgousComplexTableBody/dnd/Draggable.js +0 -73
  450. package/dist/components/ArgousComplexTableBody/dnd/index.d.ts +0 -2
  451. package/dist/components/ArgousComplexTableBody/dnd/index.js +0 -10
  452. package/dist/components/ConfirmModal/useModal.d.ts +0 -2
  453. package/dist/components/ConfirmModal/useModal.js +0 -9
  454. package/dist/components/DropArea/worker.d.ts +0 -1
  455. package/dist/components/DropArea/worker.js +0 -55
  456. package/dist/components/Editor/tinymce/icons/default/icons.d.ts +0 -0
  457. package/dist/components/Editor/tinymce/icons/default/icons.js +0 -173
  458. package/dist/components/Editor/tinymce/plugins/advlist/plugin.d.ts +0 -0
  459. package/dist/components/Editor/tinymce/plugins/advlist/plugin.js +0 -271
  460. package/dist/components/Editor/tinymce/plugins/anchor/plugin.d.ts +0 -0
  461. package/dist/components/Editor/tinymce/plugins/anchor/plugin.js +0 -207
  462. package/dist/components/Editor/tinymce/plugins/autolink/plugin.d.ts +0 -0
  463. package/dist/components/Editor/tinymce/plugins/autolink/plugin.js +0 -187
  464. package/dist/components/Editor/tinymce/plugins/autoresize/plugin.d.ts +0 -0
  465. package/dist/components/Editor/tinymce/plugins/autoresize/plugin.js +0 -163
  466. package/dist/components/Editor/tinymce/plugins/autosave/plugin.d.ts +0 -0
  467. package/dist/components/Editor/tinymce/plugins/autosave/plugin.js +0 -199
  468. package/dist/components/Editor/tinymce/plugins/bbcode/plugin.d.ts +0 -0
  469. package/dist/components/Editor/tinymce/plugins/bbcode/plugin.js +0 -94
  470. package/dist/components/Editor/tinymce/plugins/charmap/plugin.d.ts +0 -0
  471. package/dist/components/Editor/tinymce/plugins/charmap/plugin.js +0 -1691
  472. package/dist/components/Editor/tinymce/plugins/code/plugin.d.ts +0 -0
  473. package/dist/components/Editor/tinymce/plugins/code/plugin.js +0 -85
  474. package/dist/components/Editor/tinymce/plugins/codesample/plugin.js +0 -2331
  475. package/dist/components/Editor/tinymce/plugins/colorpicker/plugin.d.ts +0 -0
  476. package/dist/components/Editor/tinymce/plugins/contextmenu/plugin.d.ts +0 -0
  477. package/dist/components/Editor/tinymce/plugins/directionality/plugin.d.ts +0 -0
  478. package/dist/components/Editor/tinymce/plugins/directionality/plugin.js +0 -300
  479. package/dist/components/Editor/tinymce/plugins/emoticons/js/emojiimages.d.ts +0 -0
  480. package/dist/components/Editor/tinymce/plugins/emoticons/js/emojiimages.js +0 -9425
  481. package/dist/components/Editor/tinymce/plugins/emoticons/js/emojis.d.ts +0 -0
  482. package/dist/components/Editor/tinymce/plugins/emoticons/js/emojis.js +0 -9424
  483. package/dist/components/Editor/tinymce/plugins/emoticons/plugin.d.ts +0 -0
  484. package/dist/components/Editor/tinymce/plugins/emoticons/plugin.js +0 -585
  485. package/dist/components/Editor/tinymce/plugins/fullpage/plugin.d.ts +0 -0
  486. package/dist/components/Editor/tinymce/plugins/fullpage/plugin.js +0 -539
  487. package/dist/components/Editor/tinymce/plugins/fullscreen/plugin.d.ts +0 -0
  488. package/dist/components/Editor/tinymce/plugins/fullscreen/plugin.js +0 -962
  489. package/dist/components/Editor/tinymce/plugins/help/plugin.d.ts +0 -0
  490. package/dist/components/Editor/tinymce/plugins/help/plugin.js +0 -850
  491. package/dist/components/Editor/tinymce/plugins/hr/plugin.d.ts +0 -0
  492. package/dist/components/Editor/tinymce/plugins/hr/plugin.js +0 -41
  493. package/dist/components/Editor/tinymce/plugins/image/plugin.d.ts +0 -0
  494. package/dist/components/Editor/tinymce/plugins/image/plugin.js +0 -1673
  495. package/dist/components/Editor/tinymce/plugins/imagetools/plugin.d.ts +0 -0
  496. package/dist/components/Editor/tinymce/plugins/imagetools/plugin.js +0 -1335
  497. package/dist/components/Editor/tinymce/plugins/importcss/plugin.d.ts +0 -0
  498. package/dist/components/Editor/tinymce/plugins/importcss/plugin.js +0 -346
  499. package/dist/components/Editor/tinymce/plugins/insertdatetime/plugin.d.ts +0 -0
  500. package/dist/components/Editor/tinymce/plugins/insertdatetime/plugin.js +0 -171
  501. package/dist/components/Editor/tinymce/plugins/legacyoutput/plugin.d.ts +0 -0
  502. package/dist/components/Editor/tinymce/plugins/legacyoutput/plugin.js +0 -193
  503. package/dist/components/Editor/tinymce/plugins/link/plugin.d.ts +0 -0
  504. package/dist/components/Editor/tinymce/plugins/link/plugin.js +0 -1282
  505. package/dist/components/Editor/tinymce/plugins/lists/plugin.d.ts +0 -0
  506. package/dist/components/Editor/tinymce/plugins/lists/plugin.js +0 -2256
  507. package/dist/components/Editor/tinymce/plugins/media/plugin.d.ts +0 -0
  508. package/dist/components/Editor/tinymce/plugins/media/plugin.js +0 -1374
  509. package/dist/components/Editor/tinymce/plugins/nonbreaking/plugin.d.ts +0 -0
  510. package/dist/components/Editor/tinymce/plugins/nonbreaking/plugin.js +0 -93
  511. package/dist/components/Editor/tinymce/plugins/noneditable/plugin.d.ts +0 -0
  512. package/dist/components/Editor/tinymce/plugins/noneditable/plugin.js +0 -114
  513. package/dist/components/Editor/tinymce/plugins/pagebreak/plugin.d.ts +0 -0
  514. package/dist/components/Editor/tinymce/plugins/pagebreak/plugin.js +0 -96
  515. package/dist/components/Editor/tinymce/plugins/paste/plugin.d.ts +0 -0
  516. package/dist/components/Editor/tinymce/plugins/paste/plugin.js +0 -1747
  517. package/dist/components/Editor/tinymce/plugins/preview/plugin.d.ts +0 -0
  518. package/dist/components/Editor/tinymce/plugins/preview/plugin.js +0 -119
  519. package/dist/components/Editor/tinymce/plugins/print/plugin.d.ts +0 -0
  520. package/dist/components/Editor/tinymce/plugins/print/plugin.js +0 -48
  521. package/dist/components/Editor/tinymce/plugins/quickbars/plugin.d.ts +0 -0
  522. package/dist/components/Editor/tinymce/plugins/quickbars/plugin.js +0 -475
  523. package/dist/components/Editor/tinymce/plugins/save/plugin.d.ts +0 -0
  524. package/dist/components/Editor/tinymce/plugins/save/plugin.js +0 -112
  525. package/dist/components/Editor/tinymce/plugins/searchreplace/plugin.d.ts +0 -0
  526. package/dist/components/Editor/tinymce/plugins/searchreplace/plugin.js +0 -1149
  527. package/dist/components/Editor/tinymce/plugins/spellchecker/plugin.d.ts +0 -0
  528. package/dist/components/Editor/tinymce/plugins/spellchecker/plugin.js +0 -723
  529. package/dist/components/Editor/tinymce/plugins/tabfocus/plugin.d.ts +0 -0
  530. package/dist/components/Editor/tinymce/plugins/tabfocus/plugin.js +0 -124
  531. package/dist/components/Editor/tinymce/plugins/table/plugin.d.ts +0 -0
  532. package/dist/components/Editor/tinymce/plugins/table/plugin.js +0 -10853
  533. package/dist/components/Editor/tinymce/plugins/template/plugin.d.ts +0 -0
  534. package/dist/components/Editor/tinymce/plugins/template/plugin.js +0 -561
  535. package/dist/components/Editor/tinymce/plugins/textcolor/plugin.d.ts +0 -0
  536. package/dist/components/Editor/tinymce/plugins/textpattern/plugin.d.ts +0 -0
  537. package/dist/components/Editor/tinymce/plugins/textpattern/plugin.js +0 -1393
  538. package/dist/components/Editor/tinymce/plugins/toc/plugin.d.ts +0 -0
  539. package/dist/components/Editor/tinymce/plugins/toc/plugin.js +0 -227
  540. package/dist/components/Editor/tinymce/plugins/visualblocks/plugin.d.ts +0 -0
  541. package/dist/components/Editor/tinymce/plugins/visualblocks/plugin.js +0 -94
  542. package/dist/components/Editor/tinymce/plugins/visualchars/plugin.d.ts +0 -0
  543. package/dist/components/Editor/tinymce/plugins/visualchars/plugin.js +0 -521
  544. package/dist/components/Editor/tinymce/plugins/wordcount/plugin.d.ts +0 -0
  545. package/dist/components/Editor/tinymce/plugins/wordcount/plugin.js +0 -397
  546. package/dist/components/Editor/tinymce/themes/mobile/theme.js +0 -13348
  547. package/dist/components/Editor/tinymce/themes/silver/theme.js +0 -32028
  548. package/dist/components/Editor/tinymce/tinymce.js +0 -30486
  549. package/dist/components/FilePreparer/worker.d.ts +0 -2
  550. package/dist/components/FilePreparer/worker.js +0 -31
  551. package/dist/convertReacticons.d.ts +0 -1
  552. package/dist/convertReacticons.js +0 -62
  553. package/dist/utils/Fields.d.ts +0 -0
  554. package/dist/utils/Fields.js +0 -1
@@ -1,1374 +0,0 @@
1
- "use strict";
2
- /**
3
- * Copyright (c) Tiny Technologies, Inc. All rights reserved.
4
- * Licensed under the LGPL or a commercial license.
5
- * For LGPL see License.txt in the project root for license information.
6
- * For commercial licenses see https://www.tiny.cloud/
7
- *
8
- * Version: 5.9.0 (TBD)
9
- */
10
- (function () {
11
- 'use strict';
12
- var global = tinymce.util.Tools.resolve('tinymce.PluginManager');
13
- var __assign = function () {
14
- __assign = Object.assign || function __assign(t) {
15
- for (var s, i = 1, n = arguments.length; i < n; i++) {
16
- s = arguments[i];
17
- for (var p in s)
18
- if (Object.prototype.hasOwnProperty.call(s, p))
19
- t[p] = s[p];
20
- }
21
- return t;
22
- };
23
- return __assign.apply(this, arguments);
24
- };
25
- var typeOf = function (x) {
26
- var t = typeof x;
27
- if (x === null) {
28
- return 'null';
29
- }
30
- else if (t === 'object' && (Array.prototype.isPrototypeOf(x) || x.constructor && x.constructor.name === 'Array')) {
31
- return 'array';
32
- }
33
- else if (t === 'object' && (String.prototype.isPrototypeOf(x) || x.constructor && x.constructor.name === 'String')) {
34
- return 'string';
35
- }
36
- else {
37
- return t;
38
- }
39
- };
40
- var isType = function (type) {
41
- return function (value) {
42
- return typeOf(value) === type;
43
- };
44
- };
45
- var isString = isType('string');
46
- var isObject = isType('object');
47
- var isArray = isType('array');
48
- var isNullable = function (a) {
49
- return a === null || a === undefined;
50
- };
51
- var isNonNullable = function (a) {
52
- return !isNullable(a);
53
- };
54
- var noop = function () {
55
- };
56
- var constant = function (value) {
57
- return function () {
58
- return value;
59
- };
60
- };
61
- var never = constant(false);
62
- var always = constant(true);
63
- var none = function () {
64
- return NONE;
65
- };
66
- var NONE = function () {
67
- var eq = function (o) {
68
- return o.isNone();
69
- };
70
- var call = function (thunk) {
71
- return thunk();
72
- };
73
- var id = function (n) {
74
- return n;
75
- };
76
- var me = {
77
- fold: function (n, _s) {
78
- return n();
79
- },
80
- is: never,
81
- isSome: never,
82
- isNone: always,
83
- getOr: id,
84
- getOrThunk: call,
85
- getOrDie: function (msg) {
86
- throw new Error(msg || 'error: getOrDie called on none.');
87
- },
88
- getOrNull: constant(null),
89
- getOrUndefined: constant(undefined),
90
- or: id,
91
- orThunk: call,
92
- map: none,
93
- each: noop,
94
- bind: none,
95
- exists: never,
96
- forall: always,
97
- filter: none,
98
- equals: eq,
99
- equals_: eq,
100
- toArray: function () {
101
- return [];
102
- },
103
- toString: constant('none()')
104
- };
105
- return me;
106
- }();
107
- var some = function (a) {
108
- var constant_a = constant(a);
109
- var self = function () {
110
- return me;
111
- };
112
- var bind = function (f) {
113
- return f(a);
114
- };
115
- var me = {
116
- fold: function (n, s) {
117
- return s(a);
118
- },
119
- is: function (v) {
120
- return a === v;
121
- },
122
- isSome: always,
123
- isNone: never,
124
- getOr: constant_a,
125
- getOrThunk: constant_a,
126
- getOrDie: constant_a,
127
- getOrNull: constant_a,
128
- getOrUndefined: constant_a,
129
- or: self,
130
- orThunk: self,
131
- map: function (f) {
132
- return some(f(a));
133
- },
134
- each: function (f) {
135
- f(a);
136
- },
137
- bind: bind,
138
- exists: bind,
139
- forall: bind,
140
- filter: function (f) {
141
- return f(a) ? me : NONE;
142
- },
143
- toArray: function () {
144
- return [a];
145
- },
146
- toString: function () {
147
- return 'some(' + a + ')';
148
- },
149
- equals: function (o) {
150
- return o.is(a);
151
- },
152
- equals_: function (o, elementEq) {
153
- return o.fold(never, function (b) {
154
- return elementEq(a, b);
155
- });
156
- }
157
- };
158
- return me;
159
- };
160
- var from = function (value) {
161
- return value === null || value === undefined ? NONE : some(value);
162
- };
163
- var Optional = {
164
- some: some,
165
- none: none,
166
- from: from
167
- };
168
- var nativePush = Array.prototype.push;
169
- var each = function (xs, f) {
170
- for (var i = 0, len = xs.length; i < len; i++) {
171
- var x = xs[i];
172
- f(x, i);
173
- }
174
- };
175
- var flatten = function (xs) {
176
- var r = [];
177
- for (var i = 0, len = xs.length; i < len; ++i) {
178
- if (!isArray(xs[i])) {
179
- throw new Error('Arr.flatten item ' + i + ' was not an array, input: ' + xs);
180
- }
181
- nativePush.apply(r, xs[i]);
182
- }
183
- return r;
184
- };
185
- var Cell = function (initial) {
186
- var value = initial;
187
- var get = function () {
188
- return value;
189
- };
190
- var set = function (v) {
191
- value = v;
192
- };
193
- return {
194
- get: get,
195
- set: set
196
- };
197
- };
198
- var keys = Object.keys;
199
- var hasOwnProperty = Object.hasOwnProperty;
200
- var each$1 = function (obj, f) {
201
- var props = keys(obj);
202
- for (var k = 0, len = props.length; k < len; k++) {
203
- var i = props[k];
204
- var x = obj[i];
205
- f(x, i);
206
- }
207
- };
208
- var get = function (obj, key) {
209
- return has(obj, key) ? Optional.from(obj[key]) : Optional.none();
210
- };
211
- var has = function (obj, key) {
212
- return hasOwnProperty.call(obj, key);
213
- };
214
- var getScripts = function (editor) {
215
- return editor.getParam('media_scripts');
216
- };
217
- var getAudioTemplateCallback = function (editor) {
218
- return editor.getParam('audio_template_callback');
219
- };
220
- var getVideoTemplateCallback = function (editor) {
221
- return editor.getParam('video_template_callback');
222
- };
223
- var hasLiveEmbeds = function (editor) {
224
- return editor.getParam('media_live_embeds', true);
225
- };
226
- var shouldFilterHtml = function (editor) {
227
- return editor.getParam('media_filter_html', true);
228
- };
229
- var getUrlResolver = function (editor) {
230
- return editor.getParam('media_url_resolver');
231
- };
232
- var hasAltSource = function (editor) {
233
- return editor.getParam('media_alt_source', true);
234
- };
235
- var hasPoster = function (editor) {
236
- return editor.getParam('media_poster', true);
237
- };
238
- var hasDimensions = function (editor) {
239
- return editor.getParam('media_dimensions', true);
240
- };
241
- var global$1 = tinymce.util.Tools.resolve('tinymce.util.Tools');
242
- var global$2 = tinymce.util.Tools.resolve('tinymce.dom.DOMUtils');
243
- var global$3 = tinymce.util.Tools.resolve('tinymce.html.SaxParser');
244
- var getVideoScriptMatch = function (prefixes, src) {
245
- if (prefixes) {
246
- for (var i = 0; i < prefixes.length; i++) {
247
- if (src.indexOf(prefixes[i].filter) !== -1) {
248
- return prefixes[i];
249
- }
250
- }
251
- }
252
- };
253
- var DOM = global$2.DOM;
254
- var trimPx = function (value) {
255
- return value.replace(/px$/, '');
256
- };
257
- var getEphoxEmbedData = function (attrs) {
258
- var style = attrs.map.style;
259
- var styles = style ? DOM.parseStyle(style) : {};
260
- return {
261
- type: 'ephox-embed-iri',
262
- source: attrs.map['data-ephox-embed-iri'],
263
- altsource: '',
264
- poster: '',
265
- width: get(styles, 'max-width').map(trimPx).getOr(''),
266
- height: get(styles, 'max-height').map(trimPx).getOr('')
267
- };
268
- };
269
- var htmlToData = function (prefixes, html) {
270
- var isEphoxEmbed = Cell(false);
271
- var data = {};
272
- global$3({
273
- validate: false,
274
- allow_conditional_comments: true,
275
- start: function (name, attrs) {
276
- if (isEphoxEmbed.get())
277
- ;
278
- else if (has(attrs.map, 'data-ephox-embed-iri')) {
279
- isEphoxEmbed.set(true);
280
- data = getEphoxEmbedData(attrs);
281
- }
282
- else {
283
- if (!data.source && name === 'param') {
284
- data.source = attrs.map.movie;
285
- }
286
- if (name === 'iframe' || name === 'object' || name === 'embed' || name === 'video' || name === 'audio') {
287
- if (!data.type) {
288
- data.type = name;
289
- }
290
- data = global$1.extend(attrs.map, data);
291
- }
292
- if (name === 'script') {
293
- var videoScript = getVideoScriptMatch(prefixes, attrs.map.src);
294
- if (!videoScript) {
295
- return;
296
- }
297
- data = {
298
- type: 'script',
299
- source: attrs.map.src,
300
- width: String(videoScript.width),
301
- height: String(videoScript.height)
302
- };
303
- }
304
- if (name === 'source') {
305
- if (!data.source) {
306
- data.source = attrs.map.src;
307
- }
308
- else if (!data.altsource) {
309
- data.altsource = attrs.map.src;
310
- }
311
- }
312
- if (name === 'img' && !data.poster) {
313
- data.poster = attrs.map.src;
314
- }
315
- }
316
- }
317
- }).parse(html);
318
- data.source = data.source || data.src || data.data;
319
- data.altsource = data.altsource || '';
320
- data.poster = data.poster || '';
321
- return data;
322
- };
323
- var guess = function (url) {
324
- var mimes = {
325
- mp3: 'audio/mpeg',
326
- m4a: 'audio/x-m4a',
327
- wav: 'audio/wav',
328
- mp4: 'video/mp4',
329
- webm: 'video/webm',
330
- ogg: 'video/ogg',
331
- swf: 'application/x-shockwave-flash'
332
- };
333
- var fileEnd = url.toLowerCase().split('.').pop();
334
- var mime = mimes[fileEnd];
335
- return mime ? mime : '';
336
- };
337
- var global$4 = tinymce.util.Tools.resolve('tinymce.html.Schema');
338
- var global$5 = tinymce.util.Tools.resolve('tinymce.html.Writer');
339
- var DOM$1 = global$2.DOM;
340
- var addPx = function (value) {
341
- return /^[0-9.]+$/.test(value) ? value + 'px' : value;
342
- };
343
- var setAttributes = function (attrs, updatedAttrs) {
344
- each$1(updatedAttrs, function (val, name) {
345
- var value = '' + val;
346
- if (attrs.map[name]) {
347
- var i = attrs.length;
348
- while (i--) {
349
- var attr = attrs[i];
350
- if (attr.name === name) {
351
- if (value) {
352
- attrs.map[name] = value;
353
- attr.value = value;
354
- }
355
- else {
356
- delete attrs.map[name];
357
- attrs.splice(i, 1);
358
- }
359
- }
360
- }
361
- }
362
- else if (value) {
363
- attrs.push({
364
- name: name,
365
- value: value
366
- });
367
- attrs.map[name] = value;
368
- }
369
- });
370
- };
371
- var updateEphoxEmbed = function (data, attrs) {
372
- var style = attrs.map.style;
373
- var styleMap = style ? DOM$1.parseStyle(style) : {};
374
- styleMap['max-width'] = addPx(data.width);
375
- styleMap['max-height'] = addPx(data.height);
376
- setAttributes(attrs, { style: DOM$1.serializeStyle(styleMap) });
377
- };
378
- var sources = [
379
- 'source',
380
- 'altsource'
381
- ];
382
- var updateHtml = function (html, data, updateAll) {
383
- var writer = global$5();
384
- var isEphoxEmbed = Cell(false);
385
- var sourceCount = 0;
386
- var hasImage;
387
- global$3({
388
- validate: false,
389
- allow_conditional_comments: true,
390
- comment: function (text) {
391
- writer.comment(text);
392
- },
393
- cdata: function (text) {
394
- writer.cdata(text);
395
- },
396
- text: function (text, raw) {
397
- writer.text(text, raw);
398
- },
399
- start: function (name, attrs, empty) {
400
- if (isEphoxEmbed.get())
401
- ;
402
- else if (has(attrs.map, 'data-ephox-embed-iri')) {
403
- isEphoxEmbed.set(true);
404
- updateEphoxEmbed(data, attrs);
405
- }
406
- else {
407
- switch (name) {
408
- case 'video':
409
- case 'object':
410
- case 'embed':
411
- case 'img':
412
- case 'iframe':
413
- if (data.height !== undefined && data.width !== undefined) {
414
- setAttributes(attrs, {
415
- width: data.width,
416
- height: data.height
417
- });
418
- }
419
- break;
420
- }
421
- if (updateAll) {
422
- switch (name) {
423
- case 'video':
424
- setAttributes(attrs, {
425
- poster: data.poster,
426
- src: ''
427
- });
428
- if (data.altsource) {
429
- setAttributes(attrs, { src: '' });
430
- }
431
- break;
432
- case 'iframe':
433
- setAttributes(attrs, { src: data.source });
434
- break;
435
- case 'source':
436
- if (sourceCount < 2) {
437
- setAttributes(attrs, {
438
- src: data[sources[sourceCount]],
439
- type: data[sources[sourceCount] + 'mime']
440
- });
441
- if (!data[sources[sourceCount]]) {
442
- return;
443
- }
444
- }
445
- sourceCount++;
446
- break;
447
- case 'img':
448
- if (!data.poster) {
449
- return;
450
- }
451
- hasImage = true;
452
- break;
453
- }
454
- }
455
- }
456
- writer.start(name, attrs, empty);
457
- },
458
- end: function (name) {
459
- if (!isEphoxEmbed.get()) {
460
- if (name === 'video' && updateAll) {
461
- for (var index = 0; index < 2; index++) {
462
- if (data[sources[index]]) {
463
- var attrs = [];
464
- attrs.map = {};
465
- if (sourceCount <= index) {
466
- setAttributes(attrs, {
467
- src: data[sources[index]],
468
- type: data[sources[index] + 'mime']
469
- });
470
- writer.start('source', attrs, true);
471
- }
472
- }
473
- }
474
- }
475
- if (data.poster && name === 'object' && updateAll && !hasImage) {
476
- var imgAttrs = [];
477
- imgAttrs.map = {};
478
- setAttributes(imgAttrs, {
479
- src: data.poster,
480
- width: data.width,
481
- height: data.height
482
- });
483
- writer.start('img', imgAttrs, true);
484
- }
485
- }
486
- writer.end(name);
487
- }
488
- }, global$4({})).parse(html);
489
- return writer.getContent();
490
- };
491
- var urlPatterns = [
492
- {
493
- regex: /youtu\.be\/([\w\-_\?&=.]+)/i,
494
- type: 'iframe',
495
- w: 560,
496
- h: 314,
497
- url: 'www.youtube.com/embed/$1',
498
- allowFullscreen: true
499
- },
500
- {
501
- regex: /youtube\.com(.+)v=([^&]+)(&([a-z0-9&=\-_]+))?/i,
502
- type: 'iframe',
503
- w: 560,
504
- h: 314,
505
- url: 'www.youtube.com/embed/$2?$4',
506
- allowFullscreen: true
507
- },
508
- {
509
- regex: /youtube.com\/embed\/([a-z0-9\?&=\-_]+)/i,
510
- type: 'iframe',
511
- w: 560,
512
- h: 314,
513
- url: 'www.youtube.com/embed/$1',
514
- allowFullscreen: true
515
- },
516
- {
517
- regex: /vimeo\.com\/([0-9]+)/,
518
- type: 'iframe',
519
- w: 425,
520
- h: 350,
521
- url: 'player.vimeo.com/video/$1?title=0&byline=0&portrait=0&color=8dc7dc',
522
- allowFullscreen: true
523
- },
524
- {
525
- regex: /vimeo\.com\/(.*)\/([0-9]+)/,
526
- type: 'iframe',
527
- w: 425,
528
- h: 350,
529
- url: 'player.vimeo.com/video/$2?title=0&amp;byline=0',
530
- allowFullscreen: true
531
- },
532
- {
533
- regex: /maps\.google\.([a-z]{2,3})\/maps\/(.+)msid=(.+)/,
534
- type: 'iframe',
535
- w: 425,
536
- h: 350,
537
- url: 'maps.google.com/maps/ms?msid=$2&output=embed"',
538
- allowFullscreen: false
539
- },
540
- {
541
- regex: /dailymotion\.com\/video\/([^_]+)/,
542
- type: 'iframe',
543
- w: 480,
544
- h: 270,
545
- url: 'www.dailymotion.com/embed/video/$1',
546
- allowFullscreen: true
547
- },
548
- {
549
- regex: /dai\.ly\/([^_]+)/,
550
- type: 'iframe',
551
- w: 480,
552
- h: 270,
553
- url: 'www.dailymotion.com/embed/video/$1',
554
- allowFullscreen: true
555
- }
556
- ];
557
- var getProtocol = function (url) {
558
- var protocolMatches = url.match(/^(https?:\/\/|www\.)(.+)$/i);
559
- if (protocolMatches && protocolMatches.length > 1) {
560
- return protocolMatches[1] === 'www.' ? 'https://' : protocolMatches[1];
561
- }
562
- else {
563
- return 'https://';
564
- }
565
- };
566
- var getUrl = function (pattern, url) {
567
- var protocol = getProtocol(url);
568
- var match = pattern.regex.exec(url);
569
- var newUrl = protocol + pattern.url;
570
- var _loop_1 = function (i) {
571
- newUrl = newUrl.replace('$' + i, function () {
572
- return match[i] ? match[i] : '';
573
- });
574
- };
575
- for (var i = 0; i < match.length; i++) {
576
- _loop_1(i);
577
- }
578
- return newUrl.replace(/\?$/, '');
579
- };
580
- var matchPattern = function (url) {
581
- var patterns = urlPatterns.filter(function (pattern) {
582
- return pattern.regex.test(url);
583
- });
584
- if (patterns.length > 0) {
585
- return global$1.extend({}, patterns[0], { url: getUrl(patterns[0], url) });
586
- }
587
- else {
588
- return null;
589
- }
590
- };
591
- var getIframeHtml = function (data) {
592
- var allowFullscreen = data.allowfullscreen ? ' allowFullscreen="1"' : '';
593
- return '<iframe src="' + data.source + '" width="' + data.width + '" height="' + data.height + '"' + allowFullscreen + '></iframe>';
594
- };
595
- var getFlashHtml = function (data) {
596
- var html = '<object data="' + data.source + '" width="' + data.width + '" height="' + data.height + '" type="application/x-shockwave-flash">';
597
- if (data.poster) {
598
- html += '<img src="' + data.poster + '" width="' + data.width + '" height="' + data.height + '" />';
599
- }
600
- html += '</object>';
601
- return html;
602
- };
603
- var getAudioHtml = function (data, audioTemplateCallback) {
604
- if (audioTemplateCallback) {
605
- return audioTemplateCallback(data);
606
- }
607
- else {
608
- return '<audio controls="controls" src="' + data.source + '">' + (data.altsource ? '\n<source src="' + data.altsource + '"' + (data.altsourcemime ? ' type="' + data.altsourcemime + '"' : '') + ' />\n' : '') + '</audio>';
609
- }
610
- };
611
- var getVideoHtml = function (data, videoTemplateCallback) {
612
- if (videoTemplateCallback) {
613
- return videoTemplateCallback(data);
614
- }
615
- else {
616
- return '<video width="' + data.width + '" height="' + data.height + '"' + (data.poster ? ' poster="' + data.poster + '"' : '') + ' controls="controls">\n' + '<source src="' + data.source + '"' + (data.sourcemime ? ' type="' + data.sourcemime + '"' : '') + ' />\n' + (data.altsource ? '<source src="' + data.altsource + '"' + (data.altsourcemime ? ' type="' + data.altsourcemime + '"' : '') + ' />\n' : '') + '</video>';
617
- }
618
- };
619
- var getScriptHtml = function (data) {
620
- return '<script src="' + data.source + '"></script>';
621
- };
622
- var dataToHtml = function (editor, dataIn) {
623
- var data = global$1.extend({}, dataIn);
624
- if (!data.source) {
625
- global$1.extend(data, htmlToData(getScripts(editor), data.embed));
626
- if (!data.source) {
627
- return '';
628
- }
629
- }
630
- if (!data.altsource) {
631
- data.altsource = '';
632
- }
633
- if (!data.poster) {
634
- data.poster = '';
635
- }
636
- data.source = editor.convertURL(data.source, 'source');
637
- data.altsource = editor.convertURL(data.altsource, 'source');
638
- data.sourcemime = guess(data.source);
639
- data.altsourcemime = guess(data.altsource);
640
- data.poster = editor.convertURL(data.poster, 'poster');
641
- var pattern = matchPattern(data.source);
642
- if (pattern) {
643
- data.source = pattern.url;
644
- data.type = pattern.type;
645
- data.allowfullscreen = pattern.allowFullscreen;
646
- data.width = data.width || String(pattern.w);
647
- data.height = data.height || String(pattern.h);
648
- }
649
- if (data.embed) {
650
- return updateHtml(data.embed, data, true);
651
- }
652
- else {
653
- var videoScript = getVideoScriptMatch(getScripts(editor), data.source);
654
- if (videoScript) {
655
- data.type = 'script';
656
- data.width = String(videoScript.width);
657
- data.height = String(videoScript.height);
658
- }
659
- var audioTemplateCallback = getAudioTemplateCallback(editor);
660
- var videoTemplateCallback = getVideoTemplateCallback(editor);
661
- data.width = data.width || '300';
662
- data.height = data.height || '150';
663
- global$1.each(data, function (value, key) {
664
- data[key] = editor.dom.encode('' + value);
665
- });
666
- if (data.type === 'iframe') {
667
- return getIframeHtml(data);
668
- }
669
- else if (data.sourcemime === 'application/x-shockwave-flash') {
670
- return getFlashHtml(data);
671
- }
672
- else if (data.sourcemime.indexOf('audio') !== -1) {
673
- return getAudioHtml(data, audioTemplateCallback);
674
- }
675
- else if (data.type === 'script') {
676
- return getScriptHtml(data);
677
- }
678
- else {
679
- return getVideoHtml(data, videoTemplateCallback);
680
- }
681
- }
682
- };
683
- var global$6 = tinymce.util.Tools.resolve('tinymce.util.Promise');
684
- var cache = {};
685
- var embedPromise = function (data, dataToHtml, handler) {
686
- return new global$6(function (res, rej) {
687
- var wrappedResolve = function (response) {
688
- if (response.html) {
689
- cache[data.source] = response;
690
- }
691
- return res({
692
- url: data.source,
693
- html: response.html ? response.html : dataToHtml(data)
694
- });
695
- };
696
- if (cache[data.source]) {
697
- wrappedResolve(cache[data.source]);
698
- }
699
- else {
700
- handler({ url: data.source }, wrappedResolve, rej);
701
- }
702
- });
703
- };
704
- var defaultPromise = function (data, dataToHtml) {
705
- return new global$6(function (res) {
706
- res({
707
- html: dataToHtml(data),
708
- url: data.source
709
- });
710
- });
711
- };
712
- var loadedData = function (editor) {
713
- return function (data) {
714
- return dataToHtml(editor, data);
715
- };
716
- };
717
- var getEmbedHtml = function (editor, data) {
718
- var embedHandler = getUrlResolver(editor);
719
- return embedHandler ? embedPromise(data, loadedData(editor), embedHandler) : defaultPromise(data, loadedData(editor));
720
- };
721
- var isCached = function (url) {
722
- return cache.hasOwnProperty(url);
723
- };
724
- var extractMeta = function (sourceInput, data) {
725
- return get(data, sourceInput).bind(function (mainData) {
726
- return get(mainData, 'meta');
727
- });
728
- };
729
- var getValue = function (data, metaData, sourceInput) {
730
- return function (prop) {
731
- var _a;
732
- var getFromData = function () {
733
- return get(data, prop);
734
- };
735
- var getFromMetaData = function () {
736
- return get(metaData, prop);
737
- };
738
- var getNonEmptyValue = function (c) {
739
- return get(c, 'value').bind(function (v) {
740
- return v.length > 0 ? Optional.some(v) : Optional.none();
741
- });
742
- };
743
- var getFromValueFirst = function () {
744
- return getFromData().bind(function (child) {
745
- return isObject(child) ? getNonEmptyValue(child).orThunk(getFromMetaData) : getFromMetaData().orThunk(function () {
746
- return Optional.from(child);
747
- });
748
- });
749
- };
750
- var getFromMetaFirst = function () {
751
- return getFromMetaData().orThunk(function () {
752
- return getFromData().bind(function (child) {
753
- return isObject(child) ? getNonEmptyValue(child) : Optional.from(child);
754
- });
755
- });
756
- };
757
- return _a = {}, _a[prop] = (prop === sourceInput ? getFromValueFirst() : getFromMetaFirst()).getOr(''), _a;
758
- };
759
- };
760
- var getDimensions = function (data, metaData) {
761
- var dimensions = {};
762
- get(data, 'dimensions').each(function (dims) {
763
- each([
764
- 'width',
765
- 'height'
766
- ], function (prop) {
767
- get(metaData, prop).orThunk(function () {
768
- return get(dims, prop);
769
- }).each(function (value) {
770
- return dimensions[prop] = value;
771
- });
772
- });
773
- });
774
- return dimensions;
775
- };
776
- var unwrap = function (data, sourceInput) {
777
- var metaData = sourceInput ? extractMeta(sourceInput, data).getOr({}) : {};
778
- var get = getValue(data, metaData, sourceInput);
779
- return __assign(__assign(__assign(__assign(__assign({}, get('source')), get('altsource')), get('poster')), get('embed')), getDimensions(data, metaData));
780
- };
781
- var wrap = function (data) {
782
- var wrapped = __assign(__assign({}, data), {
783
- source: { value: get(data, 'source').getOr('') },
784
- altsource: { value: get(data, 'altsource').getOr('') },
785
- poster: { value: get(data, 'poster').getOr('') }
786
- });
787
- each([
788
- 'width',
789
- 'height'
790
- ], function (prop) {
791
- get(data, prop).each(function (value) {
792
- var dimensions = wrapped.dimensions || {};
793
- dimensions[prop] = value;
794
- wrapped.dimensions = dimensions;
795
- });
796
- });
797
- return wrapped;
798
- };
799
- var handleError = function (editor) {
800
- return function (error) {
801
- var errorMessage = error && error.msg ? 'Media embed handler error: ' + error.msg : 'Media embed handler threw unknown error.';
802
- editor.notificationManager.open({
803
- type: 'error',
804
- text: errorMessage
805
- });
806
- };
807
- };
808
- var snippetToData = function (editor, embedSnippet) {
809
- return htmlToData(getScripts(editor), embedSnippet);
810
- };
811
- var isMediaElement = function (element) {
812
- return element.getAttribute('data-mce-object') || element.getAttribute('data-ephox-embed-iri');
813
- };
814
- var getEditorData = function (editor) {
815
- var element = editor.selection.getNode();
816
- var snippet = isMediaElement(element) ? editor.serializer.serialize(element, { selection: true }) : '';
817
- return __assign({ embed: snippet }, htmlToData(getScripts(editor), snippet));
818
- };
819
- var addEmbedHtml = function (api, editor) {
820
- return function (response) {
821
- if (isString(response.url) && response.url.trim().length > 0) {
822
- var html = response.html;
823
- var snippetData = snippetToData(editor, html);
824
- var nuData = __assign(__assign({}, snippetData), {
825
- source: response.url,
826
- embed: html
827
- });
828
- api.setData(wrap(nuData));
829
- }
830
- };
831
- };
832
- var selectPlaceholder = function (editor, beforeObjects) {
833
- var afterObjects = editor.dom.select('*[data-mce-object]');
834
- for (var i = 0; i < beforeObjects.length; i++) {
835
- for (var y = afterObjects.length - 1; y >= 0; y--) {
836
- if (beforeObjects[i] === afterObjects[y]) {
837
- afterObjects.splice(y, 1);
838
- }
839
- }
840
- }
841
- editor.selection.select(afterObjects[0]);
842
- };
843
- var handleInsert = function (editor, html) {
844
- var beforeObjects = editor.dom.select('*[data-mce-object]');
845
- editor.insertContent(html);
846
- selectPlaceholder(editor, beforeObjects);
847
- editor.nodeChanged();
848
- };
849
- var submitForm = function (prevData, newData, editor) {
850
- newData.embed = updateHtml(newData.embed, newData);
851
- if (newData.embed && (prevData.source === newData.source || isCached(newData.source))) {
852
- handleInsert(editor, newData.embed);
853
- }
854
- else {
855
- getEmbedHtml(editor, newData).then(function (response) {
856
- handleInsert(editor, response.html);
857
- }).catch(handleError(editor));
858
- }
859
- };
860
- var showDialog = function (editor) {
861
- var editorData = getEditorData(editor);
862
- var currentData = Cell(editorData);
863
- var initialData = wrap(editorData);
864
- var handleSource = function (prevData, api) {
865
- var serviceData = unwrap(api.getData(), 'source');
866
- if (prevData.source !== serviceData.source) {
867
- addEmbedHtml(win, editor)({
868
- url: serviceData.source,
869
- html: ''
870
- });
871
- getEmbedHtml(editor, serviceData).then(addEmbedHtml(win, editor)).catch(handleError(editor));
872
- }
873
- };
874
- var handleEmbed = function (api) {
875
- var data = unwrap(api.getData());
876
- var dataFromEmbed = snippetToData(editor, data.embed);
877
- api.setData(wrap(dataFromEmbed));
878
- };
879
- var handleUpdate = function (api, sourceInput) {
880
- var data = unwrap(api.getData(), sourceInput);
881
- var embed = dataToHtml(editor, data);
882
- api.setData(wrap(__assign(__assign({}, data), { embed: embed })));
883
- };
884
- var mediaInput = [{
885
- name: 'source',
886
- type: 'urlinput',
887
- filetype: 'media',
888
- label: 'Source'
889
- }];
890
- var sizeInput = !hasDimensions(editor) ? [] : [{
891
- type: 'sizeinput',
892
- name: 'dimensions',
893
- label: 'Constrain proportions',
894
- constrain: true
895
- }];
896
- var generalTab = {
897
- title: 'General',
898
- name: 'general',
899
- items: flatten([
900
- mediaInput,
901
- sizeInput
902
- ])
903
- };
904
- var embedTextarea = {
905
- type: 'textarea',
906
- name: 'embed',
907
- label: 'Paste your embed code below:'
908
- };
909
- var embedTab = {
910
- title: 'Embed',
911
- items: [embedTextarea]
912
- };
913
- var advancedFormItems = [];
914
- if (hasAltSource(editor)) {
915
- advancedFormItems.push({
916
- name: 'altsource',
917
- type: 'urlinput',
918
- filetype: 'media',
919
- label: 'Alternative source URL'
920
- });
921
- }
922
- if (hasPoster(editor)) {
923
- advancedFormItems.push({
924
- name: 'poster',
925
- type: 'urlinput',
926
- filetype: 'image',
927
- label: 'Media poster (Image URL)'
928
- });
929
- }
930
- var advancedTab = {
931
- title: 'Advanced',
932
- name: 'advanced',
933
- items: advancedFormItems
934
- };
935
- var tabs = [
936
- generalTab,
937
- embedTab
938
- ];
939
- if (advancedFormItems.length > 0) {
940
- tabs.push(advancedTab);
941
- }
942
- var body = {
943
- type: 'tabpanel',
944
- tabs: tabs
945
- };
946
- var win = editor.windowManager.open({
947
- title: 'Insert/Edit Media',
948
- size: 'normal',
949
- body: body,
950
- buttons: [
951
- {
952
- type: 'cancel',
953
- name: 'cancel',
954
- text: 'Cancel'
955
- },
956
- {
957
- type: 'submit',
958
- name: 'save',
959
- text: 'Save',
960
- primary: true
961
- }
962
- ],
963
- onSubmit: function (api) {
964
- var serviceData = unwrap(api.getData());
965
- submitForm(currentData.get(), serviceData, editor);
966
- api.close();
967
- },
968
- onChange: function (api, detail) {
969
- switch (detail.name) {
970
- case 'source':
971
- handleSource(currentData.get(), api);
972
- break;
973
- case 'embed':
974
- handleEmbed(api);
975
- break;
976
- case 'dimensions':
977
- case 'altsource':
978
- case 'poster':
979
- handleUpdate(api, detail.name);
980
- break;
981
- }
982
- currentData.set(unwrap(api.getData()));
983
- },
984
- initialData: initialData
985
- });
986
- };
987
- var get$1 = function (editor) {
988
- var showDialog$1 = function () {
989
- showDialog(editor);
990
- };
991
- return { showDialog: showDialog$1 };
992
- };
993
- var register = function (editor) {
994
- var showDialog$1 = function () {
995
- showDialog(editor);
996
- };
997
- editor.addCommand('mceMedia', showDialog$1);
998
- };
999
- var global$7 = tinymce.util.Tools.resolve('tinymce.html.Node');
1000
- var global$8 = tinymce.util.Tools.resolve('tinymce.Env');
1001
- var global$9 = tinymce.util.Tools.resolve('tinymce.html.DomParser');
1002
- var sanitize = function (editor, html) {
1003
- if (shouldFilterHtml(editor) === false) {
1004
- return html;
1005
- }
1006
- var writer = global$5();
1007
- var blocked;
1008
- global$3({
1009
- validate: false,
1010
- allow_conditional_comments: false,
1011
- comment: function (text) {
1012
- if (!blocked) {
1013
- writer.comment(text);
1014
- }
1015
- },
1016
- cdata: function (text) {
1017
- if (!blocked) {
1018
- writer.cdata(text);
1019
- }
1020
- },
1021
- text: function (text, raw) {
1022
- if (!blocked) {
1023
- writer.text(text, raw);
1024
- }
1025
- },
1026
- start: function (name, attrs, empty) {
1027
- blocked = true;
1028
- if (name === 'script' || name === 'noscript' || name === 'svg') {
1029
- return;
1030
- }
1031
- for (var i = attrs.length - 1; i >= 0; i--) {
1032
- var attrName = attrs[i].name;
1033
- if (attrName.indexOf('on') === 0) {
1034
- delete attrs.map[attrName];
1035
- attrs.splice(i, 1);
1036
- }
1037
- if (attrName === 'style') {
1038
- attrs[i].value = editor.dom.serializeStyle(editor.dom.parseStyle(attrs[i].value), name);
1039
- }
1040
- }
1041
- writer.start(name, attrs, empty);
1042
- blocked = false;
1043
- },
1044
- end: function (name) {
1045
- if (blocked) {
1046
- return;
1047
- }
1048
- writer.end(name);
1049
- }
1050
- }, global$4({})).parse(html);
1051
- return writer.getContent();
1052
- };
1053
- var isLiveEmbedNode = function (node) {
1054
- var name = node.name;
1055
- return name === 'iframe' || name === 'video' || name === 'audio';
1056
- };
1057
- var getDimension = function (node, styles, dimension, defaultValue) {
1058
- if (defaultValue === void 0) {
1059
- defaultValue = null;
1060
- }
1061
- var value = node.attr(dimension);
1062
- if (isNonNullable(value)) {
1063
- return value;
1064
- }
1065
- else if (!has(styles, dimension)) {
1066
- return defaultValue;
1067
- }
1068
- else {
1069
- return null;
1070
- }
1071
- };
1072
- var setDimensions = function (node, previewNode, styles) {
1073
- var useDefaults = previewNode.name === 'img' || node.name === 'video';
1074
- var defaultWidth = useDefaults ? '300' : null;
1075
- var fallbackHeight = node.name === 'audio' ? '30' : '150';
1076
- var defaultHeight = useDefaults ? fallbackHeight : null;
1077
- previewNode.attr({
1078
- width: getDimension(node, styles, 'width', defaultWidth),
1079
- height: getDimension(node, styles, 'height', defaultHeight)
1080
- });
1081
- };
1082
- var appendNodeContent = function (editor, nodeName, previewNode, html) {
1083
- var newNode = global$9({
1084
- forced_root_block: false,
1085
- validate: false
1086
- }, editor.schema).parse(html, { context: nodeName });
1087
- while (newNode.firstChild) {
1088
- previewNode.append(newNode.firstChild);
1089
- }
1090
- };
1091
- var createPlaceholderNode = function (editor, node) {
1092
- var name = node.name;
1093
- var placeHolder = new global$7('img', 1);
1094
- placeHolder.shortEnded = true;
1095
- retainAttributesAndInnerHtml(editor, node, placeHolder);
1096
- setDimensions(node, placeHolder, {});
1097
- placeHolder.attr({
1098
- 'style': node.attr('style'),
1099
- 'src': global$8.transparentSrc,
1100
- 'data-mce-object': name,
1101
- 'class': 'mce-object mce-object-' + name
1102
- });
1103
- return placeHolder;
1104
- };
1105
- var createPreviewNode = function (editor, node) {
1106
- var name = node.name;
1107
- var previewWrapper = new global$7('span', 1);
1108
- previewWrapper.attr({
1109
- 'contentEditable': 'false',
1110
- 'style': node.attr('style'),
1111
- 'data-mce-object': name,
1112
- 'class': 'mce-preview-object mce-object-' + name
1113
- });
1114
- retainAttributesAndInnerHtml(editor, node, previewWrapper);
1115
- var styles = editor.dom.parseStyle(node.attr('style'));
1116
- var previewNode = new global$7(name, 1);
1117
- setDimensions(node, previewNode, styles);
1118
- previewNode.attr({
1119
- src: node.attr('src'),
1120
- style: node.attr('style'),
1121
- class: node.attr('class')
1122
- });
1123
- if (name === 'iframe') {
1124
- previewNode.attr({
1125
- allowfullscreen: node.attr('allowfullscreen'),
1126
- frameborder: '0'
1127
- });
1128
- }
1129
- else {
1130
- var attrs = [
1131
- 'controls',
1132
- 'crossorigin',
1133
- 'currentTime',
1134
- 'loop',
1135
- 'muted',
1136
- 'poster',
1137
- 'preload'
1138
- ];
1139
- each(attrs, function (attrName) {
1140
- previewNode.attr(attrName, node.attr(attrName));
1141
- });
1142
- var sanitizedHtml = previewWrapper.attr('data-mce-html');
1143
- if (isNonNullable(sanitizedHtml)) {
1144
- appendNodeContent(editor, name, previewNode, sanitizedHtml);
1145
- }
1146
- }
1147
- var shimNode = new global$7('span', 1);
1148
- shimNode.attr('class', 'mce-shim');
1149
- previewWrapper.append(previewNode);
1150
- previewWrapper.append(shimNode);
1151
- return previewWrapper;
1152
- };
1153
- var retainAttributesAndInnerHtml = function (editor, sourceNode, targetNode) {
1154
- var attribs = sourceNode.attributes;
1155
- var ai = attribs.length;
1156
- while (ai--) {
1157
- var attrName = attribs[ai].name;
1158
- var attrValue = attribs[ai].value;
1159
- if (attrName !== 'width' && attrName !== 'height' && attrName !== 'style') {
1160
- if (attrName === 'data' || attrName === 'src') {
1161
- attrValue = editor.convertURL(attrValue, attrName);
1162
- }
1163
- targetNode.attr('data-mce-p-' + attrName, attrValue);
1164
- }
1165
- }
1166
- var innerHtml = sourceNode.firstChild && sourceNode.firstChild.value;
1167
- if (innerHtml) {
1168
- targetNode.attr('data-mce-html', escape(sanitize(editor, innerHtml)));
1169
- targetNode.firstChild = null;
1170
- }
1171
- };
1172
- var isPageEmbedWrapper = function (node) {
1173
- var nodeClass = node.attr('class');
1174
- return nodeClass && /\btiny-pageembed\b/.test(nodeClass);
1175
- };
1176
- var isWithinEmbedWrapper = function (node) {
1177
- while (node = node.parent) {
1178
- if (node.attr('data-ephox-embed-iri') || isPageEmbedWrapper(node)) {
1179
- return true;
1180
- }
1181
- }
1182
- return false;
1183
- };
1184
- var placeHolderConverter = function (editor) {
1185
- return function (nodes) {
1186
- var i = nodes.length;
1187
- var node;
1188
- var videoScript;
1189
- while (i--) {
1190
- node = nodes[i];
1191
- if (!node.parent) {
1192
- continue;
1193
- }
1194
- if (node.parent.attr('data-mce-object')) {
1195
- continue;
1196
- }
1197
- if (node.name === 'script') {
1198
- videoScript = getVideoScriptMatch(getScripts(editor), node.attr('src'));
1199
- if (!videoScript) {
1200
- continue;
1201
- }
1202
- }
1203
- if (videoScript) {
1204
- if (videoScript.width) {
1205
- node.attr('width', videoScript.width.toString());
1206
- }
1207
- if (videoScript.height) {
1208
- node.attr('height', videoScript.height.toString());
1209
- }
1210
- }
1211
- if (isLiveEmbedNode(node) && hasLiveEmbeds(editor) && global$8.ceFalse) {
1212
- if (!isWithinEmbedWrapper(node)) {
1213
- node.replace(createPreviewNode(editor, node));
1214
- }
1215
- }
1216
- else {
1217
- if (!isWithinEmbedWrapper(node)) {
1218
- node.replace(createPlaceholderNode(editor, node));
1219
- }
1220
- }
1221
- }
1222
- };
1223
- };
1224
- var setup = function (editor) {
1225
- editor.on('preInit', function () {
1226
- var specialElements = editor.schema.getSpecialElements();
1227
- global$1.each('video audio iframe object'.split(' '), function (name) {
1228
- specialElements[name] = new RegExp('</' + name + '[^>]*>', 'gi');
1229
- });
1230
- var boolAttrs = editor.schema.getBoolAttrs();
1231
- global$1.each('webkitallowfullscreen mozallowfullscreen allowfullscreen'.split(' '), function (name) {
1232
- boolAttrs[name] = {};
1233
- });
1234
- editor.parser.addNodeFilter('iframe,video,audio,object,embed,script', placeHolderConverter(editor));
1235
- editor.serializer.addAttributeFilter('data-mce-object', function (nodes, name) {
1236
- var i = nodes.length;
1237
- var node;
1238
- var realElm;
1239
- var ai;
1240
- var attribs;
1241
- var innerHtml;
1242
- var innerNode;
1243
- var realElmName;
1244
- var className;
1245
- while (i--) {
1246
- node = nodes[i];
1247
- if (!node.parent) {
1248
- continue;
1249
- }
1250
- realElmName = node.attr(name);
1251
- realElm = new global$7(realElmName, 1);
1252
- if (realElmName !== 'audio' && realElmName !== 'script') {
1253
- className = node.attr('class');
1254
- if (className && className.indexOf('mce-preview-object') !== -1) {
1255
- realElm.attr({
1256
- width: node.firstChild.attr('width'),
1257
- height: node.firstChild.attr('height')
1258
- });
1259
- }
1260
- else {
1261
- realElm.attr({
1262
- width: node.attr('width'),
1263
- height: node.attr('height')
1264
- });
1265
- }
1266
- }
1267
- realElm.attr({ style: node.attr('style') });
1268
- attribs = node.attributes;
1269
- ai = attribs.length;
1270
- while (ai--) {
1271
- var attrName = attribs[ai].name;
1272
- if (attrName.indexOf('data-mce-p-') === 0) {
1273
- realElm.attr(attrName.substr(11), attribs[ai].value);
1274
- }
1275
- }
1276
- if (realElmName === 'script') {
1277
- realElm.attr('type', 'text/javascript');
1278
- }
1279
- innerHtml = node.attr('data-mce-html');
1280
- if (innerHtml) {
1281
- innerNode = new global$7('#text', 3);
1282
- innerNode.raw = true;
1283
- innerNode.value = sanitize(editor, unescape(innerHtml));
1284
- realElm.append(innerNode);
1285
- }
1286
- node.replace(realElm);
1287
- }
1288
- });
1289
- });
1290
- editor.on('SetContent', function () {
1291
- editor.$('span.mce-preview-object').each(function (index, elm) {
1292
- var $elm = editor.$(elm);
1293
- if ($elm.find('span.mce-shim').length === 0) {
1294
- $elm.append('<span class="mce-shim"></span>');
1295
- }
1296
- });
1297
- });
1298
- };
1299
- var setup$1 = function (editor) {
1300
- editor.on('ResolveName', function (e) {
1301
- var name;
1302
- if (e.target.nodeType === 1 && (name = e.target.getAttribute('data-mce-object'))) {
1303
- e.name = name;
1304
- }
1305
- });
1306
- };
1307
- var setup$2 = function (editor) {
1308
- editor.on('click keyup touchend', function () {
1309
- var selectedNode = editor.selection.getNode();
1310
- if (selectedNode && editor.dom.hasClass(selectedNode, 'mce-preview-object')) {
1311
- if (editor.dom.getAttrib(selectedNode, 'data-mce-selected')) {
1312
- selectedNode.setAttribute('data-mce-selected', '2');
1313
- }
1314
- }
1315
- });
1316
- editor.on('ObjectSelected', function (e) {
1317
- var objectType = e.target.getAttribute('data-mce-object');
1318
- if (objectType === 'script') {
1319
- e.preventDefault();
1320
- }
1321
- });
1322
- editor.on('ObjectResized', function (e) {
1323
- var target = e.target;
1324
- var html;
1325
- if (target.getAttribute('data-mce-object')) {
1326
- html = target.getAttribute('data-mce-html');
1327
- if (html) {
1328
- html = unescape(html);
1329
- target.setAttribute('data-mce-html', escape(updateHtml(html, {
1330
- width: String(e.width),
1331
- height: String(e.height)
1332
- })));
1333
- }
1334
- }
1335
- });
1336
- };
1337
- var stateSelectorAdapter = function (editor, selector) {
1338
- return function (buttonApi) {
1339
- return editor.selection.selectorChangedWithUnbind(selector.join(','), buttonApi.setActive).unbind;
1340
- };
1341
- };
1342
- var register$1 = function (editor) {
1343
- editor.ui.registry.addToggleButton('media', {
1344
- tooltip: 'Insert/edit media',
1345
- icon: 'embed',
1346
- onAction: function () {
1347
- editor.execCommand('mceMedia');
1348
- },
1349
- onSetup: stateSelectorAdapter(editor, [
1350
- 'img[data-mce-object]',
1351
- 'span[data-mce-object]',
1352
- 'div[data-ephox-embed-iri]'
1353
- ])
1354
- });
1355
- editor.ui.registry.addMenuItem('media', {
1356
- icon: 'embed',
1357
- text: 'Media...',
1358
- onAction: function () {
1359
- editor.execCommand('mceMedia');
1360
- }
1361
- });
1362
- };
1363
- function Plugin() {
1364
- global.add('media', function (editor) {
1365
- register(editor);
1366
- register$1(editor);
1367
- setup$1(editor);
1368
- setup(editor);
1369
- setup$2(editor);
1370
- return get$1(editor);
1371
- });
1372
- }
1373
- Plugin();
1374
- }());