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,577 @@
|
|
|
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 noop = function () {
|
|
15
|
+
};
|
|
16
|
+
var constant = function (value) {
|
|
17
|
+
return function () {
|
|
18
|
+
return value;
|
|
19
|
+
};
|
|
20
|
+
};
|
|
21
|
+
function curry(fn) {
|
|
22
|
+
var initialArgs = [];
|
|
23
|
+
for (var _i = 1; _i < arguments.length; _i++) {
|
|
24
|
+
initialArgs[_i - 1] = arguments[_i];
|
|
25
|
+
}
|
|
26
|
+
return function () {
|
|
27
|
+
var restArgs = [];
|
|
28
|
+
for (var _i = 0; _i < arguments.length; _i++) {
|
|
29
|
+
restArgs[_i] = arguments[_i];
|
|
30
|
+
}
|
|
31
|
+
var all = initialArgs.concat(restArgs);
|
|
32
|
+
return fn.apply(null, all);
|
|
33
|
+
};
|
|
34
|
+
}
|
|
35
|
+
var never = constant(false);
|
|
36
|
+
var always = constant(true);
|
|
37
|
+
|
|
38
|
+
var global$1 = tinymce.util.Tools.resolve('tinymce.util.Tools');
|
|
39
|
+
|
|
40
|
+
var global$2 = tinymce.util.Tools.resolve('tinymce.util.XHR');
|
|
41
|
+
|
|
42
|
+
var getCreationDateClasses = function (editor) {
|
|
43
|
+
return editor.getParam('template_cdate_classes', 'cdate');
|
|
44
|
+
};
|
|
45
|
+
var getModificationDateClasses = function (editor) {
|
|
46
|
+
return editor.getParam('template_mdate_classes', 'mdate');
|
|
47
|
+
};
|
|
48
|
+
var getSelectedContentClasses = function (editor) {
|
|
49
|
+
return editor.getParam('template_selected_content_classes', 'selcontent');
|
|
50
|
+
};
|
|
51
|
+
var getPreviewReplaceValues = function (editor) {
|
|
52
|
+
return editor.getParam('template_preview_replace_values');
|
|
53
|
+
};
|
|
54
|
+
var getContentStyle = function (editor) {
|
|
55
|
+
return editor.getParam('content_style', '', 'string');
|
|
56
|
+
};
|
|
57
|
+
var shouldUseContentCssCors = function (editor) {
|
|
58
|
+
return editor.getParam('content_css_cors', false, 'boolean');
|
|
59
|
+
};
|
|
60
|
+
var getTemplateReplaceValues = function (editor) {
|
|
61
|
+
return editor.getParam('template_replace_values');
|
|
62
|
+
};
|
|
63
|
+
var getTemplates = function (editor) {
|
|
64
|
+
return editor.getParam('templates');
|
|
65
|
+
};
|
|
66
|
+
var getCdateFormat = function (editor) {
|
|
67
|
+
return editor.getParam('template_cdate_format', editor.translate('%Y-%m-%d'));
|
|
68
|
+
};
|
|
69
|
+
var getMdateFormat = function (editor) {
|
|
70
|
+
return editor.getParam('template_mdate_format', editor.translate('%Y-%m-%d'));
|
|
71
|
+
};
|
|
72
|
+
var getBodyClassFromHash = function (editor) {
|
|
73
|
+
var bodyClass = editor.getParam('body_class', '', 'hash');
|
|
74
|
+
return bodyClass[editor.id] || '';
|
|
75
|
+
};
|
|
76
|
+
var getBodyClass = function (editor) {
|
|
77
|
+
var bodyClass = editor.getParam('body_class', '', 'string');
|
|
78
|
+
if (bodyClass.indexOf('=') === -1) {
|
|
79
|
+
return bodyClass;
|
|
80
|
+
} else {
|
|
81
|
+
return getBodyClassFromHash(editor);
|
|
82
|
+
}
|
|
83
|
+
};
|
|
84
|
+
|
|
85
|
+
var addZeros = function (value, len) {
|
|
86
|
+
value = '' + value;
|
|
87
|
+
if (value.length < len) {
|
|
88
|
+
for (var i = 0; i < len - value.length; i++) {
|
|
89
|
+
value = '0' + value;
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
return value;
|
|
93
|
+
};
|
|
94
|
+
var getDateTime = function (editor, fmt, date) {
|
|
95
|
+
var daysShort = 'Sun Mon Tue Wed Thu Fri Sat Sun'.split(' ');
|
|
96
|
+
var daysLong = 'Sunday Monday Tuesday Wednesday Thursday Friday Saturday Sunday'.split(' ');
|
|
97
|
+
var monthsShort = 'Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec'.split(' ');
|
|
98
|
+
var monthsLong = 'January February March April May June July August September October November December'.split(' ');
|
|
99
|
+
date = date || new Date();
|
|
100
|
+
fmt = fmt.replace('%D', '%m/%d/%Y');
|
|
101
|
+
fmt = fmt.replace('%r', '%I:%M:%S %p');
|
|
102
|
+
fmt = fmt.replace('%Y', '' + date.getFullYear());
|
|
103
|
+
fmt = fmt.replace('%y', '' + date.getYear());
|
|
104
|
+
fmt = fmt.replace('%m', addZeros(date.getMonth() + 1, 2));
|
|
105
|
+
fmt = fmt.replace('%d', addZeros(date.getDate(), 2));
|
|
106
|
+
fmt = fmt.replace('%H', '' + addZeros(date.getHours(), 2));
|
|
107
|
+
fmt = fmt.replace('%M', '' + addZeros(date.getMinutes(), 2));
|
|
108
|
+
fmt = fmt.replace('%S', '' + addZeros(date.getSeconds(), 2));
|
|
109
|
+
fmt = fmt.replace('%I', '' + ((date.getHours() + 11) % 12 + 1));
|
|
110
|
+
fmt = fmt.replace('%p', '' + (date.getHours() < 12 ? 'AM' : 'PM'));
|
|
111
|
+
fmt = fmt.replace('%B', '' + editor.translate(monthsLong[date.getMonth()]));
|
|
112
|
+
fmt = fmt.replace('%b', '' + editor.translate(monthsShort[date.getMonth()]));
|
|
113
|
+
fmt = fmt.replace('%A', '' + editor.translate(daysLong[date.getDay()]));
|
|
114
|
+
fmt = fmt.replace('%a', '' + editor.translate(daysShort[date.getDay()]));
|
|
115
|
+
fmt = fmt.replace('%%', '%');
|
|
116
|
+
return fmt;
|
|
117
|
+
};
|
|
118
|
+
|
|
119
|
+
var createTemplateList = function (editor, callback) {
|
|
120
|
+
return function () {
|
|
121
|
+
var templateList = getTemplates(editor);
|
|
122
|
+
if (typeof templateList === 'function') {
|
|
123
|
+
templateList(callback);
|
|
124
|
+
return;
|
|
125
|
+
}
|
|
126
|
+
if (typeof templateList === 'string') {
|
|
127
|
+
global$2.send({
|
|
128
|
+
url: templateList,
|
|
129
|
+
success: function (text) {
|
|
130
|
+
callback(JSON.parse(text));
|
|
131
|
+
}
|
|
132
|
+
});
|
|
133
|
+
} else {
|
|
134
|
+
callback(templateList);
|
|
135
|
+
}
|
|
136
|
+
};
|
|
137
|
+
};
|
|
138
|
+
var replaceTemplateValues = function (html, templateValues) {
|
|
139
|
+
global$1.each(templateValues, function (v, k) {
|
|
140
|
+
if (typeof v === 'function') {
|
|
141
|
+
v = v(k);
|
|
142
|
+
}
|
|
143
|
+
html = html.replace(new RegExp('\\{\\$' + k + '\\}', 'g'), v);
|
|
144
|
+
});
|
|
145
|
+
return html;
|
|
146
|
+
};
|
|
147
|
+
var replaceVals = function (editor, e) {
|
|
148
|
+
var dom = editor.dom, vl = getTemplateReplaceValues(editor);
|
|
149
|
+
global$1.each(dom.select('*', e), function (e) {
|
|
150
|
+
global$1.each(vl, function (v, k) {
|
|
151
|
+
if (dom.hasClass(e, k)) {
|
|
152
|
+
if (typeof vl[k] === 'function') {
|
|
153
|
+
vl[k](e);
|
|
154
|
+
}
|
|
155
|
+
}
|
|
156
|
+
});
|
|
157
|
+
});
|
|
158
|
+
};
|
|
159
|
+
var hasClass = function (n, c) {
|
|
160
|
+
return new RegExp('\\b' + c + '\\b', 'g').test(n.className);
|
|
161
|
+
};
|
|
162
|
+
var insertTemplate = function (editor, _ui, html) {
|
|
163
|
+
var el;
|
|
164
|
+
var dom = editor.dom;
|
|
165
|
+
var sel = editor.selection.getContent();
|
|
166
|
+
html = replaceTemplateValues(html, getTemplateReplaceValues(editor));
|
|
167
|
+
el = dom.create('div', null, html);
|
|
168
|
+
var n = dom.select('.mceTmpl', el);
|
|
169
|
+
if (n && n.length > 0) {
|
|
170
|
+
el = dom.create('div', null);
|
|
171
|
+
el.appendChild(n[0].cloneNode(true));
|
|
172
|
+
}
|
|
173
|
+
global$1.each(dom.select('*', el), function (n) {
|
|
174
|
+
if (hasClass(n, getCreationDateClasses(editor).replace(/\s+/g, '|'))) {
|
|
175
|
+
n.innerHTML = getDateTime(editor, getCdateFormat(editor));
|
|
176
|
+
}
|
|
177
|
+
if (hasClass(n, getModificationDateClasses(editor).replace(/\s+/g, '|'))) {
|
|
178
|
+
n.innerHTML = getDateTime(editor, getMdateFormat(editor));
|
|
179
|
+
}
|
|
180
|
+
if (hasClass(n, getSelectedContentClasses(editor).replace(/\s+/g, '|'))) {
|
|
181
|
+
n.innerHTML = sel;
|
|
182
|
+
}
|
|
183
|
+
});
|
|
184
|
+
replaceVals(editor, el);
|
|
185
|
+
editor.execCommand('mceInsertContent', false, el.innerHTML);
|
|
186
|
+
editor.addVisual();
|
|
187
|
+
};
|
|
188
|
+
|
|
189
|
+
var register = function (editor) {
|
|
190
|
+
editor.addCommand('mceInsertTemplate', curry(insertTemplate, editor));
|
|
191
|
+
};
|
|
192
|
+
|
|
193
|
+
var setup = function (editor) {
|
|
194
|
+
editor.on('PreProcess', function (o) {
|
|
195
|
+
var dom = editor.dom, dateFormat = getMdateFormat(editor);
|
|
196
|
+
global$1.each(dom.select('div', o.node), function (e) {
|
|
197
|
+
if (dom.hasClass(e, 'mceTmpl')) {
|
|
198
|
+
global$1.each(dom.select('*', e), function (e) {
|
|
199
|
+
if (dom.hasClass(e, getModificationDateClasses(editor).replace(/\s+/g, '|'))) {
|
|
200
|
+
e.innerHTML = getDateTime(editor, dateFormat);
|
|
201
|
+
}
|
|
202
|
+
});
|
|
203
|
+
replaceVals(editor, e);
|
|
204
|
+
}
|
|
205
|
+
});
|
|
206
|
+
});
|
|
207
|
+
};
|
|
208
|
+
|
|
209
|
+
var none = function () {
|
|
210
|
+
return NONE;
|
|
211
|
+
};
|
|
212
|
+
var NONE = function () {
|
|
213
|
+
var eq = function (o) {
|
|
214
|
+
return o.isNone();
|
|
215
|
+
};
|
|
216
|
+
var call = function (thunk) {
|
|
217
|
+
return thunk();
|
|
218
|
+
};
|
|
219
|
+
var id = function (n) {
|
|
220
|
+
return n;
|
|
221
|
+
};
|
|
222
|
+
var me = {
|
|
223
|
+
fold: function (n, _s) {
|
|
224
|
+
return n();
|
|
225
|
+
},
|
|
226
|
+
is: never,
|
|
227
|
+
isSome: never,
|
|
228
|
+
isNone: always,
|
|
229
|
+
getOr: id,
|
|
230
|
+
getOrThunk: call,
|
|
231
|
+
getOrDie: function (msg) {
|
|
232
|
+
throw new Error(msg || 'error: getOrDie called on none.');
|
|
233
|
+
},
|
|
234
|
+
getOrNull: constant(null),
|
|
235
|
+
getOrUndefined: constant(undefined),
|
|
236
|
+
or: id,
|
|
237
|
+
orThunk: call,
|
|
238
|
+
map: none,
|
|
239
|
+
each: noop,
|
|
240
|
+
bind: none,
|
|
241
|
+
exists: never,
|
|
242
|
+
forall: always,
|
|
243
|
+
filter: none,
|
|
244
|
+
equals: eq,
|
|
245
|
+
equals_: eq,
|
|
246
|
+
toArray: function () {
|
|
247
|
+
return [];
|
|
248
|
+
},
|
|
249
|
+
toString: constant('none()')
|
|
250
|
+
};
|
|
251
|
+
return me;
|
|
252
|
+
}();
|
|
253
|
+
var some = function (a) {
|
|
254
|
+
var constant_a = constant(a);
|
|
255
|
+
var self = function () {
|
|
256
|
+
return me;
|
|
257
|
+
};
|
|
258
|
+
var bind = function (f) {
|
|
259
|
+
return f(a);
|
|
260
|
+
};
|
|
261
|
+
var me = {
|
|
262
|
+
fold: function (n, s) {
|
|
263
|
+
return s(a);
|
|
264
|
+
},
|
|
265
|
+
is: function (v) {
|
|
266
|
+
return a === v;
|
|
267
|
+
},
|
|
268
|
+
isSome: always,
|
|
269
|
+
isNone: never,
|
|
270
|
+
getOr: constant_a,
|
|
271
|
+
getOrThunk: constant_a,
|
|
272
|
+
getOrDie: constant_a,
|
|
273
|
+
getOrNull: constant_a,
|
|
274
|
+
getOrUndefined: constant_a,
|
|
275
|
+
or: self,
|
|
276
|
+
orThunk: self,
|
|
277
|
+
map: function (f) {
|
|
278
|
+
return some(f(a));
|
|
279
|
+
},
|
|
280
|
+
each: function (f) {
|
|
281
|
+
f(a);
|
|
282
|
+
},
|
|
283
|
+
bind: bind,
|
|
284
|
+
exists: bind,
|
|
285
|
+
forall: bind,
|
|
286
|
+
filter: function (f) {
|
|
287
|
+
return f(a) ? me : NONE;
|
|
288
|
+
},
|
|
289
|
+
toArray: function () {
|
|
290
|
+
return [a];
|
|
291
|
+
},
|
|
292
|
+
toString: function () {
|
|
293
|
+
return 'some(' + a + ')';
|
|
294
|
+
},
|
|
295
|
+
equals: function (o) {
|
|
296
|
+
return o.is(a);
|
|
297
|
+
},
|
|
298
|
+
equals_: function (o, elementEq) {
|
|
299
|
+
return o.fold(never, function (b) {
|
|
300
|
+
return elementEq(a, b);
|
|
301
|
+
});
|
|
302
|
+
}
|
|
303
|
+
};
|
|
304
|
+
return me;
|
|
305
|
+
};
|
|
306
|
+
var from = function (value) {
|
|
307
|
+
return value === null || value === undefined ? NONE : some(value);
|
|
308
|
+
};
|
|
309
|
+
var Optional = {
|
|
310
|
+
some: some,
|
|
311
|
+
none: none,
|
|
312
|
+
from: from
|
|
313
|
+
};
|
|
314
|
+
|
|
315
|
+
var map = function (xs, f) {
|
|
316
|
+
var len = xs.length;
|
|
317
|
+
var r = new Array(len);
|
|
318
|
+
for (var i = 0; i < len; i++) {
|
|
319
|
+
var x = xs[i];
|
|
320
|
+
r[i] = f(x, i);
|
|
321
|
+
}
|
|
322
|
+
return r;
|
|
323
|
+
};
|
|
324
|
+
var findUntil = function (xs, pred, until) {
|
|
325
|
+
for (var i = 0, len = xs.length; i < len; i++) {
|
|
326
|
+
var x = xs[i];
|
|
327
|
+
if (pred(x, i)) {
|
|
328
|
+
return Optional.some(x);
|
|
329
|
+
} else if (until(x, i)) {
|
|
330
|
+
break;
|
|
331
|
+
}
|
|
332
|
+
}
|
|
333
|
+
return Optional.none();
|
|
334
|
+
};
|
|
335
|
+
var find = function (xs, pred) {
|
|
336
|
+
return findUntil(xs, pred, never);
|
|
337
|
+
};
|
|
338
|
+
|
|
339
|
+
var global$3 = tinymce.util.Tools.resolve('tinymce.Env');
|
|
340
|
+
|
|
341
|
+
var global$4 = tinymce.util.Tools.resolve('tinymce.util.Promise');
|
|
342
|
+
|
|
343
|
+
var hasOwnProperty = Object.hasOwnProperty;
|
|
344
|
+
var get = function (obj, key) {
|
|
345
|
+
return has(obj, key) ? Optional.from(obj[key]) : Optional.none();
|
|
346
|
+
};
|
|
347
|
+
var has = function (obj, key) {
|
|
348
|
+
return hasOwnProperty.call(obj, key);
|
|
349
|
+
};
|
|
350
|
+
|
|
351
|
+
var entitiesAttr = {
|
|
352
|
+
'"': '"',
|
|
353
|
+
'<': '<',
|
|
354
|
+
'>': '>',
|
|
355
|
+
'&': '&',
|
|
356
|
+
'\'': '''
|
|
357
|
+
};
|
|
358
|
+
var htmlEscape = function (html) {
|
|
359
|
+
return html.replace(/["'<>&]/g, function (match) {
|
|
360
|
+
return get(entitiesAttr, match).getOr(match);
|
|
361
|
+
});
|
|
362
|
+
};
|
|
363
|
+
|
|
364
|
+
var getPreviewContent = function (editor, html) {
|
|
365
|
+
if (html.indexOf('<html>') === -1) {
|
|
366
|
+
var contentCssEntries_1 = '';
|
|
367
|
+
var contentStyle = getContentStyle(editor);
|
|
368
|
+
var cors_1 = shouldUseContentCssCors(editor) ? ' crossorigin="anonymous"' : '';
|
|
369
|
+
global$1.each(editor.contentCSS, function (url) {
|
|
370
|
+
contentCssEntries_1 += '<link type="text/css" rel="stylesheet" href="' + editor.documentBaseURI.toAbsolute(url) + '"' + cors_1 + '>';
|
|
371
|
+
});
|
|
372
|
+
if (contentStyle) {
|
|
373
|
+
contentCssEntries_1 += '<style type="text/css">' + contentStyle + '</style>';
|
|
374
|
+
}
|
|
375
|
+
var bodyClass = getBodyClass(editor);
|
|
376
|
+
var encode = editor.dom.encode;
|
|
377
|
+
var isMetaKeyPressed = global$3.mac ? 'e.metaKey' : 'e.ctrlKey && !e.altKey';
|
|
378
|
+
var preventClicksOnLinksScript = '<script>' + 'document.addEventListener && document.addEventListener("click", function(e) {' + 'for (var elm = e.target; elm; elm = elm.parentNode) {' + 'if (elm.nodeName === "A" && !(' + isMetaKeyPressed + ')) {' + 'e.preventDefault();' + '}' + '}' + '}, false);' + '</script> ';
|
|
379
|
+
var directionality = editor.getBody().dir;
|
|
380
|
+
var dirAttr = directionality ? ' dir="' + encode(directionality) + '"' : '';
|
|
381
|
+
html = '<!DOCTYPE html>' + '<html>' + '<head>' + '<base href="' + encode(editor.documentBaseURI.getURI()) + '">' + contentCssEntries_1 + preventClicksOnLinksScript + '</head>' + '<body class="' + encode(bodyClass) + '"' + dirAttr + '>' + html + '</body>' + '</html>';
|
|
382
|
+
}
|
|
383
|
+
return replaceTemplateValues(html, getPreviewReplaceValues(editor));
|
|
384
|
+
};
|
|
385
|
+
var open = function (editor, templateList) {
|
|
386
|
+
var createTemplates = function () {
|
|
387
|
+
if (!templateList || templateList.length === 0) {
|
|
388
|
+
var message = editor.translate('No templates defined.');
|
|
389
|
+
editor.notificationManager.open({
|
|
390
|
+
text: message,
|
|
391
|
+
type: 'info'
|
|
392
|
+
});
|
|
393
|
+
return Optional.none();
|
|
394
|
+
}
|
|
395
|
+
return Optional.from(global$1.map(templateList, function (template, index) {
|
|
396
|
+
var isUrlTemplate = function (t) {
|
|
397
|
+
return t.url !== undefined;
|
|
398
|
+
};
|
|
399
|
+
return {
|
|
400
|
+
selected: index === 0,
|
|
401
|
+
text: template.title,
|
|
402
|
+
value: {
|
|
403
|
+
url: isUrlTemplate(template) ? Optional.from(template.url) : Optional.none(),
|
|
404
|
+
content: !isUrlTemplate(template) ? Optional.from(template.content) : Optional.none(),
|
|
405
|
+
description: template.description
|
|
406
|
+
}
|
|
407
|
+
};
|
|
408
|
+
}));
|
|
409
|
+
};
|
|
410
|
+
var createSelectBoxItems = function (templates) {
|
|
411
|
+
return map(templates, function (t) {
|
|
412
|
+
return {
|
|
413
|
+
text: t.text,
|
|
414
|
+
value: t.text
|
|
415
|
+
};
|
|
416
|
+
});
|
|
417
|
+
};
|
|
418
|
+
var findTemplate = function (templates, templateTitle) {
|
|
419
|
+
return find(templates, function (t) {
|
|
420
|
+
return t.text === templateTitle;
|
|
421
|
+
});
|
|
422
|
+
};
|
|
423
|
+
var loadFailedAlert = function (api) {
|
|
424
|
+
editor.windowManager.alert('Could not load the specified template.', function () {
|
|
425
|
+
return api.focus('template');
|
|
426
|
+
});
|
|
427
|
+
};
|
|
428
|
+
var getTemplateContent = function (t) {
|
|
429
|
+
return new global$4(function (resolve, reject) {
|
|
430
|
+
t.value.url.fold(function () {
|
|
431
|
+
return resolve(t.value.content.getOr(''));
|
|
432
|
+
}, function (url) {
|
|
433
|
+
return global$2.send({
|
|
434
|
+
url: url,
|
|
435
|
+
success: function (html) {
|
|
436
|
+
resolve(html);
|
|
437
|
+
},
|
|
438
|
+
error: function (e) {
|
|
439
|
+
reject(e);
|
|
440
|
+
}
|
|
441
|
+
});
|
|
442
|
+
});
|
|
443
|
+
});
|
|
444
|
+
};
|
|
445
|
+
var onChange = function (templates, updateDialog) {
|
|
446
|
+
return function (api, change) {
|
|
447
|
+
if (change.name === 'template') {
|
|
448
|
+
var newTemplateTitle = api.getData().template;
|
|
449
|
+
findTemplate(templates, newTemplateTitle).each(function (t) {
|
|
450
|
+
api.block('Loading...');
|
|
451
|
+
getTemplateContent(t).then(function (previewHtml) {
|
|
452
|
+
updateDialog(api, t, previewHtml);
|
|
453
|
+
}).catch(function () {
|
|
454
|
+
updateDialog(api, t, '');
|
|
455
|
+
api.disable('save');
|
|
456
|
+
loadFailedAlert(api);
|
|
457
|
+
});
|
|
458
|
+
});
|
|
459
|
+
}
|
|
460
|
+
};
|
|
461
|
+
};
|
|
462
|
+
var onSubmit = function (templates) {
|
|
463
|
+
return function (api) {
|
|
464
|
+
var data = api.getData();
|
|
465
|
+
findTemplate(templates, data.template).each(function (t) {
|
|
466
|
+
getTemplateContent(t).then(function (previewHtml) {
|
|
467
|
+
insertTemplate(editor, false, previewHtml);
|
|
468
|
+
api.close();
|
|
469
|
+
}).catch(function () {
|
|
470
|
+
api.disable('save');
|
|
471
|
+
loadFailedAlert(api);
|
|
472
|
+
});
|
|
473
|
+
});
|
|
474
|
+
};
|
|
475
|
+
};
|
|
476
|
+
var openDialog = function (templates) {
|
|
477
|
+
var selectBoxItems = createSelectBoxItems(templates);
|
|
478
|
+
var buildDialogSpec = function (bodyItems, initialData) {
|
|
479
|
+
return {
|
|
480
|
+
title: 'Insert Template',
|
|
481
|
+
size: 'large',
|
|
482
|
+
body: {
|
|
483
|
+
type: 'panel',
|
|
484
|
+
items: bodyItems
|
|
485
|
+
},
|
|
486
|
+
initialData: initialData,
|
|
487
|
+
buttons: [
|
|
488
|
+
{
|
|
489
|
+
type: 'cancel',
|
|
490
|
+
name: 'cancel',
|
|
491
|
+
text: 'Cancel'
|
|
492
|
+
},
|
|
493
|
+
{
|
|
494
|
+
type: 'submit',
|
|
495
|
+
name: 'save',
|
|
496
|
+
text: 'Save',
|
|
497
|
+
primary: true
|
|
498
|
+
}
|
|
499
|
+
],
|
|
500
|
+
onSubmit: onSubmit(templates),
|
|
501
|
+
onChange: onChange(templates, updateDialog)
|
|
502
|
+
};
|
|
503
|
+
};
|
|
504
|
+
var updateDialog = function (dialogApi, template, previewHtml) {
|
|
505
|
+
var content = getPreviewContent(editor, previewHtml);
|
|
506
|
+
var bodyItems = [
|
|
507
|
+
{
|
|
508
|
+
type: 'selectbox',
|
|
509
|
+
name: 'template',
|
|
510
|
+
label: 'Templates',
|
|
511
|
+
items: selectBoxItems
|
|
512
|
+
},
|
|
513
|
+
{
|
|
514
|
+
type: 'htmlpanel',
|
|
515
|
+
html: '<p aria-live="polite">' + htmlEscape(template.value.description) + '</p>'
|
|
516
|
+
},
|
|
517
|
+
{
|
|
518
|
+
label: 'Preview',
|
|
519
|
+
type: 'iframe',
|
|
520
|
+
name: 'preview',
|
|
521
|
+
sandboxed: false
|
|
522
|
+
}
|
|
523
|
+
];
|
|
524
|
+
var initialData = {
|
|
525
|
+
template: template.text,
|
|
526
|
+
preview: content
|
|
527
|
+
};
|
|
528
|
+
dialogApi.unblock();
|
|
529
|
+
dialogApi.redial(buildDialogSpec(bodyItems, initialData));
|
|
530
|
+
dialogApi.focus('template');
|
|
531
|
+
};
|
|
532
|
+
var dialogApi = editor.windowManager.open(buildDialogSpec([], {
|
|
533
|
+
template: '',
|
|
534
|
+
preview: ''
|
|
535
|
+
}));
|
|
536
|
+
dialogApi.block('Loading...');
|
|
537
|
+
getTemplateContent(templates[0]).then(function (previewHtml) {
|
|
538
|
+
updateDialog(dialogApi, templates[0], previewHtml);
|
|
539
|
+
}).catch(function () {
|
|
540
|
+
updateDialog(dialogApi, templates[0], '');
|
|
541
|
+
dialogApi.disable('save');
|
|
542
|
+
loadFailedAlert(dialogApi);
|
|
543
|
+
});
|
|
544
|
+
};
|
|
545
|
+
var optTemplates = createTemplates();
|
|
546
|
+
optTemplates.each(openDialog);
|
|
547
|
+
};
|
|
548
|
+
|
|
549
|
+
var showDialog = function (editor) {
|
|
550
|
+
return function (templates) {
|
|
551
|
+
open(editor, templates);
|
|
552
|
+
};
|
|
553
|
+
};
|
|
554
|
+
var register$1 = function (editor) {
|
|
555
|
+
editor.ui.registry.addButton('template', {
|
|
556
|
+
icon: 'template',
|
|
557
|
+
tooltip: 'Insert template',
|
|
558
|
+
onAction: createTemplateList(editor, showDialog(editor))
|
|
559
|
+
});
|
|
560
|
+
editor.ui.registry.addMenuItem('template', {
|
|
561
|
+
icon: 'template',
|
|
562
|
+
text: 'Insert template...',
|
|
563
|
+
onAction: createTemplateList(editor, showDialog(editor))
|
|
564
|
+
});
|
|
565
|
+
};
|
|
566
|
+
|
|
567
|
+
function Plugin () {
|
|
568
|
+
global.add('template', function (editor) {
|
|
569
|
+
register$1(editor);
|
|
570
|
+
register(editor);
|
|
571
|
+
setup(editor);
|
|
572
|
+
});
|
|
573
|
+
}
|
|
574
|
+
|
|
575
|
+
Plugin();
|
|
576
|
+
|
|
577
|
+
}());
|
|
@@ -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"),t=function(){},o=function(e){return function(){return e}};var n,r,a,c=o(!1),u=o(!0),_=tinymce.util.Tools.resolve("tinymce.util.Tools"),s=tinymce.util.Tools.resolve("tinymce.util.XHR"),i=function(e){return e.getParam("template_mdate_classes","mdate")},l=function(e){return e.getParam("template_replace_values")},f=function(e){return e.getParam("template_mdate_format",e.translate("%Y-%m-%d"))},m=function(e,t){if((e=""+e).length<t)for(var n=0;n<t-e.length;n++)e="0"+e;return e},p=function(e,t,n){var r="Sun Mon Tue Wed Thu Fri Sat Sun".split(" "),a="Sunday Monday Tuesday Wednesday Thursday Friday Saturday Sunday".split(" "),o="Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec".split(" "),c="January February March April May June July August September October November December".split(" ");return n=n||new Date,t=(t=(t=(t=(t=(t=(t=(t=(t=(t=(t=(t=(t=(t=(t=(t=t.replace("%D","%m/%d/%Y")).replace("%r","%I:%M:%S %p")).replace("%Y",""+n.getFullYear())).replace("%y",""+n.getYear())).replace("%m",m(n.getMonth()+1,2))).replace("%d",m(n.getDate(),2))).replace("%H",""+m(n.getHours(),2))).replace("%M",""+m(n.getMinutes(),2))).replace("%S",""+m(n.getSeconds(),2))).replace("%I",""+((n.getHours()+11)%12+1))).replace("%p",n.getHours()<12?"AM":"PM")).replace("%B",""+e.translate(c[n.getMonth()]))).replace("%b",""+e.translate(o[n.getMonth()]))).replace("%A",""+e.translate(a[n.getDay()]))).replace("%a",""+e.translate(r[n.getDay()]))).replace("%%","%")},d=function(t,n){return function(){var e=t.getParam("templates");"function"!=typeof e?"string"==typeof e?s.send({url:e,success:function(e){n(JSON.parse(e))}}):n(e):e(n)}},x=function(n,e){return _.each(e,function(e,t){"function"==typeof e&&(e=e(t)),n=n.replace(new RegExp("\\{\\$"+t+"\\}","g"),e)}),n},g=function(e,t){var r=e.dom,a=l(e);_.each(r.select("*",t),function(n){_.each(a,function(e,t){r.hasClass(n,t)&&"function"==typeof a[t]&&a[t](n)})})},v=function(e,t){return new RegExp("\\b"+t+"\\b","g").test(e.className)},y=function(n,e,t){var r,a=n.dom,o=n.selection.getContent();t=x(t,l(n)),r=a.create("div",null,t);var c=a.select(".mceTmpl",r);c&&0<c.length&&(r=a.create("div",null)).appendChild(c[0].cloneNode(!0)),_.each(a.select("*",r),function(e){var t;v(e,n.getParam("template_cdate_classes","cdate").replace(/\s+/g,"|"))&&(e.innerHTML=p(n,(t=n).getParam("template_cdate_format",t.translate("%Y-%m-%d")))),v(e,i(n).replace(/\s+/g,"|"))&&(e.innerHTML=p(n,f(n))),v(e,n.getParam("template_selected_content_classes","selcontent").replace(/\s+/g,"|"))&&(e.innerHTML=o)}),g(n,r),n.execCommand("mceInsertContent",!1,r.innerHTML),n.addVisual()},h=function(e){e.addCommand("mceInsertTemplate",function(r){for(var a=[],e=1;e<arguments.length;e++)a[e-1]=arguments[e];return function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n=a.concat(e);return r.apply(null,n)}}(y,e))},b=function(){return T},T=(n=function(e){return e.isNone()},{fold:function(e,t){return e()},is:c,isSome:c,isNone:u,getOr:a=function(e){return e},getOrThunk:r=function(e){return e()},getOrDie:function(e){throw new Error(e||"error: getOrDie called on none.")},getOrNull:o(null),getOrUndefined:o(undefined),or:a,orThunk:r,map:b,each:t,bind:b,exists:c,forall:u,filter:b,equals:n,equals_:n,toArray:function(){return[]},toString:o("none()")}),M=function(n){var e=o(n),t=function(){return a},r=function(e){return e(n)},a={fold:function(e,t){return t(n)},is:function(e){return n===e},isSome:u,isNone:c,getOr:e,getOrThunk:e,getOrDie:e,getOrNull:e,getOrUndefined:e,or:t,orThunk:t,map:function(e){return M(e(n))},each:function(e){e(n)},bind:r,exists:r,forall:r,filter:function(e){return e(n)?a:T},toArray:function(){return[n]},toString:function(){return"some("+n+")"},equals:function(e){return e.is(n)},equals_:function(e,t){return e.fold(c,function(e){return t(n,e)})}};return a},O={some:M,none:b,from:function(e){return null===e||e===undefined?T:M(e)}},P=function(e,t){return function(e,t,n){for(var r=0,a=e.length;r<a;r++){var o=e[r];if(t(o,r))return O.some(o);if(n(o,r))break}return O.none()}(e,t,c)},S=tinymce.util.Tools.resolve("tinymce.Env"),w=tinymce.util.Tools.resolve("tinymce.util.Promise"),D=Object.hasOwnProperty,A=function(e,t){return D.call(e,t)},C={'"':""","<":"<",">":">","&":"&","'":"'"},N=function(e){return e.replace(/["'<>&]/g,function(e){return(A(t=C,n=e)?O.from(t[n]):O.none()).getOr(e);var t,n})},I=function(M,t){var e=function(e){return function(e,t){for(var n=e.length,r=new Array(n),a=0;a<n;a++){var o=e[a];r[a]=t(o,a)}return r}(e,function(e){return{text:e.text,value:e.text}})},u=function(e,t){return P(e,function(e){return e.text===t})},i=function(e){M.windowManager.alert("Could not load the specified template.",function(){return e.focus("template")})},l=function(e){return new w(function(t,n){e.value.url.fold(function(){return t(e.value.content.getOr(""))},function(e){return s.send({url:e,success:function(e){t(e)},error:function(e){n(e)}})})})};(function(){if(t&&0!==t.length)return O.from(_.map(t,function(e,t){var n=function(e){return e.url!==undefined};return{selected:0===t,text:e.title,value:{url:n(e)?O.from(e.url):O.none(),content:n(e)?O.none():O.from(e.content),description:e.description}}}));var e=M.translate("No templates defined.");return M.notificationManager.open({text:e,type:"info"}),O.none()})().each(function(o){var b=e(o),T=function(e,t){return{title:"Insert Template",size:"large",body:{type:"panel",items:e},initialData:t,buttons:[{type:"cancel",name:"cancel",text:"Cancel"},{type:"submit",name:"save",text:"Save",primary:!0}],onSubmit:function(t){var e=t.getData();u(n,e.template).each(function(e){l(e).then(function(e){y(M,0,e),t.close()})["catch"](function(){t.disable("save"),i(t)})})},onChange:(r=n=o,a=c,function(n,e){var t;"template"===e.name&&(t=n.getData().template,u(r,t).each(function(t){n.block("Loading..."),l(t).then(function(e){a(n,t,e)})["catch"](function(){a(n,t,""),n.disable("save"),i(n)})}))})};var r,a,n},c=function(e,t,n){var r,a,o,c,u,i,l,s,f,m,p,d,g,v=(r=M,-1===(a=n).indexOf("<html>")&&(o="",c=r.getParam("content_style","","string"),u=r.getParam("content_css_cors",!1,"boolean")?' crossorigin="anonymous"':"",_.each(r.contentCSS,function(e){o+='<link type="text/css" rel="stylesheet" href="'+r.documentBaseURI.toAbsolute(e)+'"'+u+">"}),c&&(o+='<style type="text/css">'+c+"</style>"),i=-1===(g=(p=r).getParam("body_class","","string")).indexOf("=")?g:(d=p).getParam("body_class","","hash")[d.id]||"",l=r.dom.encode,s='<script>document.addEventListener && document.addEventListener("click", function(e) {for (var elm = e.target; elm; elm = elm.parentNode) {if (elm.nodeName === "A" && !('+(S.mac?"e.metaKey":"e.ctrlKey && !e.altKey")+")) {e.preventDefault();}}}, false);<\/script> ",m=(f=r.getBody().dir)?' dir="'+l(f)+'"':"",a='<!DOCTYPE html><html><head><base href="'+l(r.documentBaseURI.getURI())+'">'+o+s+'</head><body class="'+l(i)+'"'+m+">"+a+"</body></html>"),x(a,r.getParam("template_preview_replace_values"))),y=[{type:"selectbox",name:"template",label:"Templates",items:b},{type:"htmlpanel",html:'<p aria-live="polite">'+N(t.value.description)+"</p>"},{label:"Preview",type:"iframe",name:"preview",sandboxed:!1}],h={template:t.text,preview:v};e.unblock(),e.redial(T(y,h)),e.focus("template")},t=M.windowManager.open(T([],{template:"",preview:""}));t.block("Loading..."),l(o[0]).then(function(e){c(t,o[0],e)})["catch"](function(){c(t,o[0],""),t.disable("save"),i(t)})})},k=function(t){return function(e){I(t,e)}};e.add("template",function(e){var t,r;(t=e).ui.registry.addButton("template",{icon:"template",tooltip:"Insert template",onAction:d(t,k(t))}),t.ui.registry.addMenuItem("template",{icon:"template",text:"Insert template...",onAction:d(t,k(t))}),h(e),(r=e).on("PreProcess",function(e){var t=r.dom,n=f(r);_.each(t.select("div",e.node),function(e){t.hasClass(e,"mceTmpl")&&(_.each(t.select("*",e),function(e){t.hasClass(e,i(r).replace(/\s+/g,"|"))&&(e.innerHTML=p(r,n))}),g(r,e))})})})}();
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
"use strict";
|
|
2
1
|
/**
|
|
3
2
|
* Copyright (c) Tiny Technologies, Inc. All rights reserved.
|
|
4
3
|
* Licensed under the LGPL or a commercial license.
|
|
@@ -9,11 +8,15 @@
|
|
|
9
8
|
*/
|
|
10
9
|
(function () {
|
|
11
10
|
'use strict';
|
|
11
|
+
|
|
12
12
|
var global = tinymce.util.Tools.resolve('tinymce.PluginManager');
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
13
|
+
|
|
14
|
+
function Plugin () {
|
|
15
|
+
global.add('textcolor', function () {
|
|
16
|
+
console.warn('Text color plugin is now built in to the core editor, please remove it from your editor configuration');
|
|
17
|
+
});
|
|
17
18
|
}
|
|
19
|
+
|
|
18
20
|
Plugin();
|
|
21
|
+
|
|
19
22
|
}());
|
|
@@ -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";tinymce.util.Tools.resolve("tinymce.PluginManager").add("textcolor",function(){console.warn("Text color plugin is now built in to the core editor, please remove it from your editor configuration")})}();
|