argous 1.2.133 → 1.2.137
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 +20 -0
- package/dist/components/AutoCompleteFavorites/AutoCompleteFavorites.js +331 -0
- package/dist/components/AutoCompleteFavorites/index.d.ts +1 -0
- package/dist/components/AutoCompleteFavorites/index.js +8 -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/AutoCompleteFavorites/index.js +1 -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
package/lib/api/index.js
ADDED
|
@@ -0,0 +1,402 @@
|
|
|
1
|
+
import { getCookie } from '../utils';
|
|
2
|
+
import { getConfig } from '../utils/config';
|
|
3
|
+
|
|
4
|
+
export const server = () => `://${getConfig()[/^[a-z]+.+\.com\.br$/.test(window.location.host) ? 'ip' : 'ip']}/${getConfig().path ? getConfig().path : 'jUniIII'}/`;
|
|
5
|
+
|
|
6
|
+
export const api = () => `${getConfig().ssl ? 'https' : 'http'}${server()}argous/`;
|
|
7
|
+
|
|
8
|
+
export const headers = () => ({ lgTkn: getCookie('lt') });
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* @deprecated
|
|
12
|
+
*
|
|
13
|
+
* @param {string} request - Metodo chamado
|
|
14
|
+
* @param {*} data - Dados Enviados
|
|
15
|
+
*
|
|
16
|
+
* @returns {*} retorno
|
|
17
|
+
*/
|
|
18
|
+
export const fetchToArgous = async (request, data) => {
|
|
19
|
+
const res = await fetch(`${api()}${request}.rslvr`, {
|
|
20
|
+
method: 'POST',
|
|
21
|
+
body: JSON.stringify(data),
|
|
22
|
+
headers: headers()
|
|
23
|
+
});
|
|
24
|
+
return await res.json();
|
|
25
|
+
};
|
|
26
|
+
|
|
27
|
+
export const login = async (data) => {
|
|
28
|
+
const res = await fetch(`${api()}aglogin.rslvr`, {
|
|
29
|
+
method: 'POST',
|
|
30
|
+
body: JSON.stringify(data)
|
|
31
|
+
});
|
|
32
|
+
return await res.json();
|
|
33
|
+
};
|
|
34
|
+
|
|
35
|
+
export const logout = async () => {
|
|
36
|
+
const res = await fetch(`${api()}aglogout.rslvr`, {
|
|
37
|
+
method: 'POST',
|
|
38
|
+
headers: headers()
|
|
39
|
+
});
|
|
40
|
+
return await res.json();
|
|
41
|
+
};
|
|
42
|
+
|
|
43
|
+
export const validaToken = async () => {
|
|
44
|
+
const res = await fetch(`${api()}agvldtkn.rslvr`, {
|
|
45
|
+
method: 'POST',
|
|
46
|
+
headers: headers()
|
|
47
|
+
});
|
|
48
|
+
return await res.json();
|
|
49
|
+
};
|
|
50
|
+
|
|
51
|
+
export const getMenu = async () => {
|
|
52
|
+
const res = await fetch(`${api()}agetmenu.rslvr`, {
|
|
53
|
+
method: 'POST',
|
|
54
|
+
headers: headers()
|
|
55
|
+
});
|
|
56
|
+
return await res.json();
|
|
57
|
+
};
|
|
58
|
+
|
|
59
|
+
export const getPostsTimeline = async (data) => {
|
|
60
|
+
const res = await fetch(`${api()}agtimeline.rslvr`, {
|
|
61
|
+
method: 'POST',
|
|
62
|
+
body: JSON.stringify(data),
|
|
63
|
+
headers: headers()
|
|
64
|
+
});
|
|
65
|
+
return await res.json();
|
|
66
|
+
};
|
|
67
|
+
|
|
68
|
+
export const addCommentPost = async (data) => {
|
|
69
|
+
const res = await fetch(`${api()}agpostcomment.rslvr`, {
|
|
70
|
+
method: 'POST',
|
|
71
|
+
body: JSON.stringify(data),
|
|
72
|
+
headers: headers()
|
|
73
|
+
});
|
|
74
|
+
return await res.json();
|
|
75
|
+
};
|
|
76
|
+
|
|
77
|
+
export const getPostPublicacao = async (data) => {
|
|
78
|
+
const res = await fetch(`${api()}aggetpost.rslvr`, {
|
|
79
|
+
method: 'POST',
|
|
80
|
+
body: JSON.stringify(data),
|
|
81
|
+
headers: headers()
|
|
82
|
+
});
|
|
83
|
+
return await res.json();
|
|
84
|
+
};
|
|
85
|
+
|
|
86
|
+
export const getProgram = async (data) => {
|
|
87
|
+
const res = await fetch(`${api()}agpgm.rslvr`, {
|
|
88
|
+
method: 'POST',
|
|
89
|
+
body: JSON.stringify({ pgCode: data }),
|
|
90
|
+
headers: headers()
|
|
91
|
+
});
|
|
92
|
+
return await res.json();
|
|
93
|
+
};
|
|
94
|
+
|
|
95
|
+
/**
|
|
96
|
+
* @deprecated
|
|
97
|
+
*
|
|
98
|
+
* @param {*} data - Dados
|
|
99
|
+
*
|
|
100
|
+
* @returns {object} retorno
|
|
101
|
+
*/
|
|
102
|
+
export const agGet = async (data) => {
|
|
103
|
+
const res = await fetch(`${api()}agget.rslvr`, {
|
|
104
|
+
method: 'POST',
|
|
105
|
+
body: JSON.stringify(data),
|
|
106
|
+
headers: headers()
|
|
107
|
+
});
|
|
108
|
+
return await res.json();
|
|
109
|
+
};
|
|
110
|
+
|
|
111
|
+
/**
|
|
112
|
+
* @deprecated
|
|
113
|
+
*
|
|
114
|
+
* @param {*} data - Dados
|
|
115
|
+
*
|
|
116
|
+
* @returns {object} retorno
|
|
117
|
+
*/
|
|
118
|
+
export const agSet = async (data) => {
|
|
119
|
+
const res = await fetch(`${api()}agset.rslvr`, {
|
|
120
|
+
method: 'POST',
|
|
121
|
+
body: JSON.stringify(data),
|
|
122
|
+
headers: headers()
|
|
123
|
+
});
|
|
124
|
+
return await res.json();
|
|
125
|
+
};
|
|
126
|
+
|
|
127
|
+
export const action = async (data) => {
|
|
128
|
+
const res = await fetch(`${api()}agaction.rslvr`, {
|
|
129
|
+
method: 'POST',
|
|
130
|
+
body: JSON.stringify(data),
|
|
131
|
+
headers: headers()
|
|
132
|
+
});
|
|
133
|
+
return await res.json();
|
|
134
|
+
};
|
|
135
|
+
|
|
136
|
+
/**
|
|
137
|
+
* @deprecated
|
|
138
|
+
*
|
|
139
|
+
* @param {*} data - Dados
|
|
140
|
+
*
|
|
141
|
+
* @returns {object} retorno
|
|
142
|
+
*/
|
|
143
|
+
export const method = async (data) => {
|
|
144
|
+
const res = await fetch(`${api()}agmethod.rslvr`, {
|
|
145
|
+
method: 'POST',
|
|
146
|
+
body: JSON.stringify(data),
|
|
147
|
+
headers: headers()
|
|
148
|
+
});
|
|
149
|
+
return await res.json();
|
|
150
|
+
};
|
|
151
|
+
|
|
152
|
+
export const getFavorites = async () => {
|
|
153
|
+
const res = await fetch(`${api()}agfvrts.rslvr`, {
|
|
154
|
+
method: 'POST',
|
|
155
|
+
headers: headers()
|
|
156
|
+
});
|
|
157
|
+
return await res.json();
|
|
158
|
+
};
|
|
159
|
+
|
|
160
|
+
export const toggleFavorite = async (data) => {
|
|
161
|
+
const res = await fetch(`${api()}agchfvrts.rslvr`, {
|
|
162
|
+
method: 'POST',
|
|
163
|
+
body: JSON.stringify(data),
|
|
164
|
+
headers: headers()
|
|
165
|
+
});
|
|
166
|
+
return await res.json();
|
|
167
|
+
};
|
|
168
|
+
|
|
169
|
+
export const callProgram = async (data) => {
|
|
170
|
+
const res = await fetch(`${api()}agcallpgm.rslvr`, {
|
|
171
|
+
method: 'POST',
|
|
172
|
+
body: JSON.stringify(data),
|
|
173
|
+
headers: headers()
|
|
174
|
+
});
|
|
175
|
+
return await res.json();
|
|
176
|
+
};
|
|
177
|
+
|
|
178
|
+
export const getNotificacoes = async (data) => {
|
|
179
|
+
const res = await fetch(`${api()}agnotfctn.rslvr`, {
|
|
180
|
+
method: 'POST',
|
|
181
|
+
body: JSON.stringify(data),
|
|
182
|
+
headers: headers()
|
|
183
|
+
});
|
|
184
|
+
return await res.json();
|
|
185
|
+
};
|
|
186
|
+
|
|
187
|
+
export const readNotificacoes = async (data) => {
|
|
188
|
+
const res = await fetch(`${api()}agnotvista.rslvr`, {
|
|
189
|
+
method: 'POST',
|
|
190
|
+
body: JSON.stringify(data),
|
|
191
|
+
headers: headers()
|
|
192
|
+
});
|
|
193
|
+
return await res.json();
|
|
194
|
+
};
|
|
195
|
+
|
|
196
|
+
export const readNotificacao = async (data) => {
|
|
197
|
+
const res = await fetch(`${api()}agnotlida.rslvr`, {
|
|
198
|
+
method: 'POST',
|
|
199
|
+
body: JSON.stringify(data),
|
|
200
|
+
headers: headers()
|
|
201
|
+
});
|
|
202
|
+
return await res.json();
|
|
203
|
+
};
|
|
204
|
+
|
|
205
|
+
export const recebeThread = async (data) => {
|
|
206
|
+
const res = await fetch(`${api()}agthreads.rslvr`, {
|
|
207
|
+
method: 'POST',
|
|
208
|
+
body: JSON.stringify(data),
|
|
209
|
+
headers: headers()
|
|
210
|
+
});
|
|
211
|
+
return await res.json();
|
|
212
|
+
};
|
|
213
|
+
|
|
214
|
+
export const recebeInfoThread = async (data) => {
|
|
215
|
+
const res = await fetch(`${api()}aginfothread.rslvr`, {
|
|
216
|
+
method: 'POST',
|
|
217
|
+
body: JSON.stringify(data),
|
|
218
|
+
headers: headers()
|
|
219
|
+
});
|
|
220
|
+
return await res.json();
|
|
221
|
+
};
|
|
222
|
+
|
|
223
|
+
export const recebeThreadsUsuario = async (data) => {
|
|
224
|
+
const res = await fetch(`${api()}agthreadsusuario.rslvr`, {
|
|
225
|
+
method: 'POST',
|
|
226
|
+
body: JSON.stringify(data),
|
|
227
|
+
headers: headers()
|
|
228
|
+
});
|
|
229
|
+
return await res.json();
|
|
230
|
+
};
|
|
231
|
+
|
|
232
|
+
export const recebeInfoLoginsAtivos = async () => {
|
|
233
|
+
const res = await fetch(`${api()}agloginsativos.rslvr`, {
|
|
234
|
+
method: 'POST',
|
|
235
|
+
headers: headers()
|
|
236
|
+
});
|
|
237
|
+
return await res.json();
|
|
238
|
+
};
|
|
239
|
+
|
|
240
|
+
export const recebeInfoEstatisticas = async () => {
|
|
241
|
+
const res = await fetch(`${api()}agstatistics.rslvr`, {
|
|
242
|
+
method: 'POST',
|
|
243
|
+
headers: headers()
|
|
244
|
+
});
|
|
245
|
+
return await res.json();
|
|
246
|
+
};
|
|
247
|
+
|
|
248
|
+
export const toggleLikePost = async (data) => {
|
|
249
|
+
const res = await fetch(`${api()}aglike.rslvr`, {
|
|
250
|
+
method: 'POST',
|
|
251
|
+
body: JSON.stringify(data),
|
|
252
|
+
headers: headers()
|
|
253
|
+
});
|
|
254
|
+
return await res.json();
|
|
255
|
+
};
|
|
256
|
+
|
|
257
|
+
export const publicaTimeline = async (data) => {
|
|
258
|
+
const res = await fetch(`${api()}agpost.rslvr`, {
|
|
259
|
+
method: 'POST',
|
|
260
|
+
body: JSON.stringify(data),
|
|
261
|
+
headers: headers()
|
|
262
|
+
});
|
|
263
|
+
return await res.json();
|
|
264
|
+
};
|
|
265
|
+
|
|
266
|
+
export const removePostTimeLine = async (data) => {
|
|
267
|
+
const res = await fetch(`${api()}agerasepost.rslvr`, {
|
|
268
|
+
method: 'POST',
|
|
269
|
+
body: JSON.stringify(data),
|
|
270
|
+
headers: headers()
|
|
271
|
+
});
|
|
272
|
+
return await res.json();
|
|
273
|
+
};
|
|
274
|
+
|
|
275
|
+
export const enviaCompartilhamentoDePrograma = async (data) => {
|
|
276
|
+
const res = await fetch(`${api()}agsharepost.rslvr`, {
|
|
277
|
+
method: 'POST',
|
|
278
|
+
body: JSON.stringify(data),
|
|
279
|
+
headers: headers()
|
|
280
|
+
});
|
|
281
|
+
return await res.json();
|
|
282
|
+
};
|
|
283
|
+
|
|
284
|
+
export const inicFileUpload = async (data) => { //inicia o processo de envio, retornando um id de protocolo e o tamanho de particionamento
|
|
285
|
+
const res = await fetch(`${api()}getProtocol.filepart`, {
|
|
286
|
+
method: 'POST',
|
|
287
|
+
body: JSON.stringify(data),
|
|
288
|
+
headers: headers()
|
|
289
|
+
});
|
|
290
|
+
return await res.json();
|
|
291
|
+
};
|
|
292
|
+
|
|
293
|
+
export const sendFilePart = async (data) => { // Envia um pedaco do do arquivo, retorna se foi sucedido ou nao
|
|
294
|
+
const res = await fetch(`${api()}setFilePart.filepart`, {
|
|
295
|
+
method: 'POST',
|
|
296
|
+
body: JSON.stringify(data),
|
|
297
|
+
headers: headers()
|
|
298
|
+
});
|
|
299
|
+
return await res.json();
|
|
300
|
+
};
|
|
301
|
+
|
|
302
|
+
export const endFileUpload = async (data) => { //Finaliza o processo de envio de arquivo
|
|
303
|
+
const res = await fetch(`${api()}setEndFileUpload.filepart`, {
|
|
304
|
+
method: 'POST',
|
|
305
|
+
body: JSON.stringify(data),
|
|
306
|
+
headers: headers()
|
|
307
|
+
});
|
|
308
|
+
return await res.json();
|
|
309
|
+
};
|
|
310
|
+
|
|
311
|
+
export const cancelFileUpload = async (data) => { //Cancela o envio do arquivo
|
|
312
|
+
const res = await fetch(`${api()}setFileUploadCancel.filepart`, {
|
|
313
|
+
method: 'POST',
|
|
314
|
+
body: JSON.stringify(data),
|
|
315
|
+
headers: headers()
|
|
316
|
+
});
|
|
317
|
+
return await res.json();
|
|
318
|
+
};
|
|
319
|
+
|
|
320
|
+
export const getFileInfo = async (data) => { //Busca informaçoes sobre o estado do arquivo
|
|
321
|
+
const res = await fetch(`${api()}getFileUploadInfo.filepart`, {
|
|
322
|
+
method: 'POST',
|
|
323
|
+
body: JSON.stringify(data),
|
|
324
|
+
headers: headers()
|
|
325
|
+
});
|
|
326
|
+
return await res.json();
|
|
327
|
+
};
|
|
328
|
+
|
|
329
|
+
export const searchUsers = async (data) => {
|
|
330
|
+
const res = await fetch(`${api()}aggetlistausuarios.rslvr`, {
|
|
331
|
+
method: 'POST',
|
|
332
|
+
body: JSON.stringify(data),
|
|
333
|
+
headers: headers()
|
|
334
|
+
});
|
|
335
|
+
return await res.json();
|
|
336
|
+
};
|
|
337
|
+
|
|
338
|
+
export const prepareFile = async file => {
|
|
339
|
+
const formData = new FormData();
|
|
340
|
+
formData.append('blob', file);
|
|
341
|
+
const res = await fetch(`${api()}docs/upload.agdoc`, {
|
|
342
|
+
method: 'POST',
|
|
343
|
+
headers: headers(),
|
|
344
|
+
body: formData
|
|
345
|
+
});
|
|
346
|
+
return { ...await res.json(),
|
|
347
|
+
lastModified: file.lastModified,
|
|
348
|
+
lastModifiedDate: file.lastModifiedDate,
|
|
349
|
+
name: file.name,
|
|
350
|
+
size: file.size,
|
|
351
|
+
type: file.type,
|
|
352
|
+
webkitRelativePath: file.webkitRelativePath,
|
|
353
|
+
arrayBuffer: await file.arrayBuffer()
|
|
354
|
+
};
|
|
355
|
+
};
|
|
356
|
+
|
|
357
|
+
export const createDocument = async ({
|
|
358
|
+
idUnidade, cdUnidade, idDocPai, path,
|
|
359
|
+
dsKeyWords, dtValidade, idTipoDocumento,
|
|
360
|
+
FileName, title, idRecebimento,
|
|
361
|
+
tpPrivacidade, description, dsClassificacao,
|
|
362
|
+
dsCategoria, dsSubCategoria, snSensivel
|
|
363
|
+
}) => {
|
|
364
|
+
return (await fetch(`${api()}docs/upload.agdoc`, {
|
|
365
|
+
method: 'POST',
|
|
366
|
+
headers: headers(),
|
|
367
|
+
body: JSON.stringify({
|
|
368
|
+
idUnidade, cdUnidade, idDocPai, path,
|
|
369
|
+
dsKeyWords, dtValidade, idTipoDocumento,
|
|
370
|
+
FileName, title, idRecebimento,
|
|
371
|
+
tpPrivacidade, description, dsClassificacao,
|
|
372
|
+
dsCategoria, dsSubCategoria, snSensivel
|
|
373
|
+
})
|
|
374
|
+
})).json();
|
|
375
|
+
};
|
|
376
|
+
|
|
377
|
+
export const getFileFromLink = async ({ URL: link = '' } = {}) => {
|
|
378
|
+
if (!link) return '';
|
|
379
|
+
const file = await (await fetch(link, {
|
|
380
|
+
method: 'post',
|
|
381
|
+
headers: headers()
|
|
382
|
+
})).blob();
|
|
383
|
+
return URL.createObjectURL(file);
|
|
384
|
+
};
|
|
385
|
+
|
|
386
|
+
export const getLink = async (idDocumento, nrRevisao, timeout) => {
|
|
387
|
+
if (!idDocumento) return '';
|
|
388
|
+
return await (await fetch(`${api()}docs/getURL.agdoc`, {
|
|
389
|
+
method: 'post',
|
|
390
|
+
headers: headers(),
|
|
391
|
+
body: JSON.stringify({ idDocumento, nrRevisao, timeout })
|
|
392
|
+
})).json();
|
|
393
|
+
};
|
|
394
|
+
|
|
395
|
+
export const scanDocument = async (idDocumento, nrRevisao) => {
|
|
396
|
+
const res = await fetch(`${api()}docs/scan.agdoc`, {
|
|
397
|
+
method: 'post',
|
|
398
|
+
headers: headers(),
|
|
399
|
+
body: JSON.stringify({ idDocumento, nrRevisao })
|
|
400
|
+
});
|
|
401
|
+
return await res.json();
|
|
402
|
+
};
|
package/lib/api/ws.js
ADDED
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { headers, server } from './';
|
|
2
|
+
import { getConfig } from '../utils/config';
|
|
3
|
+
|
|
4
|
+
const api = () => `${getConfig().ssl ? 'wss' : 'ws'}${ server() }ws`;
|
|
5
|
+
|
|
6
|
+
let argousWS = null;
|
|
7
|
+
|
|
8
|
+
export const connectArgousWS = (data) => {
|
|
9
|
+
argousWS = new WebSocket(api());
|
|
10
|
+
};
|
|
11
|
+
|
|
12
|
+
export const getArgousWS = (data) => {
|
|
13
|
+
return argousWS;
|
|
14
|
+
};
|
|
15
|
+
|
|
16
|
+
export const disconnect = () => {
|
|
17
|
+
if (argousWS)
|
|
18
|
+
argousWS.close();
|
|
19
|
+
};
|
|
20
|
+
|
|
21
|
+
export const enviaMensagem = (data) => {
|
|
22
|
+
const argousWS = getArgousWS();
|
|
23
|
+
argousWS.send(JSON.stringify({
|
|
24
|
+
...headers(),
|
|
25
|
+
...data
|
|
26
|
+
}));
|
|
27
|
+
};
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import PropTypes from 'prop-types';
|
|
2
|
+
import React, { Component } from 'react';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* @deprecated
|
|
6
|
+
*/
|
|
7
|
+
class Alert extends Component {
|
|
8
|
+
render() {
|
|
9
|
+
const {
|
|
10
|
+
titulo,
|
|
11
|
+
mensagem,
|
|
12
|
+
type = 'info',
|
|
13
|
+
small,
|
|
14
|
+
onClose,
|
|
15
|
+
className = '',
|
|
16
|
+
style,
|
|
17
|
+
} = this.props;
|
|
18
|
+
|
|
19
|
+
return (
|
|
20
|
+
<div>
|
|
21
|
+
{((mensagem) && (
|
|
22
|
+
<div style={style} className={`pg-alert pg-alert-dismissible reset-margin pg-alert-${type} ${(small && 'pg-alert-sm')} ${className}`}>
|
|
23
|
+
{(onClose && (
|
|
24
|
+
<button onClick={onClose} type='button' className='close'>×</button>
|
|
25
|
+
))}
|
|
26
|
+
{(titulo && (
|
|
27
|
+
<h4>{titulo}</h4>
|
|
28
|
+
))}
|
|
29
|
+
{(mensagem && (
|
|
30
|
+
<p>{mensagem}</p>
|
|
31
|
+
))}
|
|
32
|
+
</div>
|
|
33
|
+
))}
|
|
34
|
+
</div>
|
|
35
|
+
);
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
Alert.propTypes = {
|
|
40
|
+
titulo: PropTypes.string,
|
|
41
|
+
mensagem: PropTypes.string,
|
|
42
|
+
type: PropTypes.oneOf(['info', 'success', 'warning', 'danger']),
|
|
43
|
+
small: PropTypes.bool,
|
|
44
|
+
onClose: PropTypes.func,
|
|
45
|
+
className: PropTypes.string,
|
|
46
|
+
style: PropTypes.object,
|
|
47
|
+
};
|
|
48
|
+
|
|
49
|
+
export default Alert;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from './Alert';
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
import Button from '../Button';
|
|
2
|
+
import PropTypes from 'prop-types';
|
|
3
|
+
import React, { Component } from 'react';
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* @deprecated
|
|
7
|
+
*/
|
|
8
|
+
class ArgousAction extends Component {
|
|
9
|
+
render() {
|
|
10
|
+
const {
|
|
11
|
+
glyphicon,
|
|
12
|
+
type = 'default',
|
|
13
|
+
className = '',
|
|
14
|
+
onClick,
|
|
15
|
+
item,
|
|
16
|
+
action,
|
|
17
|
+
dados,
|
|
18
|
+
sendUpdates,
|
|
19
|
+
receiveUpdates,
|
|
20
|
+
onSuccess,
|
|
21
|
+
onAllUpdated,
|
|
22
|
+
children,
|
|
23
|
+
style,
|
|
24
|
+
title,
|
|
25
|
+
} = this.props;
|
|
26
|
+
|
|
27
|
+
return (
|
|
28
|
+
<Button
|
|
29
|
+
onClick={(allFields, event) => onClick && onClick(item, event)}
|
|
30
|
+
sendUpdates={sendUpdates}
|
|
31
|
+
receiveUpdates={receiveUpdates}
|
|
32
|
+
onSuccess={onSuccess}
|
|
33
|
+
onAllUpdated={onAllUpdated}
|
|
34
|
+
action={action}
|
|
35
|
+
dados={{
|
|
36
|
+
dados,
|
|
37
|
+
item,
|
|
38
|
+
}}
|
|
39
|
+
className={`${
|
|
40
|
+
glyphicon
|
|
41
|
+
? `btn btn-xs btn-round btn-action-min-size btn-${type}`
|
|
42
|
+
: ''
|
|
43
|
+
} ${className}`}
|
|
44
|
+
style={style}
|
|
45
|
+
title={title}
|
|
46
|
+
>
|
|
47
|
+
{glyphicon && <i className={glyphicon} />}
|
|
48
|
+
{children && <span>{children}</span>}
|
|
49
|
+
</Button>
|
|
50
|
+
);
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
ArgousAction.propTypes = {
|
|
55
|
+
glyphicon: PropTypes.string,
|
|
56
|
+
children: PropTypes.node,
|
|
57
|
+
onClick: PropTypes.func,
|
|
58
|
+
sendUpdates: PropTypes.array,
|
|
59
|
+
receiveUpdates: PropTypes.array,
|
|
60
|
+
onSuccess: PropTypes.func,
|
|
61
|
+
onAllUpdated: PropTypes.func,
|
|
62
|
+
action: PropTypes.string,
|
|
63
|
+
dados: PropTypes.object,
|
|
64
|
+
type: PropTypes.oneOf([
|
|
65
|
+
'default',
|
|
66
|
+
'primary',
|
|
67
|
+
'success',
|
|
68
|
+
'info',
|
|
69
|
+
'warning',
|
|
70
|
+
'danger',
|
|
71
|
+
]),
|
|
72
|
+
className: PropTypes.string,
|
|
73
|
+
style: PropTypes.object,
|
|
74
|
+
title: PropTypes.string,
|
|
75
|
+
item: PropTypes.oneOfType([PropTypes.array, PropTypes.object]),
|
|
76
|
+
};
|
|
77
|
+
|
|
78
|
+
export default ArgousAction;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from './ArgousAction';
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { AvatarProps } from '@material-ui/core';
|
|
2
|
+
|
|
3
|
+
export interface ArgousAvatarTypeMap extends AvatarProps{
|
|
4
|
+
/**
|
|
5
|
+
* Nome da pessoa que recebera o avatar
|
|
6
|
+
* Prove as iniciais no caso de nao haver foto
|
|
7
|
+
*/
|
|
8
|
+
nome?: string;
|
|
9
|
+
idUsuario?: number
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
declare function ArgousAvatar(props: ArgousAvatarTypeMap): JSX.Element
|
|
13
|
+
|
|
14
|
+
export default ArgousAvatar;
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
import { fetchToArgous } from '../../api';
|
|
2
|
+
import { getNumeroFromInitials, getInitials } from '../../utils';
|
|
3
|
+
import { Avatar, makeStyles, colors } from '@material-ui/core';
|
|
4
|
+
import PropTypes from 'prop-types';
|
|
5
|
+
import React, { useEffect, useState } from 'react';
|
|
6
|
+
|
|
7
|
+
const useStyles = makeStyles(theme => ({
|
|
8
|
+
orange: {
|
|
9
|
+
color: theme.palette.getContrastText(colors.deepOrange[500]),
|
|
10
|
+
backgroundColor: colors.deepOrange[500],
|
|
11
|
+
},
|
|
12
|
+
purple: {
|
|
13
|
+
color: theme.palette.getContrastText(colors.deepPurple[500]),
|
|
14
|
+
backgroundColor: colors.deepPurple[500],
|
|
15
|
+
},
|
|
16
|
+
blue: {
|
|
17
|
+
color: theme.palette.getContrastText(colors.blue[500]),
|
|
18
|
+
backgroundColor: colors.blue[500],
|
|
19
|
+
},
|
|
20
|
+
red: {
|
|
21
|
+
color: theme.palette.getContrastText(colors.red[500]),
|
|
22
|
+
backgroundColor: colors.red[500],
|
|
23
|
+
},
|
|
24
|
+
rosa: {
|
|
25
|
+
color: theme.palette.getContrastText(colors.pink[500]),
|
|
26
|
+
backgroundColor: colors.pink[500],
|
|
27
|
+
},
|
|
28
|
+
cinza: {
|
|
29
|
+
color: theme.palette.getContrastText(colors.grey[500]),
|
|
30
|
+
backgroundColor: colors.grey[500],
|
|
31
|
+
},
|
|
32
|
+
green: {
|
|
33
|
+
color: theme.palette.getContrastText(colors.green[500]),
|
|
34
|
+
backgroundColor: colors.green[500],
|
|
35
|
+
},
|
|
36
|
+
amarelo: {
|
|
37
|
+
color: theme.palette.getContrastText(colors.yellow[500]),
|
|
38
|
+
backgroundColor: colors.yellow[500],
|
|
39
|
+
},
|
|
40
|
+
marrom: {
|
|
41
|
+
color: theme.palette.getContrastText(colors.brown[500]),
|
|
42
|
+
backgroundColor: colors.brown[500],
|
|
43
|
+
},
|
|
44
|
+
preto: {
|
|
45
|
+
color: theme.palette.getContrastText(colors.grey['A400']),
|
|
46
|
+
backgroundColor: colors.grey['A400'],
|
|
47
|
+
},
|
|
48
|
+
img: {
|
|
49
|
+
border: '2px solid #FFF'
|
|
50
|
+
},
|
|
51
|
+
}));
|
|
52
|
+
|
|
53
|
+
const ArgousAvatar = React.forwardRef(({ nome, src, className, idUsuario, ...props }, ref) => {
|
|
54
|
+
const classes = useStyles();
|
|
55
|
+
const cores = [classes.orange, classes.purple, classes.blue, classes.rosa, classes.cinza, classes.red, classes.amarelo, classes.marrom, classes.preto, classes.green];
|
|
56
|
+
const [userImage, setUserImage] = useState(undefined);
|
|
57
|
+
|
|
58
|
+
useEffect(() => {
|
|
59
|
+
setUserImage(localStorage.getItem(`imgUsuario-${idUsuario}`) || '');
|
|
60
|
+
if (!idUsuario || userImage || localStorage.getItem(`imgUsuario-${idUsuario}`)) return;
|
|
61
|
+
fetchToArgous('aguserimage', { idUsuario })
|
|
62
|
+
.then(({ userImage }) => {
|
|
63
|
+
if (userImage) {
|
|
64
|
+
setUserImage(userImage);
|
|
65
|
+
localStorage.setItem(`imgUsuario-${idUsuario}`, userImage);
|
|
66
|
+
} else localStorage.setItem(`imgUsuario-${idUsuario}`, '');
|
|
67
|
+
});
|
|
68
|
+
}, [idUsuario]);
|
|
69
|
+
|
|
70
|
+
return <Avatar ref={ref} className={`${className} ${src || userImage ? classes.img : cores[getNumeroFromInitials(getInitials(nome), cores.length)]}`} {...props} src={src || userImage}>{getInitials(nome)}</Avatar>;
|
|
71
|
+
});
|
|
72
|
+
|
|
73
|
+
ArgousAvatar.propTypes = {
|
|
74
|
+
nome: PropTypes.string,
|
|
75
|
+
src: PropTypes.string,
|
|
76
|
+
className: PropTypes.string
|
|
77
|
+
};
|
|
78
|
+
|
|
79
|
+
export default ArgousAvatar;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from './ArgousAvatar';
|