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