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,185 @@
|
|
|
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.Env');
|
|
15
|
+
|
|
16
|
+
var getAutoLinkPattern = function (editor) {
|
|
17
|
+
return editor.getParam('autolink_pattern', /^(https?:\/\/|ssh:\/\/|ftp:\/\/|file:\/|www\.|(?:mailto:)?[A-Z0-9._%+\-]+@(?!.*@))(.+)$/i);
|
|
18
|
+
};
|
|
19
|
+
var getDefaultLinkTarget = function (editor) {
|
|
20
|
+
return editor.getParam('default_link_target', false);
|
|
21
|
+
};
|
|
22
|
+
var getDefaultLinkProtocol = function (editor) {
|
|
23
|
+
return editor.getParam('link_default_protocol', 'http', 'string');
|
|
24
|
+
};
|
|
25
|
+
|
|
26
|
+
var rangeEqualsDelimiterOrSpace = function (rangeString, delimiter) {
|
|
27
|
+
return rangeString === delimiter || rangeString === ' ' || rangeString.charCodeAt(0) === 160;
|
|
28
|
+
};
|
|
29
|
+
var handleEclipse = function (editor) {
|
|
30
|
+
parseCurrentLine(editor, -1, '(');
|
|
31
|
+
};
|
|
32
|
+
var handleSpacebar = function (editor) {
|
|
33
|
+
parseCurrentLine(editor, 0, '');
|
|
34
|
+
};
|
|
35
|
+
var handleEnter = function (editor) {
|
|
36
|
+
parseCurrentLine(editor, -1, '');
|
|
37
|
+
};
|
|
38
|
+
var scopeIndex = function (container, index) {
|
|
39
|
+
if (index < 0) {
|
|
40
|
+
index = 0;
|
|
41
|
+
}
|
|
42
|
+
if (container.nodeType === 3) {
|
|
43
|
+
var len = container.data.length;
|
|
44
|
+
if (index > len) {
|
|
45
|
+
index = len;
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
return index;
|
|
49
|
+
};
|
|
50
|
+
var setStart = function (rng, container, offset) {
|
|
51
|
+
if (container.nodeType !== 1 || container.hasChildNodes()) {
|
|
52
|
+
rng.setStart(container, scopeIndex(container, offset));
|
|
53
|
+
} else {
|
|
54
|
+
rng.setStartBefore(container);
|
|
55
|
+
}
|
|
56
|
+
};
|
|
57
|
+
var setEnd = function (rng, container, offset) {
|
|
58
|
+
if (container.nodeType !== 1 || container.hasChildNodes()) {
|
|
59
|
+
rng.setEnd(container, scopeIndex(container, offset));
|
|
60
|
+
} else {
|
|
61
|
+
rng.setEndAfter(container);
|
|
62
|
+
}
|
|
63
|
+
};
|
|
64
|
+
var parseCurrentLine = function (editor, endOffset, delimiter) {
|
|
65
|
+
var end, endContainer, bookmark, text, prev, len, rngText;
|
|
66
|
+
var autoLinkPattern = getAutoLinkPattern(editor);
|
|
67
|
+
var defaultLinkTarget = getDefaultLinkTarget(editor);
|
|
68
|
+
if (editor.selection.getNode().tagName === 'A') {
|
|
69
|
+
return;
|
|
70
|
+
}
|
|
71
|
+
var rng = editor.selection.getRng().cloneRange();
|
|
72
|
+
if (rng.startOffset < 5) {
|
|
73
|
+
prev = rng.endContainer.previousSibling;
|
|
74
|
+
if (!prev) {
|
|
75
|
+
if (!rng.endContainer.firstChild || !rng.endContainer.firstChild.nextSibling) {
|
|
76
|
+
return;
|
|
77
|
+
}
|
|
78
|
+
prev = rng.endContainer.firstChild.nextSibling;
|
|
79
|
+
}
|
|
80
|
+
len = prev.length;
|
|
81
|
+
setStart(rng, prev, len);
|
|
82
|
+
setEnd(rng, prev, len);
|
|
83
|
+
if (rng.endOffset < 5) {
|
|
84
|
+
return;
|
|
85
|
+
}
|
|
86
|
+
end = rng.endOffset;
|
|
87
|
+
endContainer = prev;
|
|
88
|
+
} else {
|
|
89
|
+
endContainer = rng.endContainer;
|
|
90
|
+
if (endContainer.nodeType !== 3 && endContainer.firstChild) {
|
|
91
|
+
while (endContainer.nodeType !== 3 && endContainer.firstChild) {
|
|
92
|
+
endContainer = endContainer.firstChild;
|
|
93
|
+
}
|
|
94
|
+
if (endContainer.nodeType === 3) {
|
|
95
|
+
setStart(rng, endContainer, 0);
|
|
96
|
+
setEnd(rng, endContainer, endContainer.nodeValue.length);
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
if (rng.endOffset === 1) {
|
|
100
|
+
end = 2;
|
|
101
|
+
} else {
|
|
102
|
+
end = rng.endOffset - 1 - endOffset;
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
var start = end;
|
|
106
|
+
do {
|
|
107
|
+
setStart(rng, endContainer, end >= 2 ? end - 2 : 0);
|
|
108
|
+
setEnd(rng, endContainer, end >= 1 ? end - 1 : 0);
|
|
109
|
+
end -= 1;
|
|
110
|
+
rngText = rng.toString();
|
|
111
|
+
} while (rngText !== ' ' && rngText !== '' && rngText.charCodeAt(0) !== 160 && end - 2 >= 0 && rngText !== delimiter);
|
|
112
|
+
if (rangeEqualsDelimiterOrSpace(rng.toString(), delimiter)) {
|
|
113
|
+
setStart(rng, endContainer, end);
|
|
114
|
+
setEnd(rng, endContainer, start);
|
|
115
|
+
end += 1;
|
|
116
|
+
} else if (rng.startOffset === 0) {
|
|
117
|
+
setStart(rng, endContainer, 0);
|
|
118
|
+
setEnd(rng, endContainer, start);
|
|
119
|
+
} else {
|
|
120
|
+
setStart(rng, endContainer, end);
|
|
121
|
+
setEnd(rng, endContainer, start);
|
|
122
|
+
}
|
|
123
|
+
text = rng.toString();
|
|
124
|
+
if (text.charAt(text.length - 1) === '.') {
|
|
125
|
+
setEnd(rng, endContainer, start - 1);
|
|
126
|
+
}
|
|
127
|
+
text = rng.toString().trim();
|
|
128
|
+
var matches = text.match(autoLinkPattern);
|
|
129
|
+
var protocol = getDefaultLinkProtocol(editor);
|
|
130
|
+
if (matches) {
|
|
131
|
+
if (matches[1] === 'www.') {
|
|
132
|
+
matches[1] = protocol + '://www.';
|
|
133
|
+
} else if (/@$/.test(matches[1]) && !/^mailto:/.test(matches[1])) {
|
|
134
|
+
matches[1] = 'mailto:' + matches[1];
|
|
135
|
+
}
|
|
136
|
+
bookmark = editor.selection.getBookmark();
|
|
137
|
+
editor.selection.setRng(rng);
|
|
138
|
+
editor.execCommand('createlink', false, matches[1] + matches[2]);
|
|
139
|
+
if (defaultLinkTarget !== false) {
|
|
140
|
+
editor.dom.setAttrib(editor.selection.getNode(), 'target', defaultLinkTarget);
|
|
141
|
+
}
|
|
142
|
+
editor.selection.moveToBookmark(bookmark);
|
|
143
|
+
editor.nodeChanged();
|
|
144
|
+
}
|
|
145
|
+
};
|
|
146
|
+
var setup = function (editor) {
|
|
147
|
+
var autoUrlDetectState;
|
|
148
|
+
editor.on('keydown', function (e) {
|
|
149
|
+
if (e.keyCode === 13) {
|
|
150
|
+
return handleEnter(editor);
|
|
151
|
+
}
|
|
152
|
+
});
|
|
153
|
+
if (global$1.browser.isIE()) {
|
|
154
|
+
editor.on('focus', function () {
|
|
155
|
+
if (!autoUrlDetectState) {
|
|
156
|
+
autoUrlDetectState = true;
|
|
157
|
+
try {
|
|
158
|
+
editor.execCommand('AutoUrlDetect', false, true);
|
|
159
|
+
} catch (ex) {
|
|
160
|
+
}
|
|
161
|
+
}
|
|
162
|
+
});
|
|
163
|
+
return;
|
|
164
|
+
}
|
|
165
|
+
editor.on('keypress', function (e) {
|
|
166
|
+
if (e.keyCode === 41) {
|
|
167
|
+
return handleEclipse(editor);
|
|
168
|
+
}
|
|
169
|
+
});
|
|
170
|
+
editor.on('keyup', function (e) {
|
|
171
|
+
if (e.keyCode === 32) {
|
|
172
|
+
return handleSpacebar(editor);
|
|
173
|
+
}
|
|
174
|
+
});
|
|
175
|
+
};
|
|
176
|
+
|
|
177
|
+
function Plugin () {
|
|
178
|
+
global.add('autolink', function (editor) {
|
|
179
|
+
setup(editor);
|
|
180
|
+
});
|
|
181
|
+
}
|
|
182
|
+
|
|
183
|
+
Plugin();
|
|
184
|
+
|
|
185
|
+
}());
|
|
@@ -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.Env"),i=function(e,t){var n;return t<0&&(t=0),3!==e.nodeType||(n=e.data.length)<t&&(t=n),t},y=function(e,t,n){1!==t.nodeType||t.hasChildNodes()?e.setStart(t,i(t,n)):e.setStartBefore(t)},k=function(e,t,n){1!==t.nodeType||t.hasChildNodes()?e.setEnd(t,i(t,n)):e.setEndAfter(t)},r=function(e,t,n){var o,i,r,a,s,d,f,l=e.getParam("autolink_pattern",/^(https?:\/\/|ssh:\/\/|ftp:\/\/|file:\/|www\.|(?:mailto:)?[A-Z0-9._%+\-]+@(?!.*@))(.+)$/i),c=e.getParam("default_link_target",!1);if("A"!==e.selection.getNode().tagName){var g=e.selection.getRng().cloneRange();if(g.startOffset<5){if(!(s=g.endContainer.previousSibling)){if(!g.endContainer.firstChild||!g.endContainer.firstChild.nextSibling)return;s=g.endContainer.firstChild.nextSibling}if(d=s.length,y(g,s,d),k(g,s,d),g.endOffset<5)return;o=g.endOffset,i=s}else{if(3!==(i=g.endContainer).nodeType&&i.firstChild){for(;3!==i.nodeType&&i.firstChild;)i=i.firstChild;3===i.nodeType&&(y(g,i,0),k(g,i,i.nodeValue.length))}o=1===g.endOffset?2:g.endOffset-1-t}for(var u,h=o;y(g,i,2<=o?o-2:0),k(g,i,1<=o?o-1:0),--o," "!==(f=g.toString())&&""!==f&&160!==f.charCodeAt(0)&&0<=o-2&&f!==n;);(u=g.toString())===n||" "===u||160===u.charCodeAt(0)?(y(g,i,o),k(g,i,h),o+=1):(0===g.startOffset?y(g,i,0):y(g,i,o),k(g,i,h)),"."===(a=g.toString()).charAt(a.length-1)&&k(g,i,h-1);var m=(a=g.toString().trim()).match(l),C=e.getParam("link_default_protocol","http","string");m&&("www."===m[1]?m[1]=C+"://www.":/@$/.test(m[1])&&!/^mailto:/.test(m[1])&&(m[1]="mailto:"+m[1]),r=e.selection.getBookmark(),e.selection.setRng(g),e.execCommand("createlink",!1,m[1]+m[2]),!1!==c&&e.dom.setAttrib(e.selection.getNode(),"target",c),e.selection.moveToBookmark(r),e.nodeChanged())}},t=function(t){var n;t.on("keydown",function(e){13!==e.keyCode||r(t,-1,"")}),o.browser.isIE()?t.on("focus",function(){if(!n){n=!0;try{t.execCommand("AutoUrlDetect",!1,!0)}catch(e){}}}):(t.on("keypress",function(e){41!==e.keyCode||r(t,-1,"(")}),t.on("keyup",function(e){32!==e.keyCode||r(t,0,"")}))};e.add("autolink",function(e){t(e)})}();
|
|
@@ -0,0 +1,171 @@
|
|
|
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 Cell = function (initial) {
|
|
13
|
+
var value = initial;
|
|
14
|
+
var get = function () {
|
|
15
|
+
return value;
|
|
16
|
+
};
|
|
17
|
+
var set = function (v) {
|
|
18
|
+
value = v;
|
|
19
|
+
};
|
|
20
|
+
return {
|
|
21
|
+
get: get,
|
|
22
|
+
set: set
|
|
23
|
+
};
|
|
24
|
+
};
|
|
25
|
+
|
|
26
|
+
var global = tinymce.util.Tools.resolve('tinymce.PluginManager');
|
|
27
|
+
|
|
28
|
+
var global$1 = tinymce.util.Tools.resolve('tinymce.Env');
|
|
29
|
+
|
|
30
|
+
var global$2 = tinymce.util.Tools.resolve('tinymce.util.Delay');
|
|
31
|
+
|
|
32
|
+
var fireResizeEditor = function (editor) {
|
|
33
|
+
return editor.fire('ResizeEditor');
|
|
34
|
+
};
|
|
35
|
+
|
|
36
|
+
var getAutoResizeMinHeight = function (editor) {
|
|
37
|
+
return editor.getParam('min_height', editor.getElement().offsetHeight, 'number');
|
|
38
|
+
};
|
|
39
|
+
var getAutoResizeMaxHeight = function (editor) {
|
|
40
|
+
return editor.getParam('max_height', 0, 'number');
|
|
41
|
+
};
|
|
42
|
+
var getAutoResizeOverflowPadding = function (editor) {
|
|
43
|
+
return editor.getParam('autoresize_overflow_padding', 1, 'number');
|
|
44
|
+
};
|
|
45
|
+
var getAutoResizeBottomMargin = function (editor) {
|
|
46
|
+
return editor.getParam('autoresize_bottom_margin', 50, 'number');
|
|
47
|
+
};
|
|
48
|
+
var shouldAutoResizeOnInit = function (editor) {
|
|
49
|
+
return editor.getParam('autoresize_on_init', true, 'boolean');
|
|
50
|
+
};
|
|
51
|
+
|
|
52
|
+
var isFullscreen = function (editor) {
|
|
53
|
+
return editor.plugins.fullscreen && editor.plugins.fullscreen.isFullscreen();
|
|
54
|
+
};
|
|
55
|
+
var wait = function (editor, oldSize, times, interval, callback) {
|
|
56
|
+
global$2.setEditorTimeout(editor, function () {
|
|
57
|
+
resize(editor, oldSize);
|
|
58
|
+
if (times--) {
|
|
59
|
+
wait(editor, oldSize, times, interval, callback);
|
|
60
|
+
} else if (callback) {
|
|
61
|
+
callback();
|
|
62
|
+
}
|
|
63
|
+
}, interval);
|
|
64
|
+
};
|
|
65
|
+
var toggleScrolling = function (editor, state) {
|
|
66
|
+
var body = editor.getBody();
|
|
67
|
+
if (body) {
|
|
68
|
+
body.style.overflowY = state ? '' : 'hidden';
|
|
69
|
+
if (!state) {
|
|
70
|
+
body.scrollTop = 0;
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
};
|
|
74
|
+
var parseCssValueToInt = function (dom, elm, name, computed) {
|
|
75
|
+
var value = parseInt(dom.getStyle(elm, name, computed), 10);
|
|
76
|
+
return isNaN(value) ? 0 : value;
|
|
77
|
+
};
|
|
78
|
+
var resize = function (editor, oldSize) {
|
|
79
|
+
var dom = editor.dom;
|
|
80
|
+
var doc = editor.getDoc();
|
|
81
|
+
if (!doc) {
|
|
82
|
+
return;
|
|
83
|
+
}
|
|
84
|
+
if (isFullscreen(editor)) {
|
|
85
|
+
toggleScrolling(editor, true);
|
|
86
|
+
return;
|
|
87
|
+
}
|
|
88
|
+
var docEle = doc.documentElement;
|
|
89
|
+
var resizeBottomMargin = getAutoResizeBottomMargin(editor);
|
|
90
|
+
var resizeHeight = getAutoResizeMinHeight(editor);
|
|
91
|
+
var marginTop = parseCssValueToInt(dom, docEle, 'margin-top', true);
|
|
92
|
+
var marginBottom = parseCssValueToInt(dom, docEle, 'margin-bottom', true);
|
|
93
|
+
var contentHeight = docEle.offsetHeight + marginTop + marginBottom + resizeBottomMargin;
|
|
94
|
+
if (contentHeight < 0) {
|
|
95
|
+
contentHeight = 0;
|
|
96
|
+
}
|
|
97
|
+
var containerHeight = editor.getContainer().offsetHeight;
|
|
98
|
+
var contentAreaHeight = editor.getContentAreaContainer().offsetHeight;
|
|
99
|
+
var chromeHeight = containerHeight - contentAreaHeight;
|
|
100
|
+
if (contentHeight + chromeHeight > getAutoResizeMinHeight(editor)) {
|
|
101
|
+
resizeHeight = contentHeight + chromeHeight;
|
|
102
|
+
}
|
|
103
|
+
var maxHeight = getAutoResizeMaxHeight(editor);
|
|
104
|
+
if (maxHeight && resizeHeight > maxHeight) {
|
|
105
|
+
resizeHeight = maxHeight;
|
|
106
|
+
toggleScrolling(editor, true);
|
|
107
|
+
} else {
|
|
108
|
+
toggleScrolling(editor, false);
|
|
109
|
+
}
|
|
110
|
+
if (resizeHeight !== oldSize.get()) {
|
|
111
|
+
var deltaSize = resizeHeight - oldSize.get();
|
|
112
|
+
dom.setStyle(editor.getContainer(), 'height', resizeHeight + 'px');
|
|
113
|
+
oldSize.set(resizeHeight);
|
|
114
|
+
fireResizeEditor(editor);
|
|
115
|
+
if (global$1.browser.isSafari() && global$1.mac) {
|
|
116
|
+
var win = editor.getWin();
|
|
117
|
+
win.scrollTo(win.pageXOffset, win.pageYOffset);
|
|
118
|
+
}
|
|
119
|
+
if (editor.hasFocus()) {
|
|
120
|
+
editor.selection.scrollIntoView(editor.selection.getNode());
|
|
121
|
+
}
|
|
122
|
+
if (global$1.webkit && deltaSize < 0) {
|
|
123
|
+
resize(editor, oldSize);
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
};
|
|
127
|
+
var setup = function (editor, oldSize) {
|
|
128
|
+
editor.on('init', function () {
|
|
129
|
+
var overflowPadding = getAutoResizeOverflowPadding(editor);
|
|
130
|
+
var dom = editor.dom;
|
|
131
|
+
dom.setStyles(editor.getDoc().documentElement, { height: 'auto' });
|
|
132
|
+
dom.setStyles(editor.getBody(), {
|
|
133
|
+
'paddingLeft': overflowPadding,
|
|
134
|
+
'paddingRight': overflowPadding,
|
|
135
|
+
'min-height': 0
|
|
136
|
+
});
|
|
137
|
+
});
|
|
138
|
+
editor.on('NodeChange SetContent keyup FullscreenStateChanged ResizeContent', function () {
|
|
139
|
+
resize(editor, oldSize);
|
|
140
|
+
});
|
|
141
|
+
if (shouldAutoResizeOnInit(editor)) {
|
|
142
|
+
editor.on('init', function () {
|
|
143
|
+
wait(editor, oldSize, 20, 100, function () {
|
|
144
|
+
wait(editor, oldSize, 5, 1000);
|
|
145
|
+
});
|
|
146
|
+
});
|
|
147
|
+
}
|
|
148
|
+
};
|
|
149
|
+
|
|
150
|
+
var register = function (editor, oldSize) {
|
|
151
|
+
editor.addCommand('mceAutoResize', function () {
|
|
152
|
+
resize(editor, oldSize);
|
|
153
|
+
});
|
|
154
|
+
};
|
|
155
|
+
|
|
156
|
+
function Plugin () {
|
|
157
|
+
global.add('autoresize', function (editor) {
|
|
158
|
+
if (!editor.settings.hasOwnProperty('resize')) {
|
|
159
|
+
editor.settings.resize = false;
|
|
160
|
+
}
|
|
161
|
+
if (!editor.inline) {
|
|
162
|
+
var oldSize = Cell(0);
|
|
163
|
+
register(editor, oldSize);
|
|
164
|
+
setup(editor, oldSize);
|
|
165
|
+
}
|
|
166
|
+
});
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
Plugin();
|
|
170
|
+
|
|
171
|
+
}());
|
|
@@ -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"),h=tinymce.util.Tools.resolve("tinymce.Env"),r=tinymce.util.Tools.resolve("tinymce.util.Delay"),y=function(e){return e.getParam("min_height",e.getElement().offsetHeight,"number")},a=function(e,t,n,i,o){r.setEditorTimeout(e,function(){b(e,t),n--?a(e,t,n,i,o):o&&o()},i)},p=function(e,t){var n=e.getBody();n&&(n.style.overflowY=t?"":"hidden",t||(n.scrollTop=0))},v=function(e,t,n,i){var o=parseInt(e.getStyle(t,n,i),10);return isNaN(o)?0:o},b=function(e,t){var n,i,o,r,s,a,g,u,l,c,m,f=e.dom,d=e.getDoc();d&&((n=e).plugins.fullscreen&&n.plugins.fullscreen.isFullscreen()?p(e,!0):(i=d.documentElement,o=e.getParam("autoresize_bottom_margin",50,"number"),r=y(e),s=v(f,i,"margin-top",!0),a=v(f,i,"margin-bottom",!0),(g=i.offsetHeight+s+a+o)<0&&(g=0),g+(u=e.getContainer().offsetHeight-e.getContentAreaContainer().offsetHeight)>y(e)&&(r=g+u),(l=e.getParam("max_height",0,"number"))&&l<r?(r=l,p(e,!0)):p(e,!1),r!==t.get()&&(c=r-t.get(),f.setStyle(e.getContainer(),"height",r+"px"),t.set(r),e.fire("ResizeEditor"),h.browser.isSafari()&&h.mac&&(m=e.getWin()).scrollTo(m.pageXOffset,m.pageYOffset),e.hasFocus()&&e.selection.scrollIntoView(e.selection.getNode()),h.webkit&&c<0&&b(e,t))))};e.add("autoresize",function(e){var t,n,i,o,r,s;e.settings.hasOwnProperty("resize")||(e.settings.resize=!1),e.inline||(s=0,r=t={get:function(){return s},set:function(e){s=e}},(o=e).addCommand("mceAutoResize",function(){b(o,r)}),i=t,(n=e).on("init",function(){var e=n.getParam("autoresize_overflow_padding",1,"number"),t=n.dom;t.setStyles(n.getDoc().documentElement,{height:"auto"}),t.setStyles(n.getBody(),{paddingLeft:e,paddingRight:e,"min-height":0})}),n.on("NodeChange SetContent keyup FullscreenStateChanged ResizeContent",function(){b(n,i)}),n.getParam("autoresize_on_init",!0,"boolean")&&n.on("init",function(){a(n,i,20,100,function(){a(n,i,5,1e3)})}))})}();
|
|
@@ -0,0 +1,212 @@
|
|
|
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 eq = function (t) {
|
|
15
|
+
return function (a) {
|
|
16
|
+
return t === a;
|
|
17
|
+
};
|
|
18
|
+
};
|
|
19
|
+
var isUndefined = eq(undefined);
|
|
20
|
+
|
|
21
|
+
var global$1 = tinymce.util.Tools.resolve('tinymce.util.Delay');
|
|
22
|
+
|
|
23
|
+
var global$2 = tinymce.util.Tools.resolve('tinymce.util.LocalStorage');
|
|
24
|
+
|
|
25
|
+
var global$3 = tinymce.util.Tools.resolve('tinymce.util.Tools');
|
|
26
|
+
|
|
27
|
+
var fireRestoreDraft = function (editor) {
|
|
28
|
+
return editor.fire('RestoreDraft');
|
|
29
|
+
};
|
|
30
|
+
var fireStoreDraft = function (editor) {
|
|
31
|
+
return editor.fire('StoreDraft');
|
|
32
|
+
};
|
|
33
|
+
var fireRemoveDraft = function (editor) {
|
|
34
|
+
return editor.fire('RemoveDraft');
|
|
35
|
+
};
|
|
36
|
+
|
|
37
|
+
var parse = function (timeString, defaultTime) {
|
|
38
|
+
var multiples = {
|
|
39
|
+
s: 1000,
|
|
40
|
+
m: 60000
|
|
41
|
+
};
|
|
42
|
+
var toParse = timeString || defaultTime;
|
|
43
|
+
var parsedTime = /^(\d+)([ms]?)$/.exec('' + toParse);
|
|
44
|
+
return (parsedTime[2] ? multiples[parsedTime[2]] : 1) * parseInt(toParse, 10);
|
|
45
|
+
};
|
|
46
|
+
|
|
47
|
+
var shouldAskBeforeUnload = function (editor) {
|
|
48
|
+
return editor.getParam('autosave_ask_before_unload', true);
|
|
49
|
+
};
|
|
50
|
+
var getAutoSavePrefix = function (editor) {
|
|
51
|
+
var location = document.location;
|
|
52
|
+
return editor.getParam('autosave_prefix', 'tinymce-autosave-{path}{query}{hash}-{id}-').replace(/{path}/g, location.pathname).replace(/{query}/g, location.search).replace(/{hash}/g, location.hash).replace(/{id}/g, editor.id);
|
|
53
|
+
};
|
|
54
|
+
var shouldRestoreWhenEmpty = function (editor) {
|
|
55
|
+
return editor.getParam('autosave_restore_when_empty', false);
|
|
56
|
+
};
|
|
57
|
+
var getAutoSaveInterval = function (editor) {
|
|
58
|
+
return parse(editor.getParam('autosave_interval'), '30s');
|
|
59
|
+
};
|
|
60
|
+
var getAutoSaveRetention = function (editor) {
|
|
61
|
+
return parse(editor.getParam('autosave_retention'), '20m');
|
|
62
|
+
};
|
|
63
|
+
|
|
64
|
+
var isEmpty = function (editor, html) {
|
|
65
|
+
if (isUndefined(html)) {
|
|
66
|
+
return editor.dom.isEmpty(editor.getBody());
|
|
67
|
+
} else {
|
|
68
|
+
var trimmedHtml = global$3.trim(html);
|
|
69
|
+
if (trimmedHtml === '') {
|
|
70
|
+
return true;
|
|
71
|
+
} else {
|
|
72
|
+
var fragment = new DOMParser().parseFromString(trimmedHtml, 'text/html');
|
|
73
|
+
return editor.dom.isEmpty(fragment);
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
};
|
|
77
|
+
var hasDraft = function (editor) {
|
|
78
|
+
var time = parseInt(global$2.getItem(getAutoSavePrefix(editor) + 'time'), 10) || 0;
|
|
79
|
+
if (new Date().getTime() - time > getAutoSaveRetention(editor)) {
|
|
80
|
+
removeDraft(editor, false);
|
|
81
|
+
return false;
|
|
82
|
+
}
|
|
83
|
+
return true;
|
|
84
|
+
};
|
|
85
|
+
var removeDraft = function (editor, fire) {
|
|
86
|
+
var prefix = getAutoSavePrefix(editor);
|
|
87
|
+
global$2.removeItem(prefix + 'draft');
|
|
88
|
+
global$2.removeItem(prefix + 'time');
|
|
89
|
+
if (fire !== false) {
|
|
90
|
+
fireRemoveDraft(editor);
|
|
91
|
+
}
|
|
92
|
+
};
|
|
93
|
+
var storeDraft = function (editor) {
|
|
94
|
+
var prefix = getAutoSavePrefix(editor);
|
|
95
|
+
if (!isEmpty(editor) && editor.isDirty()) {
|
|
96
|
+
global$2.setItem(prefix + 'draft', editor.getContent({
|
|
97
|
+
format: 'raw',
|
|
98
|
+
no_events: true
|
|
99
|
+
}));
|
|
100
|
+
global$2.setItem(prefix + 'time', new Date().getTime().toString());
|
|
101
|
+
fireStoreDraft(editor);
|
|
102
|
+
}
|
|
103
|
+
};
|
|
104
|
+
var restoreDraft = function (editor) {
|
|
105
|
+
var prefix = getAutoSavePrefix(editor);
|
|
106
|
+
if (hasDraft(editor)) {
|
|
107
|
+
editor.setContent(global$2.getItem(prefix + 'draft'), { format: 'raw' });
|
|
108
|
+
fireRestoreDraft(editor);
|
|
109
|
+
}
|
|
110
|
+
};
|
|
111
|
+
var startStoreDraft = function (editor) {
|
|
112
|
+
var interval = getAutoSaveInterval(editor);
|
|
113
|
+
global$1.setEditorInterval(editor, function () {
|
|
114
|
+
storeDraft(editor);
|
|
115
|
+
}, interval);
|
|
116
|
+
};
|
|
117
|
+
var restoreLastDraft = function (editor) {
|
|
118
|
+
editor.undoManager.transact(function () {
|
|
119
|
+
restoreDraft(editor);
|
|
120
|
+
removeDraft(editor);
|
|
121
|
+
});
|
|
122
|
+
editor.focus();
|
|
123
|
+
};
|
|
124
|
+
|
|
125
|
+
var get = function (editor) {
|
|
126
|
+
return {
|
|
127
|
+
hasDraft: function () {
|
|
128
|
+
return hasDraft(editor);
|
|
129
|
+
},
|
|
130
|
+
storeDraft: function () {
|
|
131
|
+
return storeDraft(editor);
|
|
132
|
+
},
|
|
133
|
+
restoreDraft: function () {
|
|
134
|
+
return restoreDraft(editor);
|
|
135
|
+
},
|
|
136
|
+
removeDraft: function (fire) {
|
|
137
|
+
return removeDraft(editor, fire);
|
|
138
|
+
},
|
|
139
|
+
isEmpty: function (html) {
|
|
140
|
+
return isEmpty(editor, html);
|
|
141
|
+
}
|
|
142
|
+
};
|
|
143
|
+
};
|
|
144
|
+
|
|
145
|
+
var global$4 = tinymce.util.Tools.resolve('tinymce.EditorManager');
|
|
146
|
+
|
|
147
|
+
var setup = function (editor) {
|
|
148
|
+
editor.editorManager.on('BeforeUnload', function (e) {
|
|
149
|
+
var msg;
|
|
150
|
+
global$3.each(global$4.get(), function (editor) {
|
|
151
|
+
if (editor.plugins.autosave) {
|
|
152
|
+
editor.plugins.autosave.storeDraft();
|
|
153
|
+
}
|
|
154
|
+
if (!msg && editor.isDirty() && shouldAskBeforeUnload(editor)) {
|
|
155
|
+
msg = editor.translate('You have unsaved changes are you sure you want to navigate away?');
|
|
156
|
+
}
|
|
157
|
+
});
|
|
158
|
+
if (msg) {
|
|
159
|
+
e.preventDefault();
|
|
160
|
+
e.returnValue = msg;
|
|
161
|
+
}
|
|
162
|
+
});
|
|
163
|
+
};
|
|
164
|
+
|
|
165
|
+
var makeSetupHandler = function (editor) {
|
|
166
|
+
return function (api) {
|
|
167
|
+
api.setDisabled(!hasDraft(editor));
|
|
168
|
+
var editorEventCallback = function () {
|
|
169
|
+
return api.setDisabled(!hasDraft(editor));
|
|
170
|
+
};
|
|
171
|
+
editor.on('StoreDraft RestoreDraft RemoveDraft', editorEventCallback);
|
|
172
|
+
return function () {
|
|
173
|
+
return editor.off('StoreDraft RestoreDraft RemoveDraft', editorEventCallback);
|
|
174
|
+
};
|
|
175
|
+
};
|
|
176
|
+
};
|
|
177
|
+
var register = function (editor) {
|
|
178
|
+
startStoreDraft(editor);
|
|
179
|
+
editor.ui.registry.addButton('restoredraft', {
|
|
180
|
+
tooltip: 'Restore last draft',
|
|
181
|
+
icon: 'restore-draft',
|
|
182
|
+
onAction: function () {
|
|
183
|
+
restoreLastDraft(editor);
|
|
184
|
+
},
|
|
185
|
+
onSetup: makeSetupHandler(editor)
|
|
186
|
+
});
|
|
187
|
+
editor.ui.registry.addMenuItem('restoredraft', {
|
|
188
|
+
text: 'Restore last draft',
|
|
189
|
+
icon: 'restore-draft',
|
|
190
|
+
onAction: function () {
|
|
191
|
+
restoreLastDraft(editor);
|
|
192
|
+
},
|
|
193
|
+
onSetup: makeSetupHandler(editor)
|
|
194
|
+
});
|
|
195
|
+
};
|
|
196
|
+
|
|
197
|
+
function Plugin () {
|
|
198
|
+
global.add('autosave', function (editor) {
|
|
199
|
+
setup(editor);
|
|
200
|
+
register(editor);
|
|
201
|
+
editor.on('init', function () {
|
|
202
|
+
if (shouldRestoreWhenEmpty(editor) && editor.dom.isEmpty(editor.getBody())) {
|
|
203
|
+
restoreDraft(editor);
|
|
204
|
+
}
|
|
205
|
+
});
|
|
206
|
+
return get(editor);
|
|
207
|
+
});
|
|
208
|
+
}
|
|
209
|
+
|
|
210
|
+
Plugin();
|
|
211
|
+
|
|
212
|
+
}());
|
|
@@ -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,t=tinymce.util.Tools.resolve("tinymce.PluginManager"),a=(e=undefined,function(t){return e===t}),r=tinymce.util.Tools.resolve("tinymce.util.Delay"),n=tinymce.util.Tools.resolve("tinymce.util.LocalStorage"),o=tinymce.util.Tools.resolve("tinymce.util.Tools"),i=function(t,e){var r=t||e,n=/^(\d+)([ms]?)$/.exec(""+r);return(n[2]?{s:1e3,m:6e4}[n[2]]:1)*parseInt(r,10)},u=function(t){var e=document.location;return t.getParam("autosave_prefix","tinymce-autosave-{path}{query}{hash}-{id}-").replace(/{path}/g,e.pathname).replace(/{query}/g,e.search).replace(/{hash}/g,e.hash).replace(/{id}/g,t.id)},s=function(t,e){if(a(e))return t.dom.isEmpty(t.getBody());var r=o.trim(e);if(""===r)return!0;var n=(new DOMParser).parseFromString(r,"text/html");return t.dom.isEmpty(n)},f=function(t){var e=parseInt(n.getItem(u(t)+"time"),10)||0;return!((new Date).getTime()-e>i(t.getParam("autosave_retention"),"20m"))||(c(t,!1),!1)},c=function(t,e){var r=u(t);n.removeItem(r+"draft"),n.removeItem(r+"time"),!1!==e&&t.fire("RemoveDraft")},m=function(t){var e=u(t);!s(t)&&t.isDirty()&&(n.setItem(e+"draft",t.getContent({format:"raw",no_events:!0})),n.setItem(e+"time",(new Date).getTime().toString()),t.fire("StoreDraft"))},l=function(t){var e=u(t);f(t)&&(t.setContent(n.getItem(e+"draft"),{format:"raw"}),t.fire("RestoreDraft"))},v=function(t){var e=i(t.getParam("autosave_interval"),"30s");r.setEditorInterval(t,function(){m(t)},e)},d=function(t){t.undoManager.transact(function(){l(t),c(t)}),t.focus()},g=tinymce.util.Tools.resolve("tinymce.EditorManager"),y=function(r){return function(t){t.setDisabled(!f(r));var e=function(){return t.setDisabled(!f(r))};return r.on("StoreDraft RestoreDraft RemoveDraft",e),function(){return r.off("StoreDraft RestoreDraft RemoveDraft",e)}}};t.add("autosave",function(t){var e,r;return t.editorManager.on("BeforeUnload",function(t){var e;o.each(g.get(),function(t){t.plugins.autosave&&t.plugins.autosave.storeDraft(),!e&&t.isDirty()&&t.getParam("autosave_ask_before_unload",!0)&&(e=t.translate("You have unsaved changes are you sure you want to navigate away?"))}),e&&(t.preventDefault(),t.returnValue=e)}),v(e=t),e.ui.registry.addButton("restoredraft",{tooltip:"Restore last draft",icon:"restore-draft",onAction:function(){d(e)},onSetup:y(e)}),e.ui.registry.addMenuItem("restoredraft",{text:"Restore last draft",icon:"restore-draft",onAction:function(){d(e)},onSetup:y(e)}),t.on("init",function(){t.getParam("autosave_restore_when_empty",!1)&&t.dom.isEmpty(t.getBody())&&l(t)}),r=t,{hasDraft:function(){return f(r)},storeDraft:function(){return m(r)},restoreDraft:function(){return l(r)},removeDraft:function(t){return c(r,t)},isEmpty:function(t){return s(r,t)}}})}();
|