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,489 @@
|
|
|
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 unique = 0;
|
|
15
|
+
var generate = function (prefix) {
|
|
16
|
+
var date = new Date();
|
|
17
|
+
var time = date.getTime();
|
|
18
|
+
var random = Math.floor(Math.random() * 1000000000);
|
|
19
|
+
unique++;
|
|
20
|
+
return prefix + '_' + random + unique + String(time);
|
|
21
|
+
};
|
|
22
|
+
|
|
23
|
+
var createTableHtml = function (cols, rows) {
|
|
24
|
+
var x, y, html;
|
|
25
|
+
html = '<table data-mce-id="mce" style="width: 100%">';
|
|
26
|
+
html += '<tbody>';
|
|
27
|
+
for (y = 0; y < rows; y++) {
|
|
28
|
+
html += '<tr>';
|
|
29
|
+
for (x = 0; x < cols; x++) {
|
|
30
|
+
html += '<td><br></td>';
|
|
31
|
+
}
|
|
32
|
+
html += '</tr>';
|
|
33
|
+
}
|
|
34
|
+
html += '</tbody>';
|
|
35
|
+
html += '</table>';
|
|
36
|
+
return html;
|
|
37
|
+
};
|
|
38
|
+
var getInsertedElement = function (editor) {
|
|
39
|
+
var elms = editor.dom.select('*[data-mce-id]');
|
|
40
|
+
return elms[0];
|
|
41
|
+
};
|
|
42
|
+
var insertTableHtml = function (editor, cols, rows) {
|
|
43
|
+
editor.undoManager.transact(function () {
|
|
44
|
+
editor.insertContent(createTableHtml(cols, rows));
|
|
45
|
+
var tableElm = getInsertedElement(editor);
|
|
46
|
+
tableElm.removeAttribute('data-mce-id');
|
|
47
|
+
var cellElm = editor.dom.select('td,th', tableElm);
|
|
48
|
+
editor.selection.setCursorLocation(cellElm[0], 0);
|
|
49
|
+
});
|
|
50
|
+
};
|
|
51
|
+
var insertTable = function (editor, cols, rows) {
|
|
52
|
+
editor.plugins.table ? editor.plugins.table.insertTable(cols, rows) : insertTableHtml(editor, cols, rows);
|
|
53
|
+
};
|
|
54
|
+
var insertBlob = function (editor, base64, blob) {
|
|
55
|
+
var blobCache = editor.editorUpload.blobCache;
|
|
56
|
+
var blobInfo = blobCache.create(generate('mceu'), blob, base64);
|
|
57
|
+
blobCache.add(blobInfo);
|
|
58
|
+
editor.insertContent(editor.dom.createHTML('img', { src: blobInfo.blobUri() }));
|
|
59
|
+
};
|
|
60
|
+
|
|
61
|
+
var global$1 = tinymce.util.Tools.resolve('tinymce.util.Promise');
|
|
62
|
+
|
|
63
|
+
var blobToBase64 = function (blob) {
|
|
64
|
+
return new global$1(function (resolve) {
|
|
65
|
+
var reader = new FileReader();
|
|
66
|
+
reader.onloadend = function () {
|
|
67
|
+
resolve(reader.result.split(',')[1]);
|
|
68
|
+
};
|
|
69
|
+
reader.readAsDataURL(blob);
|
|
70
|
+
});
|
|
71
|
+
};
|
|
72
|
+
|
|
73
|
+
var global$2 = tinymce.util.Tools.resolve('tinymce.Env');
|
|
74
|
+
|
|
75
|
+
var global$3 = tinymce.util.Tools.resolve('tinymce.util.Delay');
|
|
76
|
+
|
|
77
|
+
var pickFile = function (editor) {
|
|
78
|
+
return new global$1(function (resolve) {
|
|
79
|
+
var fileInput = document.createElement('input');
|
|
80
|
+
fileInput.type = 'file';
|
|
81
|
+
fileInput.accept = 'image/*';
|
|
82
|
+
fileInput.style.position = 'fixed';
|
|
83
|
+
fileInput.style.left = '0';
|
|
84
|
+
fileInput.style.top = '0';
|
|
85
|
+
fileInput.style.opacity = '0.001';
|
|
86
|
+
document.body.appendChild(fileInput);
|
|
87
|
+
var changeHandler = function (e) {
|
|
88
|
+
resolve(Array.prototype.slice.call(e.target.files));
|
|
89
|
+
};
|
|
90
|
+
fileInput.addEventListener('change', changeHandler);
|
|
91
|
+
var cancelHandler = function (e) {
|
|
92
|
+
var cleanup = function () {
|
|
93
|
+
resolve([]);
|
|
94
|
+
fileInput.parentNode.removeChild(fileInput);
|
|
95
|
+
};
|
|
96
|
+
if (global$2.os.isAndroid() && e.type !== 'remove') {
|
|
97
|
+
global$3.setEditorTimeout(editor, cleanup, 0);
|
|
98
|
+
} else {
|
|
99
|
+
cleanup();
|
|
100
|
+
}
|
|
101
|
+
editor.off('focusin remove', cancelHandler);
|
|
102
|
+
};
|
|
103
|
+
editor.on('focusin remove', cancelHandler);
|
|
104
|
+
fileInput.click();
|
|
105
|
+
});
|
|
106
|
+
};
|
|
107
|
+
|
|
108
|
+
var setupButtons = function (editor) {
|
|
109
|
+
editor.ui.registry.addButton('quickimage', {
|
|
110
|
+
icon: 'image',
|
|
111
|
+
tooltip: 'Insert image',
|
|
112
|
+
onAction: function () {
|
|
113
|
+
pickFile(editor).then(function (files) {
|
|
114
|
+
if (files.length > 0) {
|
|
115
|
+
var blob_1 = files[0];
|
|
116
|
+
blobToBase64(blob_1).then(function (base64) {
|
|
117
|
+
insertBlob(editor, base64, blob_1);
|
|
118
|
+
});
|
|
119
|
+
}
|
|
120
|
+
});
|
|
121
|
+
}
|
|
122
|
+
});
|
|
123
|
+
editor.ui.registry.addButton('quicktable', {
|
|
124
|
+
icon: 'table',
|
|
125
|
+
tooltip: 'Insert table',
|
|
126
|
+
onAction: function () {
|
|
127
|
+
insertTable(editor, 2, 2);
|
|
128
|
+
}
|
|
129
|
+
});
|
|
130
|
+
};
|
|
131
|
+
|
|
132
|
+
var typeOf = function (x) {
|
|
133
|
+
var t = typeof x;
|
|
134
|
+
if (x === null) {
|
|
135
|
+
return 'null';
|
|
136
|
+
} else if (t === 'object' && (Array.prototype.isPrototypeOf(x) || x.constructor && x.constructor.name === 'Array')) {
|
|
137
|
+
return 'array';
|
|
138
|
+
} else if (t === 'object' && (String.prototype.isPrototypeOf(x) || x.constructor && x.constructor.name === 'String')) {
|
|
139
|
+
return 'string';
|
|
140
|
+
} else {
|
|
141
|
+
return t;
|
|
142
|
+
}
|
|
143
|
+
};
|
|
144
|
+
var isType = function (type) {
|
|
145
|
+
return function (value) {
|
|
146
|
+
return typeOf(value) === type;
|
|
147
|
+
};
|
|
148
|
+
};
|
|
149
|
+
var isSimpleType = function (type) {
|
|
150
|
+
return function (value) {
|
|
151
|
+
return typeof value === type;
|
|
152
|
+
};
|
|
153
|
+
};
|
|
154
|
+
var eq = function (t) {
|
|
155
|
+
return function (a) {
|
|
156
|
+
return t === a;
|
|
157
|
+
};
|
|
158
|
+
};
|
|
159
|
+
var isString = isType('string');
|
|
160
|
+
var isObject = isType('object');
|
|
161
|
+
var isArray = isType('array');
|
|
162
|
+
var isBoolean = isSimpleType('boolean');
|
|
163
|
+
var isUndefined = eq(undefined);
|
|
164
|
+
var isFunction = isSimpleType('function');
|
|
165
|
+
|
|
166
|
+
var noop = function () {
|
|
167
|
+
};
|
|
168
|
+
var constant = function (value) {
|
|
169
|
+
return function () {
|
|
170
|
+
return value;
|
|
171
|
+
};
|
|
172
|
+
};
|
|
173
|
+
var never = constant(false);
|
|
174
|
+
var always = constant(true);
|
|
175
|
+
|
|
176
|
+
var none = function () {
|
|
177
|
+
return NONE;
|
|
178
|
+
};
|
|
179
|
+
var NONE = function () {
|
|
180
|
+
var eq = function (o) {
|
|
181
|
+
return o.isNone();
|
|
182
|
+
};
|
|
183
|
+
var call = function (thunk) {
|
|
184
|
+
return thunk();
|
|
185
|
+
};
|
|
186
|
+
var id = function (n) {
|
|
187
|
+
return n;
|
|
188
|
+
};
|
|
189
|
+
var me = {
|
|
190
|
+
fold: function (n, _s) {
|
|
191
|
+
return n();
|
|
192
|
+
},
|
|
193
|
+
is: never,
|
|
194
|
+
isSome: never,
|
|
195
|
+
isNone: always,
|
|
196
|
+
getOr: id,
|
|
197
|
+
getOrThunk: call,
|
|
198
|
+
getOrDie: function (msg) {
|
|
199
|
+
throw new Error(msg || 'error: getOrDie called on none.');
|
|
200
|
+
},
|
|
201
|
+
getOrNull: constant(null),
|
|
202
|
+
getOrUndefined: constant(undefined),
|
|
203
|
+
or: id,
|
|
204
|
+
orThunk: call,
|
|
205
|
+
map: none,
|
|
206
|
+
each: noop,
|
|
207
|
+
bind: none,
|
|
208
|
+
exists: never,
|
|
209
|
+
forall: always,
|
|
210
|
+
filter: none,
|
|
211
|
+
equals: eq,
|
|
212
|
+
equals_: eq,
|
|
213
|
+
toArray: function () {
|
|
214
|
+
return [];
|
|
215
|
+
},
|
|
216
|
+
toString: constant('none()')
|
|
217
|
+
};
|
|
218
|
+
return me;
|
|
219
|
+
}();
|
|
220
|
+
var some = function (a) {
|
|
221
|
+
var constant_a = constant(a);
|
|
222
|
+
var self = function () {
|
|
223
|
+
return me;
|
|
224
|
+
};
|
|
225
|
+
var bind = function (f) {
|
|
226
|
+
return f(a);
|
|
227
|
+
};
|
|
228
|
+
var me = {
|
|
229
|
+
fold: function (n, s) {
|
|
230
|
+
return s(a);
|
|
231
|
+
},
|
|
232
|
+
is: function (v) {
|
|
233
|
+
return a === v;
|
|
234
|
+
},
|
|
235
|
+
isSome: always,
|
|
236
|
+
isNone: never,
|
|
237
|
+
getOr: constant_a,
|
|
238
|
+
getOrThunk: constant_a,
|
|
239
|
+
getOrDie: constant_a,
|
|
240
|
+
getOrNull: constant_a,
|
|
241
|
+
getOrUndefined: constant_a,
|
|
242
|
+
or: self,
|
|
243
|
+
orThunk: self,
|
|
244
|
+
map: function (f) {
|
|
245
|
+
return some(f(a));
|
|
246
|
+
},
|
|
247
|
+
each: function (f) {
|
|
248
|
+
f(a);
|
|
249
|
+
},
|
|
250
|
+
bind: bind,
|
|
251
|
+
exists: bind,
|
|
252
|
+
forall: bind,
|
|
253
|
+
filter: function (f) {
|
|
254
|
+
return f(a) ? me : NONE;
|
|
255
|
+
},
|
|
256
|
+
toArray: function () {
|
|
257
|
+
return [a];
|
|
258
|
+
},
|
|
259
|
+
toString: function () {
|
|
260
|
+
return 'some(' + a + ')';
|
|
261
|
+
},
|
|
262
|
+
equals: function (o) {
|
|
263
|
+
return o.is(a);
|
|
264
|
+
},
|
|
265
|
+
equals_: function (o, elementEq) {
|
|
266
|
+
return o.fold(never, function (b) {
|
|
267
|
+
return elementEq(a, b);
|
|
268
|
+
});
|
|
269
|
+
}
|
|
270
|
+
};
|
|
271
|
+
return me;
|
|
272
|
+
};
|
|
273
|
+
var from = function (value) {
|
|
274
|
+
return value === null || value === undefined ? NONE : some(value);
|
|
275
|
+
};
|
|
276
|
+
var Optional = {
|
|
277
|
+
some: some,
|
|
278
|
+
none: none,
|
|
279
|
+
from: from
|
|
280
|
+
};
|
|
281
|
+
|
|
282
|
+
function ClosestOrAncestor (is, ancestor, scope, a, isRoot) {
|
|
283
|
+
if (is(scope, a)) {
|
|
284
|
+
return Optional.some(scope);
|
|
285
|
+
} else if (isFunction(isRoot) && isRoot(scope)) {
|
|
286
|
+
return Optional.none();
|
|
287
|
+
} else {
|
|
288
|
+
return ancestor(scope, a, isRoot);
|
|
289
|
+
}
|
|
290
|
+
}
|
|
291
|
+
|
|
292
|
+
var ELEMENT = 1;
|
|
293
|
+
|
|
294
|
+
var fromHtml = function (html, scope) {
|
|
295
|
+
var doc = scope || document;
|
|
296
|
+
var div = doc.createElement('div');
|
|
297
|
+
div.innerHTML = html;
|
|
298
|
+
if (!div.hasChildNodes() || div.childNodes.length > 1) {
|
|
299
|
+
console.error('HTML does not have a single root node', html);
|
|
300
|
+
throw new Error('HTML must have a single root node');
|
|
301
|
+
}
|
|
302
|
+
return fromDom(div.childNodes[0]);
|
|
303
|
+
};
|
|
304
|
+
var fromTag = function (tag, scope) {
|
|
305
|
+
var doc = scope || document;
|
|
306
|
+
var node = doc.createElement(tag);
|
|
307
|
+
return fromDom(node);
|
|
308
|
+
};
|
|
309
|
+
var fromText = function (text, scope) {
|
|
310
|
+
var doc = scope || document;
|
|
311
|
+
var node = doc.createTextNode(text);
|
|
312
|
+
return fromDom(node);
|
|
313
|
+
};
|
|
314
|
+
var fromDom = function (node) {
|
|
315
|
+
if (node === null || node === undefined) {
|
|
316
|
+
throw new Error('Node cannot be null or undefined');
|
|
317
|
+
}
|
|
318
|
+
return { dom: node };
|
|
319
|
+
};
|
|
320
|
+
var fromPoint = function (docElm, x, y) {
|
|
321
|
+
return Optional.from(docElm.dom.elementFromPoint(x, y)).map(fromDom);
|
|
322
|
+
};
|
|
323
|
+
var SugarElement = {
|
|
324
|
+
fromHtml: fromHtml,
|
|
325
|
+
fromTag: fromTag,
|
|
326
|
+
fromText: fromText,
|
|
327
|
+
fromDom: fromDom,
|
|
328
|
+
fromPoint: fromPoint
|
|
329
|
+
};
|
|
330
|
+
|
|
331
|
+
var is = function (element, selector) {
|
|
332
|
+
var dom = element.dom;
|
|
333
|
+
if (dom.nodeType !== ELEMENT) {
|
|
334
|
+
return false;
|
|
335
|
+
} else {
|
|
336
|
+
var elem = dom;
|
|
337
|
+
if (elem.matches !== undefined) {
|
|
338
|
+
return elem.matches(selector);
|
|
339
|
+
} else if (elem.msMatchesSelector !== undefined) {
|
|
340
|
+
return elem.msMatchesSelector(selector);
|
|
341
|
+
} else if (elem.webkitMatchesSelector !== undefined) {
|
|
342
|
+
return elem.webkitMatchesSelector(selector);
|
|
343
|
+
} else if (elem.mozMatchesSelector !== undefined) {
|
|
344
|
+
return elem.mozMatchesSelector(selector);
|
|
345
|
+
} else {
|
|
346
|
+
throw new Error('Browser lacks native selectors');
|
|
347
|
+
}
|
|
348
|
+
}
|
|
349
|
+
};
|
|
350
|
+
|
|
351
|
+
var Global = typeof window !== 'undefined' ? window : Function('return this;')();
|
|
352
|
+
|
|
353
|
+
var name = function (element) {
|
|
354
|
+
var r = element.dom.nodeName;
|
|
355
|
+
return r.toLowerCase();
|
|
356
|
+
};
|
|
357
|
+
|
|
358
|
+
var ancestor = function (scope, predicate, isRoot) {
|
|
359
|
+
var element = scope.dom;
|
|
360
|
+
var stop = isFunction(isRoot) ? isRoot : never;
|
|
361
|
+
while (element.parentNode) {
|
|
362
|
+
element = element.parentNode;
|
|
363
|
+
var el = SugarElement.fromDom(element);
|
|
364
|
+
if (predicate(el)) {
|
|
365
|
+
return Optional.some(el);
|
|
366
|
+
} else if (stop(el)) {
|
|
367
|
+
break;
|
|
368
|
+
}
|
|
369
|
+
}
|
|
370
|
+
return Optional.none();
|
|
371
|
+
};
|
|
372
|
+
var closest = function (scope, predicate, isRoot) {
|
|
373
|
+
var is = function (s, test) {
|
|
374
|
+
return test(s);
|
|
375
|
+
};
|
|
376
|
+
return ClosestOrAncestor(is, ancestor, scope, predicate, isRoot);
|
|
377
|
+
};
|
|
378
|
+
|
|
379
|
+
var ancestor$1 = function (scope, selector, isRoot) {
|
|
380
|
+
return ancestor(scope, function (e) {
|
|
381
|
+
return is(e, selector);
|
|
382
|
+
}, isRoot);
|
|
383
|
+
};
|
|
384
|
+
var closest$1 = function (scope, selector, isRoot) {
|
|
385
|
+
var is$1 = function (element, selector) {
|
|
386
|
+
return is(element, selector);
|
|
387
|
+
};
|
|
388
|
+
return ClosestOrAncestor(is$1, ancestor$1, scope, selector, isRoot);
|
|
389
|
+
};
|
|
390
|
+
|
|
391
|
+
var validDefaultOrDie = function (value, predicate) {
|
|
392
|
+
if (predicate(value)) {
|
|
393
|
+
return true;
|
|
394
|
+
}
|
|
395
|
+
throw new Error('Default value doesn\'t match requested type.');
|
|
396
|
+
};
|
|
397
|
+
var items = function (value, defaultValue) {
|
|
398
|
+
if (isArray(value) || isObject(value)) {
|
|
399
|
+
throw new Error('expected a string but found: ' + value);
|
|
400
|
+
}
|
|
401
|
+
if (isUndefined(value)) {
|
|
402
|
+
return defaultValue;
|
|
403
|
+
}
|
|
404
|
+
if (isBoolean(value)) {
|
|
405
|
+
return value === false ? '' : defaultValue;
|
|
406
|
+
}
|
|
407
|
+
return value;
|
|
408
|
+
};
|
|
409
|
+
var getToolbarItemsOr_ = function (predicate) {
|
|
410
|
+
return function (editor, name, defaultValue) {
|
|
411
|
+
validDefaultOrDie(defaultValue, predicate);
|
|
412
|
+
var value = editor.getParam(name, defaultValue);
|
|
413
|
+
return items(value, defaultValue);
|
|
414
|
+
};
|
|
415
|
+
};
|
|
416
|
+
var getToolbarItemsOr = getToolbarItemsOr_(isString);
|
|
417
|
+
|
|
418
|
+
var getTextSelectionToolbarItems = function (editor) {
|
|
419
|
+
return getToolbarItemsOr(editor, 'quickbars_selection_toolbar', 'bold italic | quicklink h2 h3 blockquote');
|
|
420
|
+
};
|
|
421
|
+
var getInsertToolbarItems = function (editor) {
|
|
422
|
+
return getToolbarItemsOr(editor, 'quickbars_insert_toolbar', 'quickimage quicktable');
|
|
423
|
+
};
|
|
424
|
+
var getImageToolbarItems = function (editor) {
|
|
425
|
+
return getToolbarItemsOr(editor, 'quickbars_image_toolbar', 'alignleft aligncenter alignright');
|
|
426
|
+
};
|
|
427
|
+
|
|
428
|
+
var addToEditor = function (editor) {
|
|
429
|
+
var insertToolbarItems = getInsertToolbarItems(editor);
|
|
430
|
+
if (insertToolbarItems.trim().length > 0) {
|
|
431
|
+
editor.ui.registry.addContextToolbar('quickblock', {
|
|
432
|
+
predicate: function (node) {
|
|
433
|
+
var sugarNode = SugarElement.fromDom(node);
|
|
434
|
+
var textBlockElementsMap = editor.schema.getTextBlockElements();
|
|
435
|
+
var isRoot = function (elem) {
|
|
436
|
+
return elem.dom === editor.getBody();
|
|
437
|
+
};
|
|
438
|
+
return closest$1(sugarNode, 'table', isRoot).fold(function () {
|
|
439
|
+
return closest(sugarNode, function (elem) {
|
|
440
|
+
return name(elem) in textBlockElementsMap && editor.dom.isEmpty(elem.dom);
|
|
441
|
+
}, isRoot).isSome();
|
|
442
|
+
}, never);
|
|
443
|
+
},
|
|
444
|
+
items: insertToolbarItems,
|
|
445
|
+
position: 'line',
|
|
446
|
+
scope: 'editor'
|
|
447
|
+
});
|
|
448
|
+
}
|
|
449
|
+
};
|
|
450
|
+
|
|
451
|
+
var addToEditor$1 = function (editor) {
|
|
452
|
+
var isEditable = function (node) {
|
|
453
|
+
return editor.dom.getContentEditableParent(node) !== 'false';
|
|
454
|
+
};
|
|
455
|
+
var isImage = function (node) {
|
|
456
|
+
return node.nodeName === 'IMG' || node.nodeName === 'FIGURE' && /image/i.test(node.className);
|
|
457
|
+
};
|
|
458
|
+
var imageToolbarItems = getImageToolbarItems(editor);
|
|
459
|
+
if (imageToolbarItems.trim().length > 0) {
|
|
460
|
+
editor.ui.registry.addContextToolbar('imageselection', {
|
|
461
|
+
predicate: isImage,
|
|
462
|
+
items: imageToolbarItems,
|
|
463
|
+
position: 'node'
|
|
464
|
+
});
|
|
465
|
+
}
|
|
466
|
+
var textToolbarItems = getTextSelectionToolbarItems(editor);
|
|
467
|
+
if (textToolbarItems.trim().length > 0) {
|
|
468
|
+
editor.ui.registry.addContextToolbar('textselection', {
|
|
469
|
+
predicate: function (node) {
|
|
470
|
+
return !isImage(node) && !editor.selection.isCollapsed() && isEditable(node);
|
|
471
|
+
},
|
|
472
|
+
items: textToolbarItems,
|
|
473
|
+
position: 'selection',
|
|
474
|
+
scope: 'editor'
|
|
475
|
+
});
|
|
476
|
+
}
|
|
477
|
+
};
|
|
478
|
+
|
|
479
|
+
function Plugin () {
|
|
480
|
+
global.add('quickbars', function (editor) {
|
|
481
|
+
setupButtons(editor);
|
|
482
|
+
addToEditor(editor);
|
|
483
|
+
addToEditor$1(editor);
|
|
484
|
+
});
|
|
485
|
+
}
|
|
486
|
+
|
|
487
|
+
Plugin();
|
|
488
|
+
|
|
489
|
+
}());
|
|
@@ -0,0 +1,9 @@
|
|
|
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(){"use strict";var t,e,n,r,o=tinymce.util.Tools.resolve("tinymce.PluginManager"),c=0,a=function(e,t,n){var r,o,i=e.editorUpload.blobCache,u=i.create((r="mceu",o=(new Date).getTime(),r+"_"+Math.floor(1e9*Math.random())+ ++c+String(o)),n,t);i.add(u),e.insertContent(e.dom.createHTML("img",{src:u.blobUri()}))},l=tinymce.util.Tools.resolve("tinymce.util.Promise"),s=tinymce.util.Tools.resolve("tinymce.Env"),f=tinymce.util.Tools.resolve("tinymce.util.Delay"),i=function(u){u.ui.registry.addButton("quickimage",{icon:"image",tooltip:"Insert image",onAction:function(){var i;i=u,new l(function(n){var r=document.createElement("input");r.type="file",r.accept="image/*",r.style.position="fixed",r.style.left="0",r.style.top="0",r.style.opacity="0.001",document.body.appendChild(r),r.addEventListener("change",function(e){n(Array.prototype.slice.call(e.target.files))});var o=function(e){var t=function(){n([]),r.parentNode.removeChild(r)};s.os.isAndroid()&&"remove"!==e.type?f.setEditorTimeout(i,t,0):t(),i.off("focusin remove",o)};i.on("focusin remove",o),r.click()}).then(function(e){var t,n;0<e.length&&(t=e[0],n=t,new l(function(e){var t=new FileReader;t.onloadend=function(){e(t.result.split(",")[1])},t.readAsDataURL(n)}).then(function(e){a(u,e,t)}))})}}),u.ui.registry.addButton("quicktable",{icon:"table",tooltip:"Insert table",onAction:function(){var e,t,n,r,o,i;n=t=2,(e=u).plugins.table?e.plugins.table.insertTable(t,n):(o=t,i=n,(r=e).undoManager.transact(function(){r.insertContent(function(e,t){var n,r,o='<table data-mce-id="mce" style="width: 100%">';for(o+="<tbody>",r=0;r<t;r++){for(o+="<tr>",n=0;n<e;n++)o+="<td><br></td>";o+="</tr>"}return o+="</tbody>",o+="</table>"}(o,i));var e=r.dom.select("*[data-mce-id]")[0];e.removeAttribute("data-mce-id");var t=r.dom.select("td,th",e);r.selection.setCursorLocation(t[0],0)}))}})},u=function(r){return function(e){return n=typeof(t=e),(null===t?"null":"object"==n&&(Array.prototype.isPrototypeOf(t)||t.constructor&&"Array"===t.constructor.name)?"array":"object"==n&&(String.prototype.isPrototypeOf(t)||t.constructor&&"String"===t.constructor.name)?"string":n)===r;var t,n}},d=function(t){return function(e){return typeof e===t}},m=u("string"),g=u("object"),h=u("array"),p=d("boolean"),b=(t=undefined,function(e){return t===e}),y=d("function"),v=function(e){return function(){return e}},k=v(!1),w=v(!0),T=function(){return N},N=(e=function(e){return e.isNone()},{fold:function(e,t){return e()},is:k,isSome:k,isNone:w,getOr:r=function(e){return e},getOrThunk:n=function(e){return e()},getOrDie:function(e){throw new Error(e||"error: getOrDie called on none.")},getOrNull:v(null),getOrUndefined:v(undefined),or:r,orThunk:n,map:T,each:function(){},bind:T,exists:k,forall:w,filter:T,equals:e,equals_:e,toArray:function(){return[]},toString:v("none()")}),q=function(n){var e=v(n),t=function(){return o},r=function(e){return e(n)},o={fold:function(e,t){return t(n)},is:function(e){return n===e},isSome:w,isNone:k,getOr:e,getOrThunk:e,getOrDie:e,getOrNull:e,getOrUndefined:e,or:t,orThunk:t,map:function(e){return q(e(n))},each:function(e){e(n)},bind:r,exists:r,forall:r,filter:function(e){return e(n)?o:N},toArray:function(){return[n]},toString:function(){return"some("+n+")"},equals:function(e){return e.is(n)},equals_:function(e,t){return e.fold(k,function(e){return t(n,e)})}};return o},E={some:q,none:T,from:function(e){return null===e||e===undefined?N:q(e)}};function M(e,t,n,r,o){return e(n,r)?E.some(n):y(o)&&o(n)?E.none():t(n,r,o)}var S,C=function(e){if(null===e||e===undefined)throw new Error("Node cannot be null or undefined");return{dom:e}},O={fromHtml:function(e,t){var n=(t||document).createElement("div");if(n.innerHTML=e,!n.hasChildNodes()||1<n.childNodes.length)throw console.error("HTML does not have a single root node",e),new Error("HTML must have a single root node");return C(n.childNodes[0])},fromTag:function(e,t){var n=(t||document).createElement(e);return C(n)},fromText:function(e,t){var n=(t||document).createTextNode(e);return C(n)},fromDom:C,fromPoint:function(e,t,n){return E.from(e.dom.elementFromPoint(t,n)).map(C)}},x=function(e,t){var n=e.dom;if(1!==n.nodeType)return!1;var r=n;if(r.matches!==undefined)return r.matches(t);if(r.msMatchesSelector!==undefined)return r.msMatchesSelector(t);if(r.webkitMatchesSelector!==undefined)return r.webkitMatchesSelector(t);if(r.mozMatchesSelector!==undefined)return r.mozMatchesSelector(t);throw new Error("Browser lacks native selectors")},A=("undefined"!=typeof window||Function("return this;")(),function(e,t,n){for(var r=e.dom,o=y(n)?n:k;r.parentNode;){r=r.parentNode;var i=O.fromDom(r);if(t(i))return E.some(i);if(o(i))break}return E.none()}),D=function(e,t,n){return A(e,function(e){return x(e,t)},n)},_=(S=m,function(e,t,n){return function(e,t){if(!t(e))throw new Error("Default value doesn't match requested type.")}(n,S),function(e,t){if(h(e)||g(e))throw new Error("expected a string but found: "+e);return b(e)?t:p(e)?!1===e?"":t:e}(e.getParam(t,n),n)}),L=function(o){var e=_(o,"quickbars_insert_toolbar","quickimage quicktable");0<e.trim().length&&o.ui.registry.addContextToolbar("quickblock",{predicate:function(e){var t=O.fromDom(e),n=o.schema.getTextBlockElements(),r=function(e){return e.dom===o.getBody()};return M(x,D,t,"table",r).fold(function(){return M(function(e,t){return t(e)},A,t,function(e){return e.dom.nodeName.toLowerCase()in n&&o.dom.isEmpty(e.dom)},r).isSome()},k)},items:e,position:"line",scope:"editor"})},P=function(n){var r=function(e){return"IMG"===e.nodeName||"FIGURE"===e.nodeName&&/image/i.test(e.className)},e=_(n,"quickbars_image_toolbar","alignleft aligncenter alignright");0<e.trim().length&&n.ui.registry.addContextToolbar("imageselection",{predicate:r,items:e,position:"node"});var t=_(n,"quickbars_selection_toolbar","bold italic | quicklink h2 h3 blockquote");0<t.trim().length&&n.ui.registry.addContextToolbar("textselection",{predicate:function(e){return!r(e)&&!n.selection.isCollapsed()&&(t=e,"false"!==n.dom.getContentEditableParent(t));var t},items:t,position:"selection",scope:"editor"})};o.add("quickbars",function(e){i(e),L(e),P(e)})}();
|
|
@@ -0,0 +1,119 @@
|
|
|
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 global$1 = tinymce.util.Tools.resolve('tinymce.dom.DOMUtils');
|
|
15
|
+
|
|
16
|
+
var global$2 = tinymce.util.Tools.resolve('tinymce.util.Tools');
|
|
17
|
+
|
|
18
|
+
var enableWhenDirty = function (editor) {
|
|
19
|
+
return editor.getParam('save_enablewhendirty', true);
|
|
20
|
+
};
|
|
21
|
+
var hasOnSaveCallback = function (editor) {
|
|
22
|
+
return !!editor.getParam('save_onsavecallback');
|
|
23
|
+
};
|
|
24
|
+
var hasOnCancelCallback = function (editor) {
|
|
25
|
+
return !!editor.getParam('save_oncancelcallback');
|
|
26
|
+
};
|
|
27
|
+
|
|
28
|
+
var displayErrorMessage = function (editor, message) {
|
|
29
|
+
editor.notificationManager.open({
|
|
30
|
+
text: message,
|
|
31
|
+
type: 'error'
|
|
32
|
+
});
|
|
33
|
+
};
|
|
34
|
+
var save = function (editor) {
|
|
35
|
+
var formObj = global$1.DOM.getParent(editor.id, 'form');
|
|
36
|
+
if (enableWhenDirty(editor) && !editor.isDirty()) {
|
|
37
|
+
return;
|
|
38
|
+
}
|
|
39
|
+
editor.save();
|
|
40
|
+
if (hasOnSaveCallback(editor)) {
|
|
41
|
+
editor.execCallback('save_onsavecallback', editor);
|
|
42
|
+
editor.nodeChanged();
|
|
43
|
+
return;
|
|
44
|
+
}
|
|
45
|
+
if (formObj) {
|
|
46
|
+
editor.setDirty(false);
|
|
47
|
+
if (!formObj.onsubmit || formObj.onsubmit()) {
|
|
48
|
+
if (typeof formObj.submit === 'function') {
|
|
49
|
+
formObj.submit();
|
|
50
|
+
} else {
|
|
51
|
+
displayErrorMessage(editor, 'Error: Form submit field collision.');
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
editor.nodeChanged();
|
|
55
|
+
} else {
|
|
56
|
+
displayErrorMessage(editor, 'Error: No form element found.');
|
|
57
|
+
}
|
|
58
|
+
};
|
|
59
|
+
var cancel = function (editor) {
|
|
60
|
+
var h = global$2.trim(editor.startContent);
|
|
61
|
+
if (hasOnCancelCallback(editor)) {
|
|
62
|
+
editor.execCallback('save_oncancelcallback', editor);
|
|
63
|
+
return;
|
|
64
|
+
}
|
|
65
|
+
editor.resetContent(h);
|
|
66
|
+
};
|
|
67
|
+
|
|
68
|
+
var register = function (editor) {
|
|
69
|
+
editor.addCommand('mceSave', function () {
|
|
70
|
+
save(editor);
|
|
71
|
+
});
|
|
72
|
+
editor.addCommand('mceCancel', function () {
|
|
73
|
+
cancel(editor);
|
|
74
|
+
});
|
|
75
|
+
};
|
|
76
|
+
|
|
77
|
+
var stateToggle = function (editor) {
|
|
78
|
+
return function (api) {
|
|
79
|
+
var handler = function () {
|
|
80
|
+
api.setDisabled(enableWhenDirty(editor) && !editor.isDirty());
|
|
81
|
+
};
|
|
82
|
+
editor.on('NodeChange dirty', handler);
|
|
83
|
+
return function () {
|
|
84
|
+
return editor.off('NodeChange dirty', handler);
|
|
85
|
+
};
|
|
86
|
+
};
|
|
87
|
+
};
|
|
88
|
+
var register$1 = function (editor) {
|
|
89
|
+
editor.ui.registry.addButton('save', {
|
|
90
|
+
icon: 'save',
|
|
91
|
+
tooltip: 'Save',
|
|
92
|
+
disabled: true,
|
|
93
|
+
onAction: function () {
|
|
94
|
+
return editor.execCommand('mceSave');
|
|
95
|
+
},
|
|
96
|
+
onSetup: stateToggle(editor)
|
|
97
|
+
});
|
|
98
|
+
editor.ui.registry.addButton('cancel', {
|
|
99
|
+
icon: 'cancel',
|
|
100
|
+
tooltip: 'Cancel',
|
|
101
|
+
disabled: true,
|
|
102
|
+
onAction: function () {
|
|
103
|
+
return editor.execCommand('mceCancel');
|
|
104
|
+
},
|
|
105
|
+
onSetup: stateToggle(editor)
|
|
106
|
+
});
|
|
107
|
+
editor.addShortcut('Meta+S', '', 'mceSave');
|
|
108
|
+
};
|
|
109
|
+
|
|
110
|
+
function Plugin () {
|
|
111
|
+
global.add('save', function (editor) {
|
|
112
|
+
register$1(editor);
|
|
113
|
+
register(editor);
|
|
114
|
+
});
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
Plugin();
|
|
118
|
+
|
|
119
|
+
}());
|
|
@@ -0,0 +1,9 @@
|
|
|
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(){"use strict";var e=tinymce.util.Tools.resolve("tinymce.PluginManager"),o=tinymce.util.Tools.resolve("tinymce.dom.DOMUtils"),a=tinymce.util.Tools.resolve("tinymce.util.Tools"),i=function(e){return e.getParam("save_enablewhendirty",!0)},c=function(e,n){e.notificationManager.open({text:n,type:"error"})},t=function(t){t.addCommand("mceSave",function(){!function(e){var n=o.DOM.getParent(e.id,"form");if(!i(e)||e.isDirty()){if(e.save(),e.getParam("save_onsavecallback"))return e.execCallback("save_onsavecallback",e),e.nodeChanged();n?(e.setDirty(!1),n.onsubmit&&!n.onsubmit()||("function"==typeof n.submit?n.submit():c(e,"Error: Form submit field collision.")),e.nodeChanged()):c(e,"Error: No form element found.")}}(t)}),t.addCommand("mceCancel",function(){var e,n;e=t,n=a.trim(e.startContent),e.getParam("save_oncancelcallback")?e.execCallback("save_oncancelcallback",e):e.resetContent(n)})},r=function(t){return function(e){var n=function(){e.setDisabled(i(t)&&!t.isDirty())};return t.on("NodeChange dirty",n),function(){return t.off("NodeChange dirty",n)}}};e.add("save",function(e){var n;(n=e).ui.registry.addButton("save",{icon:"save",tooltip:"Save",disabled:!0,onAction:function(){return n.execCommand("mceSave")},onSetup:r(n)}),n.ui.registry.addButton("cancel",{icon:"cancel",tooltip:"Cancel",disabled:!0,onAction:function(){return n.execCommand("mceCancel")},onSetup:r(n)}),n.addShortcut("Meta+S","","mceSave"),t(e)})}();
|