argous 1.2.246 → 1.3.2
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/WebSocket.d.ts +22 -10
- package/dist/api/WebSocket.js +40 -28
- package/dist/api/index.js +154 -132
- package/dist/api/ws.d.ts +1 -1
- package/dist/api/ws.js +45 -4
- package/dist/components/Alert/Alert.d.ts +19 -5
- package/dist/components/Alert/Alert.js +23 -9
- package/dist/components/Alert/index.d.ts +1 -2
- package/dist/components/ArgousAction/ArgousAction.d.ts +26 -5
- package/dist/components/ArgousAction/ArgousAction.js +25 -11
- package/dist/components/ArgousAction/index.d.ts +1 -2
- package/dist/components/ArgousAvatar/ArgousAvatar.d.ts +3 -14
- package/dist/components/ArgousAvatar/ArgousAvatar.js +54 -66
- package/dist/components/ArgousAvatar/index.d.ts +1 -2
- package/dist/components/ArgousComplexPagination/ArgousComplexPagination.d.ts +3 -76
- package/dist/components/ArgousComplexPagination/ArgousComplexPagination.js +114 -82
- package/dist/components/ArgousComplexPagination/index.d.ts +1 -2
- package/dist/components/ArgousComplexTable/ArgousComplexTable.d.ts +3 -158
- package/dist/components/ArgousComplexTable/ArgousComplexTable.js +94 -80
- package/dist/components/ArgousComplexTable/index.d.ts +1 -2
- package/dist/components/ArgousComplexTableBody/ArgousComplexTableBody.d.ts +7 -177
- package/dist/components/ArgousComplexTableBody/ArgousComplexTableBody.js +126 -100
- package/dist/components/ArgousComplexTableBody/DragAndDrop.d.ts +37 -0
- package/dist/components/ArgousComplexTableBody/DragAndDrop.js +156 -0
- package/dist/components/ArgousComplexTableBody/index.d.ts +1 -2
- package/dist/components/ArgousComplexTableHead/ArgousComplexTableHead.d.ts +3 -73
- package/dist/components/ArgousComplexTableHead/ArgousComplexTableHead.js +72 -51
- package/dist/components/ArgousComplexTableHead/index.d.ts +1 -2
- package/dist/components/ArgousComplexTableToolbar/ArgousComplexTableToolBar.d.ts +3 -58
- package/dist/components/ArgousComplexTableToolbar/ArgousComplexTableToolBar.js +63 -41
- package/dist/components/ArgousComplexTableToolbar/index.d.ts +1 -2
- package/dist/components/ArgousInput/ArgousInput.d.ts +2 -8
- package/dist/components/ArgousInput/ArgousInput.js +27 -13
- package/dist/components/ArgousInput/index.d.ts +1 -2
- package/dist/components/ArgousPagination/ArgousPagination.d.ts +3 -5
- package/dist/components/ArgousPagination/ArgousPagination.js +18 -11
- package/dist/components/ArgousPagination/index.d.ts +1 -2
- package/dist/components/ArgousProgressBar/ArgousProgressBar.d.ts +31 -21
- package/dist/components/ArgousProgressBar/ArgousProgressBar.js +64 -74
- package/dist/components/ArgousProgressBar/index.d.ts +1 -2
- package/dist/components/ArgousSimpleTable/ArgousSimpleTable.d.ts +3 -5
- package/dist/components/ArgousSimpleTable/ArgousSimpleTable.js +43 -33
- package/dist/components/ArgousSimpleTable/index.d.ts +1 -2
- package/dist/components/AutoComplete/AutoComplete.d.ts +2 -8
- package/dist/components/AutoComplete/AutoComplete.js +34 -21
- package/dist/components/AutoComplete/index.d.ts +1 -2
- package/dist/components/AutoCompleteFavorites/AutoCompleteFavorites.d.ts +28 -101
- package/dist/components/AutoCompleteFavorites/AutoCompleteFavorites.js +241 -185
- package/dist/components/AutoCompleteFavorites/index.d.ts +1 -2
- package/dist/components/BarChart/BarChart.d.ts +29 -5
- package/dist/components/BarChart/BarChart.js +22 -8
- package/dist/components/BarChart/index.d.ts +1 -2
- package/dist/components/BarraFerramentas/BarraFerramentas.d.ts +54 -25
- package/dist/components/BarraFerramentas/BarraFerramentas.js +163 -131
- package/dist/components/BarraFerramentas/index.d.ts +1 -2
- package/dist/components/Button/Button.d.ts +54 -5
- package/dist/components/Button/Button.js +25 -11
- package/dist/components/Button/index.d.ts +1 -2
- package/dist/components/Cabecalho/Cabecalho.d.ts +2 -8
- package/dist/components/Cabecalho/Cabecalho.js +46 -32
- package/dist/components/Cabecalho/index.d.ts +1 -2
- package/dist/components/Calendar/Calendar.d.ts +2 -8
- package/dist/components/Calendar/Calendar.js +35 -48
- package/dist/components/Calendar/index.d.ts +1 -2
- package/dist/components/Cam/Cam.d.ts +24 -24
- package/dist/components/Cam/Cam.js +34 -20
- package/dist/components/Cam/index.d.ts +1 -2
- package/dist/components/Carousel/Carousel.d.ts +21 -71
- package/dist/components/Carousel/Carousel.js +125 -111
- package/dist/components/Carousel/index.d.ts +1 -2
- package/dist/components/CartaoUsuario/CartaoUsuario.d.ts +6 -9
- package/dist/components/CartaoUsuario/CartaoUsuario.js +54 -40
- package/dist/components/CartaoUsuario/index.d.ts +1 -2
- package/dist/components/Collapse/Collapse.d.ts +55 -56
- package/dist/components/Collapse/Collapse.js +133 -79
- package/dist/components/Collapse/index.d.ts +1 -3
- package/dist/components/Compartilhar/Compartilhar.d.ts +3 -7
- package/dist/components/Compartilhar/Compartilhar.js +92 -83
- package/dist/components/Compartilhar/index.d.ts +1 -2
- package/dist/components/ConfirmModal/BasicModal.d.ts +1 -1
- package/dist/components/ConfirmModal/BasicModal.js +8 -8
- package/dist/components/ConfirmModal/ModalProvider.d.ts +12 -1
- package/dist/components/ConfirmModal/ModalProvider.js +34 -20
- package/dist/components/ConfirmModal/WrapperModal.d.ts +2 -2
- package/dist/components/ConfirmModal/WrapperModal.js +5 -5
- package/dist/components/ConfirmModal/index.d.ts +6 -20
- package/dist/components/ConfirmModal/index.js +5 -1
- package/dist/components/ContactValidationInput/ContactValidationInput.d.ts +17 -62
- package/dist/components/ContactValidationInput/ContactValidationInput.js +133 -105
- package/dist/components/ContactValidationInput/SealModal.d.ts +1 -1
- package/dist/components/ContactValidationInput/SealModal.js +13 -20
- package/dist/components/ContactValidationInput/index.d.ts +1 -2
- package/dist/components/Document/Icons.d.ts +2 -2
- package/dist/components/Document/Icons.js +46 -25
- package/dist/components/Document/ModalVisualizacaoDocumentos.d.ts +1 -1
- package/dist/components/Document/ModalVisualizacaoDocumentos.js +44 -24
- package/dist/components/Document/Visualizacao.d.ts +1 -1
- package/dist/components/Document/Visualizacao.js +60 -42
- package/dist/components/Document/index.d.ts +3 -3
- package/dist/components/Document/index.js +5 -1
- package/dist/components/DropArea/DropArea.d.ts +8 -21
- package/dist/components/DropArea/DropArea.js +43 -24
- package/dist/components/DropArea/Html5FileSelector.js +8 -9
- package/dist/components/DropArea/index.d.ts +1 -2
- package/dist/components/Editor/Events.d.ts +2 -2
- package/dist/components/Editor/ScriptLoader2.d.ts +2 -2
- package/dist/components/Editor/ScriptLoader2.js +3 -3
- package/dist/components/Editor/Utils.d.ts +4 -4
- package/dist/components/Editor/Utils.js +3 -3
- package/dist/components/Editor/components/Editor.d.ts +2 -2
- package/dist/components/Editor/components/Editor.js +38 -24
- package/dist/components/Editor/components/EditorPropTypes.d.ts +2 -2
- package/dist/components/Editor/components/EditorPropTypes.js +22 -8
- package/dist/components/FilePreparer/FilePreparer.d.ts +16 -26
- package/dist/components/FilePreparer/FilePreparer.js +133 -108
- package/dist/components/FilePreparer/index.d.ts +1 -2
- package/dist/components/FileUploader/FileUploader.d.ts +21 -8
- package/dist/components/FileUploader/FileUploader.js +54 -39
- package/dist/components/FileUploader/index.d.ts +1 -2
- package/dist/components/FormVisualizer/FormVisualizer.d.ts +8 -92
- package/dist/components/FormVisualizer/FormVisualizer.js +119 -80
- package/dist/components/FormVisualizer/index.d.ts +1 -2
- package/dist/components/HalfGauge/HalfGauge.d.ts +23 -82
- package/dist/components/HalfGauge/HalfGauge.js +107 -151
- package/dist/components/HalfGauge/index.d.ts +1 -2
- package/dist/components/Highlight/Highlight.d.ts +20 -7
- package/dist/components/Highlight/Highlight.js +28 -13
- package/dist/components/Highlight/index.d.ts +1 -2
- package/dist/components/ImageResize/ImageResize.d.ts +8 -28
- package/dist/components/ImageResize/ImageResize.js +128 -130
- package/dist/components/ImageResize/index.d.ts +1 -2
- package/dist/components/ImageResizeButton/ImageResizeButton.d.ts +2 -25
- package/dist/components/ImageResizeButton/ImageResizeButton.js +28 -14
- package/dist/components/ImageResizeButton/index.d.ts +1 -2
- package/dist/components/Input/Input.d.ts +2 -8
- package/dist/components/Input/Input.js +27 -13
- package/dist/components/Input/index.d.ts +1 -2
- package/dist/components/InputTags/InputTags.d.ts +2 -8
- package/dist/components/InputTags/InputTags.js +38 -21
- package/dist/components/InputTags/index.d.ts +1 -2
- package/dist/components/ListSelect/ListSelect.d.ts +2 -8
- package/dist/components/ListSelect/ListSelect.js +28 -14
- package/dist/components/ListSelect/index.d.ts +1 -2
- package/dist/components/MaterialButton/MaterialButton.d.ts +30 -12
- package/dist/components/MaterialButton/MaterialButton.js +56 -125
- package/dist/components/MaterialButton/index.d.ts +1 -2
- package/dist/components/MenuBar/MenuBar.d.ts +2 -8
- package/dist/components/MenuBar/MenuBar.js +28 -14
- package/dist/components/MenuBar/index.d.ts +1 -2
- package/dist/components/MonthPicker/MonthPicker.d.ts +2 -8
- package/dist/components/MonthPicker/MonthPicker.js +53 -35
- package/dist/components/MonthPicker/index.d.ts +1 -2
- package/dist/components/MultipleSelect/MultipleSelect.d.ts +2 -8
- package/dist/components/MultipleSelect/MultipleSelect.js +37 -19
- package/dist/components/MultipleSelect/index.d.ts +1 -2
- package/dist/components/OtpInput/OtpInput.d.ts +1 -1
- package/dist/components/OtpInput/OtpInput.js +80 -63
- package/dist/components/OtpInput/index.d.ts +1 -2
- package/dist/components/OutputText/OutputText.d.ts +2 -8
- package/dist/components/OutputText/OutputText.js +25 -11
- package/dist/components/OutputText/index.d.ts +1 -2
- package/dist/components/Pagination/Pagination.d.ts +16 -5
- package/dist/components/Pagination/Pagination.js +22 -8
- package/dist/components/Pagination/index.d.ts +1 -2
- package/dist/components/PercentageDisplay/PercentageDisplay.d.ts +14 -51
- package/dist/components/PercentageDisplay/PercentageDisplay.js +25 -89
- package/dist/components/PercentageDisplay/index.d.ts +1 -2
- package/dist/components/Programa/PageCodeEasterEgg.d.ts +6 -5
- package/dist/components/Programa/PageCodeEasterEgg.js +49 -36
- package/dist/components/Programa/Programa.d.ts +72 -32
- package/dist/components/Programa/Programa.js +78 -28
- package/dist/components/Programa/Tab.d.ts +7 -0
- package/dist/components/Programa/Tab.js +2 -0
- package/dist/components/Programa/TabNavigationRail.d.ts +12 -0
- package/dist/components/Programa/TabNavigationRail.js +76 -0
- package/dist/components/Programa/index.d.ts +1 -2
- package/dist/components/ProgressBar/ProgressBar.d.ts +20 -5
- package/dist/components/ProgressBar/ProgressBar.js +25 -11
- package/dist/components/ProgressBar/index.d.ts +1 -2
- package/dist/components/Select/Select.d.ts +2 -8
- package/dist/components/Select/Select.js +28 -14
- package/dist/components/Select/index.d.ts +1 -2
- package/dist/components/SimpleTable/SimpleTable.d.ts +27 -10
- package/dist/components/SimpleTable/SimpleTable.js +47 -33
- package/dist/components/SimpleTable/index.d.ts +1 -2
- package/dist/components/Stepper/Stepper.d.ts +25 -68
- package/dist/components/Stepper/Stepper.js +200 -181
- package/dist/components/Stepper/index.d.ts +1 -2
- package/dist/components/TablePicker/TablePicker.d.ts +3 -8
- package/dist/components/TablePicker/TablePicker.js +76 -43
- package/dist/components/TablePicker/index.d.ts +1 -2
- package/dist/components/Tabs/Tabs.d.ts +25 -5
- package/dist/components/Tabs/Tabs.js +25 -11
- package/dist/components/Tabs/index.d.ts +1 -2
- package/dist/components/TextArea/TextArea.d.ts +2 -8
- package/dist/components/TextArea/TextArea.js +25 -11
- package/dist/components/TextArea/index.d.ts +1 -2
- package/dist/components/TextToHtml/Cursor.d.ts +1 -1
- package/dist/components/TextToHtml/Cursor.js +26 -12
- package/dist/components/TextToHtml/TextStyles.d.ts +1 -1
- package/dist/components/TextToHtml/TextStyles.js +57 -46
- package/dist/components/TextToHtml/TextToHtml.d.ts +32 -36
- package/dist/components/TextToHtml/TextToHtml.js +76 -56
- package/dist/components/TextToHtml/index.d.ts +1 -2
- package/dist/components/ThreadLog/ThreadLog.d.ts +36 -5
- package/dist/components/ThreadLog/ThreadLog.js +34 -20
- package/dist/components/ThreadLog/index.d.ts +1 -2
- package/dist/components/UserCard/UserCard.d.ts +6 -15
- package/dist/components/UserCard/UserCard.js +51 -37
- package/dist/components/UserCard/index.d.ts +1 -2
- package/dist/components/UtilAutoComplete/UtilAutoComplete.d.ts +32 -97
- package/dist/components/UtilAutoComplete/UtilAutoComplete.js +44 -30
- package/dist/components/UtilAutoComplete/index.d.ts +1 -2
- package/dist/components/UtilTextField/UtilTextField.d.ts +7 -23
- package/dist/components/UtilTextField/UtilTextField.js +36 -20
- package/dist/components/UtilTextField/index.d.ts +1 -2
- package/dist/components/Zoom/Zoom.d.ts +7 -15
- package/dist/components/Zoom/Zoom.js +32 -29
- package/dist/components/Zoom/index.d.ts +1 -2
- package/dist/components/index.d.ts +118 -180
- package/dist/components/index.js +5 -1
- package/dist/fieldsRedux/createField.d.ts +6 -6
- package/dist/fieldsRedux/createField.js +39 -25
- package/dist/fieldsRedux/fieldsRedux.d.ts +3 -58
- package/dist/fieldsRedux/fieldsRedux.js +63 -49
- package/dist/fieldsRedux/index.d.ts +17 -2
- package/dist/fieldsRedux/passFields.d.ts +2 -0
- package/dist/fieldsRedux/passFields.js +33 -19
- package/dist/reducers/index.d.ts +98 -2
- package/dist/reducers/index.js +1 -1
- package/dist/utils/api.d.ts +2 -2
- package/dist/utils/api.js +50 -33
- package/dist/utils/config.js +2 -3
- package/dist/utils/date.js +4 -4
- package/dist/utils/index.d.ts +3 -3
- package/dist/utils/index.js +108 -162
- package/dist/utils/store.js +2 -3
- package/dist/utils/xmlToJson.js +1 -1
- package/lib/api/WebSocket.js +11 -12
- package/lib/api/index.js +14 -14
- package/lib/api/ws.js +48 -4
- package/lib/components/ArgousAvatar/ArgousAvatar.d.ts +1 -1
- package/lib/components/ArgousAvatar/ArgousAvatar.js +20 -54
- package/lib/components/ArgousComplexPagination/ArgousComplexPagination.d.ts +1 -1
- package/lib/components/ArgousComplexPagination/ArgousComplexPagination.js +50 -25
- package/lib/components/ArgousComplexTable/ArgousComplexTable.d.ts +1 -1
- package/lib/components/ArgousComplexTable/ArgousComplexTable.js +15 -15
- package/lib/components/ArgousComplexTableBody/ArgousComplexTableBody.d.ts +1 -1
- package/lib/components/ArgousComplexTableBody/ArgousComplexTableBody.js +121 -106
- package/lib/components/ArgousComplexTableBody/DragAndDrop.js +85 -0
- package/lib/components/ArgousComplexTableHead/ArgousComplexTableHead.js +60 -51
- package/lib/components/ArgousComplexTableToolbar/ArgousComplexTableToolBar.js +21 -12
- package/lib/components/ArgousInput/ArgousInput.js +2 -2
- package/lib/components/ArgousPagination/ArgousPagination.js +12 -4
- package/lib/components/ArgousProgressBar/ArgousProgressBar.js +67 -78
- package/lib/components/ArgousSimpleTable/ArgousSimpleTable.js +12 -18
- package/lib/components/AutoComplete/AutoComplete.js +2 -3
- package/lib/components/AutoCompleteFavorites/AutoCompleteFavorites.d.ts +3 -4
- package/lib/components/AutoCompleteFavorites/AutoCompleteFavorites.js +174 -108
- package/lib/components/BarraFerramentas/BarraFerramentas.d.ts +30 -2
- package/lib/components/BarraFerramentas/BarraFerramentas.js +92 -37
- package/lib/components/Calendar/Calendar.js +7 -42
- package/lib/components/Carousel/Carousel.js +42 -27
- package/lib/components/CartaoUsuario/CartaoUsuario.js +6 -6
- package/lib/components/Collapse/Collapse.d.ts +3 -3
- package/lib/components/Collapse/Collapse.js +92 -57
- package/lib/components/Compartilhar/Compartilhar.js +47 -46
- package/lib/components/ConfirmModal/BasicModal.tsx +1 -1
- package/lib/components/ConfirmModal/WrapperModal.tsx +2 -2
- package/lib/components/ContactValidationInput/ContactValidationInput.d.ts +1 -1
- package/lib/components/ContactValidationInput/ContactValidationInput.js +248 -213
- package/lib/components/ContactValidationInput/SealModal.js +38 -32
- package/lib/components/Document/Icons.js +14 -6
- package/lib/components/Document/ModalVisualizacaoDocumentos.js +9 -2
- package/lib/components/Document/Visualizacao.js +31 -25
- package/lib/components/DropArea/DropArea.js +9 -3
- package/lib/components/Editor/ScriptLoader2.ts +3 -3
- package/lib/components/Editor/Utils.ts +3 -3
- package/lib/components/Editor/components/Editor.tsx +1 -1
- package/lib/components/Editor/tinymce/models/dom/model.min.js +1 -1
- package/lib/components/Editor/tinymce/plugins/accordion/plugin.min.js +1 -1
- package/lib/components/Editor/tinymce/plugins/autolink/plugin.min.js +1 -1
- package/lib/components/Editor/tinymce/plugins/autosave/plugin.min.js +1 -1
- package/lib/components/Editor/tinymce/plugins/charmap/plugin.min.js +1 -1
- package/lib/components/Editor/tinymce/plugins/codesample/plugin.min.js +1 -1
- package/lib/components/Editor/tinymce/plugins/directionality/plugin.min.js +1 -1
- package/lib/components/Editor/tinymce/plugins/fullscreen/plugin.min.js +1 -1
- package/lib/components/Editor/tinymce/plugins/help/plugin.min.js +1 -1
- package/lib/components/Editor/tinymce/plugins/image/plugin.min.js +1 -1
- package/lib/components/Editor/tinymce/plugins/link/plugin.min.js +1 -1
- package/lib/components/Editor/tinymce/plugins/lists/plugin.min.js +1 -1
- package/lib/components/Editor/tinymce/plugins/media/plugin.min.js +1 -1
- package/lib/components/Editor/tinymce/plugins/searchreplace/plugin.min.js +1 -1
- package/lib/components/Editor/tinymce/plugins/table/plugin.js +3 -3
- package/lib/components/Editor/tinymce/plugins/table/plugin.min.js +1 -1
- package/lib/components/Editor/tinymce/plugins/visualchars/plugin.min.js +1 -1
- package/lib/components/Editor/tinymce/themes/silver/theme.js +38 -38
- package/lib/components/Editor/tinymce/themes/silver/theme.min.js +1 -1
- package/lib/components/Editor/tinymce/tinymce.js +12 -12
- package/lib/components/Editor/tinymce/tinymce.min.js +1 -1
- package/lib/components/FilePreparer/FilePreparer.d.ts +1 -1
- package/lib/components/FilePreparer/FilePreparer.js +112 -108
- package/lib/components/FileUploader/FileUploader.js +8 -7
- package/lib/components/FormVisualizer/FormVisualizer.d.ts +5 -7
- package/lib/components/FormVisualizer/FormVisualizer.js +59 -46
- package/lib/components/HalfGauge/HalfGauge.js +87 -85
- package/lib/components/Highlight/Highlight.js +4 -4
- package/lib/components/ImageResize/ImageResize.d.ts +1 -1
- package/lib/components/ImageResize/ImageResize.js +123 -118
- package/lib/components/ImageResizeButton/ImageResizeButton.d.ts +1 -1
- package/lib/components/ImageResizeButton/ImageResizeButton.js +1 -1
- package/lib/components/Input/Input.js +2 -2
- package/lib/components/InputTags/InputTags.js +6 -7
- package/lib/components/MaterialButton/MaterialButton.d.ts +2 -4
- package/lib/components/MaterialButton/MaterialButton.js +50 -125
- package/lib/components/MonthPicker/MonthPicker.js +2 -2
- package/lib/components/OtpInput/OtpInput.tsx +77 -69
- package/lib/components/PercentageDisplay/PercentageDisplay.d.ts +1 -1
- package/lib/components/PercentageDisplay/PercentageDisplay.js +29 -54
- package/lib/components/Programa/PageCodeEasterEgg.js +41 -40
- package/lib/components/Programa/Programa.d.ts +18 -3
- package/lib/components/Programa/Programa.js +60 -7
- package/lib/components/Programa/Tab.ts +8 -0
- package/lib/components/Programa/TabNavigationRail.js +96 -0
- package/lib/components/Stepper/Stepper.d.ts +1 -1
- package/lib/components/Stepper/Stepper.js +222 -190
- package/lib/components/TablePicker/TablePicker.js +11 -6
- package/lib/components/TextToHtml/TextStyles.js +42 -42
- package/lib/components/TextToHtml/TextToHtml.js +102 -92
- package/lib/components/ThreadLog/ThreadLog.js +1 -1
- package/lib/components/UserCard/UserCard.js +6 -6
- package/lib/components/UtilAutoComplete/UtilAutoComplete.d.ts +3 -4
- package/lib/components/UtilAutoComplete/UtilAutoComplete.js +67 -9
- package/lib/components/UtilTextField/UtilTextField.d.ts +1 -1
- package/lib/components/UtilTextField/UtilTextField.js +18 -16
- package/lib/components/Zoom/Zoom.js +6 -3
- package/lib/utils/api.ts +1 -1
- package/lib/utils/index.ts +10 -96
- package/package.json +56 -56
- package/.gitlab-ci.yml +0 -21
- package/dist/components/Cam/cam.css +0 -8
- package/dist/components/ContactValidationInput/style.css +0 -10
- package/dist/components/Document/icons/ai.svg +0 -20
- package/dist/components/Document/icons/audio.svg +0 -16
- package/dist/components/Document/icons/avi.svg +0 -15
- package/dist/components/Document/icons/css.svg +0 -47
- package/dist/components/Document/icons/csv.svg +0 -37
- package/dist/components/Document/icons/dbf.svg +0 -30
- package/dist/components/Document/icons/doc.svg +0 -47
- package/dist/components/Document/icons/dwg.svg +0 -32
- package/dist/components/Document/icons/exe.svg +0 -20
- package/dist/components/Document/icons/file.svg +0 -11
- package/dist/components/Document/icons/fla.svg +0 -23
- package/dist/components/Document/icons/html.svg +0 -23
- package/dist/components/Document/icons/image.svg +0 -16
- package/dist/components/Document/icons/iso.svg +0 -40
- package/dist/components/Document/icons/jpg.svg +0 -33
- package/dist/components/Document/icons/js.svg +0 -40
- package/dist/components/Document/icons/json.svg +0 -45
- package/dist/components/Document/icons/mod.svg +0 -41
- package/dist/components/Document/icons/mp3.svg +0 -36
- package/dist/components/Document/icons/mp4.svg +0 -25
- package/dist/components/Document/icons/pdf.svg +0 -35
- package/dist/components/Document/icons/png.svg +0 -30
- package/dist/components/Document/icons/ppt.svg +0 -31
- package/dist/components/Document/icons/psd.svg +0 -50
- package/dist/components/Document/icons/rtf.svg +0 -35
- package/dist/components/Document/icons/search.svg +0 -20
- package/dist/components/Document/icons/svg.svg +0 -34
- package/dist/components/Document/icons/txt.svg +0 -29
- package/dist/components/Document/icons/video.svg +0 -17
- package/dist/components/Document/icons/xls.svg +0 -31
- package/dist/components/Document/icons/xml.svg +0 -25
- package/dist/components/Document/icons/zip.svg +0 -24
- package/dist/components/Document/icons/zip1.svg +0 -18
- package/dist/components/Editor/skins/content/dark/content.min.css +0 -1
- package/dist/components/Editor/skins/content/default/content.min.css +0 -1
- package/dist/components/Editor/skins/content/document/content.min.css +0 -1
- package/dist/components/Editor/skins/content/tinymce-5/content.min.css +0 -1
- package/dist/components/Editor/skins/content/tinymce-5-dark/content.min.css +0 -1
- package/dist/components/Editor/skins/content/writer/content.min.css +0 -1
- package/dist/components/Editor/skins/ui/oxide/content.inline.min.css +0 -1
- package/dist/components/Editor/skins/ui/oxide/content.min.css +0 -1
- package/dist/components/Editor/skins/ui/oxide/skin.min.css +0 -1
- package/dist/components/Editor/skins/ui/oxide/skin.shadowdom.min.css +0 -1
- package/dist/components/Editor/skins/ui/oxide-dark/content.inline.min.css +0 -1
- package/dist/components/Editor/skins/ui/oxide-dark/content.min.css +0 -1
- package/dist/components/Editor/skins/ui/oxide-dark/skin.min.css +0 -1
- package/dist/components/Editor/skins/ui/oxide-dark/skin.shadowdom.min.css +0 -1
- package/dist/components/Editor/skins/ui/tinymce-5/content.inline.min.css +0 -1
- package/dist/components/Editor/skins/ui/tinymce-5/content.min.css +0 -1
- package/dist/components/Editor/skins/ui/tinymce-5/skin.min.css +0 -1
- package/dist/components/Editor/skins/ui/tinymce-5/skin.shadowdom.min.css +0 -1
- package/dist/components/Editor/skins/ui/tinymce-5-dark/content.inline.min.css +0 -1
- package/dist/components/Editor/skins/ui/tinymce-5-dark/content.min.css +0 -1
- package/dist/components/Editor/skins/ui/tinymce-5-dark/skin.min.css +0 -1
- package/dist/components/Editor/skins/ui/tinymce-5-dark/skin.shadowdom.min.css +0 -1
- package/dist/components/Editor/tinymce/icons/default/icons.js +0 -194
- package/dist/components/Editor/tinymce/icons/default/icons.min.js +0 -1
- package/dist/components/Editor/tinymce/skins/content/dark/content.css +0 -66
- package/dist/components/Editor/tinymce/skins/content/dark/content.min.css +0 -2
- package/dist/components/Editor/tinymce/skins/content/default/content.css +0 -61
- package/dist/components/Editor/tinymce/skins/content/default/content.min.css +0 -2
- package/dist/components/Editor/tinymce/skins/content/document/content.css +0 -66
- package/dist/components/Editor/tinymce/skins/content/document/content.min.css +0 -2
- package/dist/components/Editor/tinymce/skins/content/tinymce-5/content.css +0 -61
- package/dist/components/Editor/tinymce/skins/content/tinymce-5/content.min.css +0 -2
- package/dist/components/Editor/tinymce/skins/content/tinymce-5-dark/content.css +0 -66
- package/dist/components/Editor/tinymce/skins/content/tinymce-5-dark/content.min.css +0 -2
- package/dist/components/Editor/tinymce/skins/content/writer/content.css +0 -62
- package/dist/components/Editor/tinymce/skins/content/writer/content.min.css +0 -2
- package/dist/components/Editor/tinymce/skins/ui/oxide/content.css +0 -785
- package/dist/components/Editor/tinymce/skins/ui/oxide/content.inline.css +0 -779
- package/dist/components/Editor/tinymce/skins/ui/oxide/content.inline.min.css +0 -2
- package/dist/components/Editor/tinymce/skins/ui/oxide/content.min.css +0 -2
- package/dist/components/Editor/tinymce/skins/ui/oxide/skin.css +0 -3763
- package/dist/components/Editor/tinymce/skins/ui/oxide/skin.min.css +0 -2
- package/dist/components/Editor/tinymce/skins/ui/oxide/skin.shadowdom.css +0 -30
- package/dist/components/Editor/tinymce/skins/ui/oxide/skin.shadowdom.min.css +0 -2
- package/dist/components/Editor/tinymce/skins/ui/oxide-dark/content.css +0 -766
- package/dist/components/Editor/tinymce/skins/ui/oxide-dark/content.inline.css +0 -779
- package/dist/components/Editor/tinymce/skins/ui/oxide-dark/content.inline.min.css +0 -2
- package/dist/components/Editor/tinymce/skins/ui/oxide-dark/content.min.css +0 -2
- package/dist/components/Editor/tinymce/skins/ui/oxide-dark/skin.css +0 -3766
- package/dist/components/Editor/tinymce/skins/ui/oxide-dark/skin.min.css +0 -2
- package/dist/components/Editor/tinymce/skins/ui/oxide-dark/skin.shadowdom.css +0 -30
- package/dist/components/Editor/tinymce/skins/ui/oxide-dark/skin.shadowdom.min.css +0 -2
- package/dist/components/Editor/tinymce/skins/ui/tinymce-5/content.css +0 -785
- package/dist/components/Editor/tinymce/skins/ui/tinymce-5/content.inline.css +0 -779
- package/dist/components/Editor/tinymce/skins/ui/tinymce-5/content.inline.min.css +0 -2
- package/dist/components/Editor/tinymce/skins/ui/tinymce-5/content.min.css +0 -2
- package/dist/components/Editor/tinymce/skins/ui/tinymce-5/skin.css +0 -3857
- package/dist/components/Editor/tinymce/skins/ui/tinymce-5/skin.min.css +0 -2
- package/dist/components/Editor/tinymce/skins/ui/tinymce-5/skin.shadowdom.css +0 -30
- package/dist/components/Editor/tinymce/skins/ui/tinymce-5/skin.shadowdom.min.css +0 -2
- package/dist/components/Editor/tinymce/skins/ui/tinymce-5-dark/content.css +0 -766
- package/dist/components/Editor/tinymce/skins/ui/tinymce-5-dark/content.inline.css +0 -779
- package/dist/components/Editor/tinymce/skins/ui/tinymce-5-dark/content.inline.min.css +0 -2
- package/dist/components/Editor/tinymce/skins/ui/tinymce-5-dark/content.min.css +0 -2
- package/dist/components/Editor/tinymce/skins/ui/tinymce-5-dark/skin.css +0 -3857
- package/dist/components/Editor/tinymce/skins/ui/tinymce-5-dark/skin.min.css +0 -2
- package/dist/components/Editor/tinymce/skins/ui/tinymce-5-dark/skin.shadowdom.css +0 -30
- package/dist/components/Editor/tinymce/skins/ui/tinymce-5-dark/skin.shadowdom.min.css +0 -2
- package/dist/components/Editor/tinymce/tinymce.d.ts +0 -3238
- package/dist/components/TextToHtml/icons/resize_area.svg +0 -2
- package/dist/components/TextToHtml/style.css +0 -40
- package/dist/components/Zoom/style.css +0 -25
- package/dist/types.d.ts +0 -164
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ClickAwayListener, IconButton
|
|
1
|
+
import { Box, ClickAwayListener, IconButton } from '@mui/material';
|
|
2
2
|
import React, { useState } from 'react';
|
|
3
3
|
import { RgbaColorPicker } from 'react-colorful';
|
|
4
4
|
import { RiAlignCenter, RiAlignJustify, RiAlignLeft, RiAlignRight, RiFontColor, RiFontSize } from 'react-icons/ri';
|
|
@@ -7,37 +7,38 @@ import { RiAlignCenter, RiAlignJustify, RiAlignLeft, RiAlignRight, RiFontColor,
|
|
|
7
7
|
const ICON_SIZE = '2.5rem';
|
|
8
8
|
const BOX_SHADOW = 'rgba(0, 0, 0, 0.3) 0px 1px 12px -2px';
|
|
9
9
|
|
|
10
|
-
const
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
}
|
|
28
|
-
},
|
|
29
|
-
colorPickerContainer: {
|
|
30
|
-
zIndex: 2,
|
|
31
|
-
position: 'absolute',
|
|
32
|
-
padding: '2rem'
|
|
33
|
-
},
|
|
34
|
-
colorPickerBoxShadow: {
|
|
35
|
-
borderRadius: 8,
|
|
36
|
-
webKitBoxShadow: BOX_SHADOW,
|
|
37
|
-
mozBoxShadow: BOX_SHADOW,
|
|
38
|
-
boxShadow: BOX_SHADOW
|
|
10
|
+
const containerSx = ({ defaultSpacing }) => ({
|
|
11
|
+
zIndex: 1,
|
|
12
|
+
position: 'absolute',
|
|
13
|
+
top: 0,
|
|
14
|
+
right: 0,
|
|
15
|
+
display: 'flex',
|
|
16
|
+
alignItems: 'flex-start',
|
|
17
|
+
justifyContent: 'flex-end',
|
|
18
|
+
gap: defaultSpacing ? defaultSpacing : ''
|
|
19
|
+
});
|
|
20
|
+
|
|
21
|
+
const buttonSx = ({ defaultSpacing }) => theme => ({
|
|
22
|
+
padding: defaultSpacing ? defaultSpacing / 2 : '',
|
|
23
|
+
color: `rgba(${theme.palette.mode === 'light' ? '0, 0, 0' : '255, 255, 255'}, .7)`,
|
|
24
|
+
backgroundColor: `rgba(${theme.palette.mode === 'light' ? '255, 255, 255' : '0, 0, 0'}, .5)`,
|
|
25
|
+
'&:hover': {
|
|
26
|
+
backgroundColor: `rgba(${theme.palette.mode === 'light' ? '255, 255, 255' : '0, 0, 0'}, .7)`
|
|
39
27
|
}
|
|
40
|
-
})
|
|
28
|
+
});
|
|
29
|
+
|
|
30
|
+
const colorPickerContainerSx = {
|
|
31
|
+
zIndex: 2,
|
|
32
|
+
position: 'absolute',
|
|
33
|
+
padding: '2rem'
|
|
34
|
+
};
|
|
35
|
+
|
|
36
|
+
const colorPickerBoxShadowSx = {
|
|
37
|
+
borderRadius: 8,
|
|
38
|
+
webKitBoxShadow: BOX_SHADOW,
|
|
39
|
+
mozBoxShadow: BOX_SHADOW,
|
|
40
|
+
boxShadow: BOX_SHADOW
|
|
41
|
+
};
|
|
41
42
|
|
|
42
43
|
|
|
43
44
|
const initialStateOpen = {
|
|
@@ -51,7 +52,6 @@ const initialState = {
|
|
|
51
52
|
|
|
52
53
|
const TextStyles = ({ color, setColor, defaultSpacing, toggleClickAway, handleFontSizeChange, textAlign, handleTextAlignChange }) => {
|
|
53
54
|
|
|
54
|
-
const classes = useStyles({ defaultSpacing });
|
|
55
55
|
const [state, setState] = useState(initialState);
|
|
56
56
|
const { open } = state;
|
|
57
57
|
|
|
@@ -72,8 +72,8 @@ const TextStyles = ({ color, setColor, defaultSpacing, toggleClickAway, handleFo
|
|
|
72
72
|
};
|
|
73
73
|
|
|
74
74
|
|
|
75
|
-
return <
|
|
76
|
-
<IconButton onClick={handleTextAlignChange} onTouchStart={handleTextAlignChange}
|
|
75
|
+
return <Box sx={containerSx({ defaultSpacing })}>
|
|
76
|
+
<IconButton onClick={handleTextAlignChange} onTouchStart={handleTextAlignChange} sx={buttonSx({ defaultSpacing })}>
|
|
77
77
|
{(() => {
|
|
78
78
|
switch (textAlign) {
|
|
79
79
|
case 'start':
|
|
@@ -89,23 +89,23 @@ const TextStyles = ({ color, setColor, defaultSpacing, toggleClickAway, handleFo
|
|
|
89
89
|
}
|
|
90
90
|
})()}
|
|
91
91
|
</IconButton>
|
|
92
|
-
<IconButton onClick={handleColorPickerOpen} onTouchStart={handleColorPickerOpen}
|
|
92
|
+
<IconButton onClick={handleColorPickerOpen} onTouchStart={handleColorPickerOpen} sx={buttonSx({ defaultSpacing })}>
|
|
93
93
|
<RiFontColor size={ICON_SIZE} />
|
|
94
94
|
</IconButton>
|
|
95
|
-
<IconButton onClick={handleFontSizeChange} onTouchStart={handleFontSizeChange}
|
|
95
|
+
<IconButton onClick={handleFontSizeChange} onTouchStart={handleFontSizeChange} sx={buttonSx({ defaultSpacing })}>
|
|
96
96
|
<RiFontSize size={ICON_SIZE} />
|
|
97
97
|
</IconButton>
|
|
98
98
|
{(!!open.colorPicker) && (
|
|
99
99
|
<ClickAwayListener disableReactTree onClickAway={handleColorPickerClose}>
|
|
100
|
-
<
|
|
101
|
-
<
|
|
100
|
+
<Box sx={colorPickerContainerSx}>
|
|
101
|
+
<Box sx={colorPickerBoxShadowSx}>
|
|
102
102
|
<RgbaColorPicker color={color} onChange={setColor} />
|
|
103
|
-
</
|
|
104
|
-
</
|
|
103
|
+
</Box>
|
|
104
|
+
</Box>
|
|
105
105
|
</ClickAwayListener>
|
|
106
106
|
)}
|
|
107
|
-
</
|
|
107
|
+
</Box>;
|
|
108
108
|
};
|
|
109
109
|
|
|
110
110
|
|
|
111
|
-
export default TextStyles;
|
|
111
|
+
export default TextStyles;
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import Cursor from './Cursor';
|
|
2
2
|
import TextStyles from './TextStyles';
|
|
3
3
|
import { translateKey } from './utils';
|
|
4
|
-
import { ClickAwayListener } from '@material
|
|
4
|
+
import { ClickAwayListener } from '@mui/material';
|
|
5
5
|
import { isEqual } from 'lodash';
|
|
6
6
|
import React, { forwardRef, useCallback, useEffect, useRef, useState } from 'react';
|
|
7
7
|
import './style.css';
|
|
8
8
|
|
|
9
9
|
|
|
10
|
-
const resizeStyle = {
|
|
11
|
-
resize: 'both',
|
|
12
|
-
overflow: 'auto'
|
|
10
|
+
const resizeStyle = {
|
|
11
|
+
resize: 'both',
|
|
12
|
+
overflow: 'auto'
|
|
13
13
|
};
|
|
14
14
|
|
|
15
15
|
|
|
@@ -18,43 +18,43 @@ const TEXT_TO_HTML_CURSOR_ID = 'text-to-html-cursor';
|
|
|
18
18
|
const TEXT_TO_HTML_TEXT_CONTAINER_ID = 'text-to-html-text-container';
|
|
19
19
|
|
|
20
20
|
|
|
21
|
-
export const initialStateCharacter = {
|
|
22
|
-
key: undefined,
|
|
23
|
-
keyCode: undefined,
|
|
24
|
-
code: undefined,
|
|
25
|
-
string: '',
|
|
26
|
-
dead: false,
|
|
27
|
-
shift: false,
|
|
28
|
-
mark: []
|
|
21
|
+
export const initialStateCharacter = {
|
|
22
|
+
key: undefined,
|
|
23
|
+
keyCode: undefined,
|
|
24
|
+
code: undefined,
|
|
25
|
+
string: '',
|
|
26
|
+
dead: false,
|
|
27
|
+
shift: false,
|
|
28
|
+
mark: []
|
|
29
29
|
};
|
|
30
30
|
|
|
31
31
|
export const initialStateCursor = { ...initialStateCharacter, string: 'cursor' };
|
|
32
32
|
|
|
33
33
|
export const textToHtmlInitialValue = { text: '', cssText: '', markedPeople: [], characters: [] };
|
|
34
34
|
|
|
35
|
-
const initialStateMove = {
|
|
36
|
-
isDown: false,
|
|
37
|
-
offset: []
|
|
35
|
+
const initialStateMove = {
|
|
36
|
+
isDown: false,
|
|
37
|
+
offset: []
|
|
38
38
|
};
|
|
39
39
|
|
|
40
40
|
const initialStateKeyboardRef = { altGraph: false };
|
|
41
41
|
|
|
42
|
-
const initialStateTextStyle = {
|
|
43
|
-
color: { r: 255, g: 255, b: 255, a: 1 },
|
|
44
|
-
textAlign: 'center',
|
|
45
|
-
fontSize: 2,
|
|
46
|
-
fontFamily: 'Roboto, Helvetica, Arial, sans-serif',
|
|
47
|
-
letterSpacing: '0.01em'
|
|
42
|
+
const initialStateTextStyle = {
|
|
43
|
+
color: { r: 255, g: 255, b: 255, a: 1 },
|
|
44
|
+
textAlign: 'center',
|
|
45
|
+
fontSize: 2,
|
|
46
|
+
fontFamily: 'Roboto, Helvetica, Arial, sans-serif',
|
|
47
|
+
letterSpacing: '0.01em'
|
|
48
48
|
};
|
|
49
49
|
|
|
50
|
-
const initialState = {
|
|
51
|
-
textStyle: initialStateTextStyle,
|
|
52
|
-
createCursorClick: false,
|
|
53
|
-
clickAway: undefined,
|
|
54
|
-
tap: 0,
|
|
55
|
-
resize: false,
|
|
56
|
-
move: initialStateMove,
|
|
57
|
-
characters: []
|
|
50
|
+
const initialState = {
|
|
51
|
+
textStyle: initialStateTextStyle,
|
|
52
|
+
createCursorClick: false,
|
|
53
|
+
clickAway: undefined,
|
|
54
|
+
tap: 0,
|
|
55
|
+
resize: false,
|
|
56
|
+
move: initialStateMove,
|
|
57
|
+
characters: []
|
|
58
58
|
};
|
|
59
59
|
|
|
60
60
|
|
|
@@ -64,17 +64,17 @@ const TextToHtml = ({ initialValue = textToHtmlInitialValue, onChange, onDelete,
|
|
|
64
64
|
const [state, setState] = useState(initialState);
|
|
65
65
|
const { createCursorClick, characters, move, resize, tap, textStyle } = state;
|
|
66
66
|
const { color, fontSize, fontFamily, textAlign, letterSpacing } = textStyle;
|
|
67
|
-
const propsRef = useRef({
|
|
68
|
-
onChange
|
|
67
|
+
const propsRef = useRef({
|
|
68
|
+
onChange
|
|
69
69
|
});
|
|
70
70
|
|
|
71
71
|
const cursor = characters.findIndex(({ string }) => (string === 'cursor'));
|
|
72
72
|
const canWrite = (cursor > -1);
|
|
73
73
|
|
|
74
74
|
|
|
75
|
-
const logicSetState = ({ type, field, value }) => setState(values => ({
|
|
76
|
-
...values,
|
|
77
|
-
[type]: (type && field) ? { ...values[type], [field]: value } : value
|
|
75
|
+
const logicSetState = ({ type, field, value }) => setState(values => ({
|
|
76
|
+
...values,
|
|
77
|
+
[type]: (type && field) ? { ...values[type], [field]: value } : value
|
|
78
78
|
}));
|
|
79
79
|
|
|
80
80
|
|
|
@@ -158,7 +158,9 @@ const TextToHtml = ({ initialValue = textToHtmlInitialValue, onChange, onDelete,
|
|
|
158
158
|
(initialValue.cssText) && setStyleFromInitialValue(initialValue.cssText);
|
|
159
159
|
(initialValue.characters) && setCharacters(initialValue.characters);
|
|
160
160
|
}, [setCharacters]);
|
|
161
|
-
useEffect(() =>
|
|
161
|
+
useEffect(() => {
|
|
162
|
+
loadInitialValue(initialValue);
|
|
163
|
+
}, [initialValue, loadInitialValue]);
|
|
162
164
|
|
|
163
165
|
const handleKeyDown = (e) => {
|
|
164
166
|
|
|
@@ -216,14 +218,14 @@ const TextToHtml = ({ initialValue = textToHtmlInitialValue, onChange, onDelete,
|
|
|
216
218
|
else {
|
|
217
219
|
const { string, before } = translateKey({ key, keyCode, code, shift, altGraph: keyboardRef.current.altGraph, capsLock, before: characterBeforeCursor });
|
|
218
220
|
if (string) {
|
|
219
|
-
newCharacter = {
|
|
220
|
-
...initialStateCharacter,
|
|
221
|
-
key,
|
|
222
|
-
keyCode,
|
|
223
|
-
code,
|
|
224
|
-
string,
|
|
225
|
-
dead: before.dead,
|
|
226
|
-
shift
|
|
221
|
+
newCharacter = {
|
|
222
|
+
...initialStateCharacter,
|
|
223
|
+
key,
|
|
224
|
+
keyCode,
|
|
225
|
+
code,
|
|
226
|
+
string,
|
|
227
|
+
dead: before.dead,
|
|
228
|
+
shift
|
|
227
229
|
};
|
|
228
230
|
|
|
229
231
|
newCharacters.splice(cursor, 0, newCharacter);
|
|
@@ -265,16 +267,16 @@ const TextToHtml = ({ initialValue = textToHtmlInitialValue, onChange, onDelete,
|
|
|
265
267
|
if (!element) return;
|
|
266
268
|
const clientX = (e.clientX || e.touches[0].clientX);
|
|
267
269
|
const clientY = (e.clientY || e.touches[0].clientY);
|
|
268
|
-
logicSetState({
|
|
269
|
-
type: 'move',
|
|
270
|
-
value: {
|
|
271
|
-
...move,
|
|
272
|
-
isDown: true,
|
|
270
|
+
logicSetState({
|
|
271
|
+
type: 'move',
|
|
272
|
+
value: {
|
|
273
|
+
...move,
|
|
274
|
+
isDown: true,
|
|
273
275
|
offset: [
|
|
274
|
-
element.offsetLeft - clientX,
|
|
276
|
+
element.offsetLeft - clientX,
|
|
275
277
|
element.offsetTop - clientY
|
|
276
278
|
]
|
|
277
|
-
}
|
|
279
|
+
}
|
|
278
280
|
});
|
|
279
281
|
};
|
|
280
282
|
|
|
@@ -351,7 +353,9 @@ const TextToHtml = ({ initialValue = textToHtmlInitialValue, onChange, onDelete,
|
|
|
351
353
|
}
|
|
352
354
|
}
|
|
353
355
|
}, []);
|
|
354
|
-
useEffect(() =>
|
|
356
|
+
useEffect(() => {
|
|
357
|
+
changeStyles({ resize });
|
|
358
|
+
}, [resize, changeStyles]);
|
|
355
359
|
|
|
356
360
|
const createHtmlString = useCallback(() => {
|
|
357
361
|
const element = document.getElementById(TEXT_TO_HTML_ID);
|
|
@@ -370,55 +374,61 @@ const TextToHtml = ({ initialValue = textToHtmlInitialValue, onChange, onDelete,
|
|
|
370
374
|
return { htmlString };
|
|
371
375
|
}
|
|
372
376
|
}, [characters, ref]);
|
|
373
|
-
useEffect(() =>
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
377
|
+
useEffect(() => {
|
|
378
|
+
createHtmlString();
|
|
379
|
+
}, [characters, createHtmlString]);
|
|
380
|
+
|
|
381
|
+
|
|
382
|
+
useEffect(() => {
|
|
383
|
+
ref.current = {
|
|
384
|
+
...ref.current,
|
|
385
|
+
...state,
|
|
386
|
+
clickAway,
|
|
387
|
+
focusToWrite,
|
|
388
|
+
createCursor,
|
|
389
|
+
setCharacters,
|
|
390
|
+
createHtmlString,
|
|
391
|
+
setExternalValues
|
|
392
|
+
};
|
|
385
393
|
}, [ref, state, setCharacters, createCursor, createHtmlString, clickAway, setExternalValues]);
|
|
386
394
|
|
|
387
395
|
const updateExternalValues = ({ state, setExternalValues }) => {
|
|
388
396
|
setExternalValues && setExternalValues(state);
|
|
389
397
|
};
|
|
390
|
-
useEffect(() =>
|
|
398
|
+
useEffect(() => {
|
|
399
|
+
updateExternalValues({ state, setExternalValues });
|
|
400
|
+
}, [state, setExternalValues]);
|
|
391
401
|
|
|
392
402
|
|
|
393
403
|
return <div className='text-to-html-container'>
|
|
394
404
|
{(canWrite) && (
|
|
395
|
-
<TextStyles
|
|
396
|
-
setColor={value => logicSetState({ type: 'textStyle', field: 'color', value })}
|
|
397
|
-
{...{ color, defaultSpacing, toggleClickAway, handleFontSizeChange, textAlign, handleTextAlignChange }}
|
|
405
|
+
<TextStyles
|
|
406
|
+
setColor={value => logicSetState({ type: 'textStyle', field: 'color', value })}
|
|
407
|
+
{...{ color, defaultSpacing, toggleClickAway, handleFontSizeChange, textAlign, handleTextAlignChange }}
|
|
398
408
|
/>
|
|
399
409
|
)}
|
|
400
410
|
<div id={TEXT_TO_HTML_TEXT_CONTAINER_ID} onClick={handleContainerClick} className='text-to-html-text-container'>
|
|
401
411
|
<ClickAwayListener mouseEvent={state.clickAway} touchEvent={state.clickAway} disableReactTree onClickAway={handleClickAway}>
|
|
402
|
-
<div
|
|
403
|
-
id={TEXT_TO_HTML_ID}
|
|
404
|
-
tabIndex={0}
|
|
405
|
-
onKeyDown={handleKeyDown}
|
|
406
|
-
onKeyUp={handleKeyUp}
|
|
407
|
-
onMouseDown={handleMouseDownTouchStart}
|
|
408
|
-
onMouseUp={handleMouseUpTouchEnd}
|
|
409
|
-
onMouseMove={handleMouseTouchMove}
|
|
410
|
-
onTouchStart={handleMouseDownTouchStart}
|
|
411
|
-
onTouchEnd={handleMouseUpTouchEnd}
|
|
412
|
-
onTouchMove={handleMouseTouchMove}
|
|
413
|
-
onClick={handleClick}
|
|
414
|
-
onDoubleClick={handleDoubleClick}
|
|
415
|
-
style={{
|
|
416
|
-
color: (color) ? `rgba(${color.r}, ${color.g}, ${color.b}, ${color.a})` : 'inherit',
|
|
417
|
-
textAlign: (textAlign) ? textAlign : 'inherit',
|
|
418
|
-
fontSize: (fontSize) ? `${fontSize}rem` : '1rem',
|
|
419
|
-
fontFamily: (fontFamily) ? fontFamily : 'inherit',
|
|
420
|
-
letterSpacing: (letterSpacing) ? letterSpacing : 'inherit'
|
|
421
|
-
}}
|
|
412
|
+
<div
|
|
413
|
+
id={TEXT_TO_HTML_ID}
|
|
414
|
+
tabIndex={0}
|
|
415
|
+
onKeyDown={handleKeyDown}
|
|
416
|
+
onKeyUp={handleKeyUp}
|
|
417
|
+
onMouseDown={handleMouseDownTouchStart}
|
|
418
|
+
onMouseUp={handleMouseUpTouchEnd}
|
|
419
|
+
onMouseMove={handleMouseTouchMove}
|
|
420
|
+
onTouchStart={handleMouseDownTouchStart}
|
|
421
|
+
onTouchEnd={handleMouseUpTouchEnd}
|
|
422
|
+
onTouchMove={handleMouseTouchMove}
|
|
423
|
+
onClick={handleClick}
|
|
424
|
+
onDoubleClick={handleDoubleClick}
|
|
425
|
+
style={{
|
|
426
|
+
color: (color) ? `rgba(${color.r}, ${color.g}, ${color.b}, ${color.a})` : 'inherit',
|
|
427
|
+
textAlign: (textAlign) ? textAlign : 'inherit',
|
|
428
|
+
fontSize: (fontSize) ? `${fontSize}rem` : '1rem',
|
|
429
|
+
fontFamily: (fontFamily) ? fontFamily : 'inherit',
|
|
430
|
+
letterSpacing: (letterSpacing) ? letterSpacing : 'inherit'
|
|
431
|
+
}}
|
|
422
432
|
className='text-to-html'
|
|
423
433
|
>
|
|
424
434
|
<p>
|
|
@@ -428,10 +438,10 @@ const TextToHtml = ({ initialValue = textToHtmlInitialValue, onChange, onDelete,
|
|
|
428
438
|
return <Cursor key={`${stringIndex}-${string}`} id={TEXT_TO_HTML_CURSOR_ID} className='text-to-html-cursor' />;
|
|
429
439
|
default:
|
|
430
440
|
return (string) ? (
|
|
431
|
-
<span
|
|
432
|
-
key={`${stringIndex}-${string}`}
|
|
433
|
-
style={{
|
|
434
|
-
textDecoration: (dead || mark?.length) ? 'underline' : ''
|
|
441
|
+
<span
|
|
442
|
+
key={`${stringIndex}-${string}`}
|
|
443
|
+
style={{
|
|
444
|
+
textDecoration: (dead || mark?.length) ? 'underline' : ''
|
|
435
445
|
}}
|
|
436
446
|
>
|
|
437
447
|
{string}
|
|
@@ -447,4 +457,4 @@ const TextToHtml = ({ initialValue = textToHtmlInitialValue, onChange, onDelete,
|
|
|
447
457
|
};
|
|
448
458
|
|
|
449
459
|
|
|
450
|
-
export default forwardRef(TextToHtml);
|
|
460
|
+
export default forwardRef(TextToHtml);
|
|
@@ -4,7 +4,7 @@ import SimpleTable from '../../components/SimpleTable';
|
|
|
4
4
|
import { setField } from '../../fieldsRedux';
|
|
5
5
|
import { getConfig } from '../../utils/config';
|
|
6
6
|
import { sqlDateToReadableDate } from '../../utils/date';
|
|
7
|
-
import { IconButton } from '@material
|
|
7
|
+
import { IconButton } from '@mui/material';
|
|
8
8
|
import PropTypes from 'prop-types';
|
|
9
9
|
import React, { Component } from 'react';
|
|
10
10
|
import { FaAngleLeft, FaPrint } from 'react-icons/fa';
|
|
@@ -2,7 +2,7 @@ import { ArgousAvatar } from '../';
|
|
|
2
2
|
import { setAnotherProgramField } from '../../fieldsRedux';
|
|
3
3
|
import { useStore } from '../../utils';
|
|
4
4
|
import { serverAction } from '../../utils/api';
|
|
5
|
-
import { Card, Typography, Grid, Button, Portal, Popper } from '@material
|
|
5
|
+
import { Card, Typography, Grid, Button, Portal, Popper } from '@mui/material';
|
|
6
6
|
import React, { useState, useEffect, useRef, useCallback } from 'react';
|
|
7
7
|
import { IoIosCall } from 'react-icons/io';
|
|
8
8
|
import { MdMail, MdMessage } from 'react-icons/md';
|
|
@@ -100,10 +100,10 @@ function UserCard({ anchor, userId }) {
|
|
|
100
100
|
>
|
|
101
101
|
<Card variant='outlined' style={{ padding: '10px', maxWidth: '350px' }}>
|
|
102
102
|
<Grid container spacing={1}>
|
|
103
|
-
<Grid
|
|
103
|
+
<Grid size='auto'>
|
|
104
104
|
<ArgousAvatar style={{ width: '50px', height: '50px', margin: '10px' }} nome={data.dsNomeUsuario} idUsuario={userId || local.userId} />
|
|
105
105
|
</Grid>
|
|
106
|
-
<Grid
|
|
106
|
+
<Grid size='auto'>
|
|
107
107
|
<Typography variant='h6' style={{ overflow: 'hidden', width: '250px', textOverflow: 'ellipsis', whiteSpace: 'nowrap' }}>{data.dsNomeUsuario}</Typography>
|
|
108
108
|
<Typography variant='body2' style={{ width: '250px' }}>{data.dsFuncaoUsuario}</Typography>
|
|
109
109
|
<Typography variant='caption' style={{ width: '250px' }}>{data.dsSetor}</Typography>
|
|
@@ -112,14 +112,14 @@ function UserCard({ anchor, userId }) {
|
|
|
112
112
|
((userId && (loggedUserId !== userId)) || (local.userId && (loggedUserId !== local.userId))) && (
|
|
113
113
|
<React.Fragment>
|
|
114
114
|
{(data.nrRamalUsuario) && (
|
|
115
|
-
<Grid
|
|
115
|
+
<Grid size='grow'>
|
|
116
116
|
<Button fullWidth variant='contained' href={`tel: ${data.nrRamalUsuario}`} title={`Ramal: ${data.nrRamalUsuario}`}><IoIosCall/> {data.nrRamalUsuario}</Button>
|
|
117
117
|
</Grid>
|
|
118
118
|
)}
|
|
119
|
-
<Grid
|
|
119
|
+
<Grid size='grow'>
|
|
120
120
|
<Button fullWidth variant='contained' href={`mailto: ${data.dsEmailUsuario}`} title={data.dsEmailUsuario}><MdMail/> Email</Button>
|
|
121
121
|
</Grid>
|
|
122
|
-
<Grid
|
|
122
|
+
<Grid size='grow'>
|
|
123
123
|
<Button fullWidth variant='contained' onClick={() => setAnotherProgramField('janelaChatOpen', returnUser(), 'argousSystem')} title='Abrir chat de conversa'><MdMessage/> Mensagem</Button>
|
|
124
124
|
</Grid>
|
|
125
125
|
</React.Fragment>
|
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
import { TextFieldProps } from '@material
|
|
2
|
-
import { AutocompleteProps, AutocompleteChangeDetails } from '@material-ui/lab';
|
|
1
|
+
import { TextFieldProps, AutocompleteProps, AutocompleteChangeDetails } from '@mui/material';
|
|
3
2
|
import * as React from 'react';
|
|
4
3
|
|
|
5
|
-
export interface UtilAutoCompleteProps extends Omit<AutocompleteProps<any, false, false, false>, 'getOptionLabel'>{
|
|
4
|
+
export interface UtilAutoCompleteProps extends Omit<AutocompleteProps<any, false, false, false>, 'getOptionLabel' | 'onChange'>{
|
|
6
5
|
/**
|
|
7
6
|
* Tipo de autocomplete
|
|
8
7
|
*/
|
|
@@ -94,4 +93,4 @@ export interface UtilAutoCompleteProps extends Omit<AutocompleteProps<any, false
|
|
|
94
93
|
|
|
95
94
|
declare function UtilAutoComplete(props: UtilAutoCompleteProps): JSX.Element
|
|
96
95
|
|
|
97
|
-
export default UtilAutoComplete;
|
|
96
|
+
export default UtilAutoComplete;
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { formataNome } from '../../utils';
|
|
2
2
|
import { serverAction } from '../../utils/api';
|
|
3
|
-
import { TextField } from '@material
|
|
4
|
-
import { Autocomplete } from '@material-ui/lab';
|
|
3
|
+
import { TextField, Autocomplete } from '@mui/material';
|
|
5
4
|
import { isArray, isObject, isString } from 'lodash';
|
|
6
5
|
import React, { useState, useEffect, useCallback } from 'react';
|
|
7
6
|
// import PropTypes from 'prop-types';
|
|
@@ -69,10 +68,48 @@ const retornaType = type => {
|
|
|
69
68
|
}
|
|
70
69
|
};
|
|
71
70
|
|
|
72
|
-
const UtilAutoComplete = ({
|
|
71
|
+
const UtilAutoComplete = ({
|
|
72
|
+
type = '',
|
|
73
|
+
label,
|
|
74
|
+
value,
|
|
75
|
+
textFieldProps = {},
|
|
76
|
+
onChange = e => e,
|
|
77
|
+
excluidos,
|
|
78
|
+
idEmpresa,
|
|
79
|
+
cdEstado,
|
|
80
|
+
cdUnimed,
|
|
81
|
+
getOptionLabel,
|
|
82
|
+
pgCode = 'BuscasHelper',
|
|
83
|
+
action,
|
|
84
|
+
busca,
|
|
85
|
+
resposta,
|
|
86
|
+
searchParams,
|
|
87
|
+
filterFunction,
|
|
88
|
+
forceUpdate,
|
|
89
|
+
readOnly,
|
|
90
|
+
ListboxComponent,
|
|
91
|
+
ListboxProps,
|
|
92
|
+
PaperComponent,
|
|
93
|
+
PopperComponent,
|
|
94
|
+
ChipProps,
|
|
95
|
+
renderTags,
|
|
96
|
+
renderValue,
|
|
97
|
+
slots = {},
|
|
98
|
+
slotProps = {},
|
|
99
|
+
...props
|
|
100
|
+
}) => {
|
|
73
101
|
const [open, setOpen] = useState(false);
|
|
74
102
|
const [lista, setLista] = useState([]);
|
|
75
103
|
const [inputValue, setInputValue] = useState('');
|
|
104
|
+
const {
|
|
105
|
+
FormHelperTextProps,
|
|
106
|
+
InputLabelProps,
|
|
107
|
+
InputProps,
|
|
108
|
+
inputProps,
|
|
109
|
+
SelectProps,
|
|
110
|
+
slotProps: textFieldSlotProps = {},
|
|
111
|
+
...resolvedTextFieldProps
|
|
112
|
+
} = textFieldProps;
|
|
76
113
|
|
|
77
114
|
const buscar = useCallback(async valor => {
|
|
78
115
|
const res = await serverAction(action || retornaType(type).action, { [busca || retornaType(type)?.busca || 'value']: valor || inputValue, excluidos, idEmpresa, cdEstado, cdUnimed, ...searchParams }, true, pgCode);
|
|
@@ -97,7 +134,7 @@ const UtilAutoComplete = ({ type = '', label, value, textFieldProps = {}, onChan
|
|
|
97
134
|
onClose={() => setOpen(false)}
|
|
98
135
|
disableClearable={readOnly}
|
|
99
136
|
options={isObject(value) ? lista.filter(v => filterFunction ? filterFunction(v, value) : true || v[0] !== value[0]) : lista}
|
|
100
|
-
|
|
137
|
+
isOptionEqualToValue={(o, v) => o[0] === (isArray(v) ? v[0] : v)}
|
|
101
138
|
getOptionLabel={getOptionLabel ? (option => getOptionLabel(option, lista)) : (option => retornaType(type).getLabel(option, lista)) }
|
|
102
139
|
noOptionsText={inputValue.length < 2 ? 'Digite para pesquisar' : 'Não Encontrado'}
|
|
103
140
|
clearText='Limpar'
|
|
@@ -108,16 +145,37 @@ const UtilAutoComplete = ({ type = '', label, value, textFieldProps = {}, onChan
|
|
|
108
145
|
autoHighlight
|
|
109
146
|
{...{ value, onChange }}
|
|
110
147
|
{...props}
|
|
148
|
+
renderValue={renderValue || renderTags}
|
|
149
|
+
slots={{
|
|
150
|
+
...(PaperComponent ? { paper: PaperComponent } : {}),
|
|
151
|
+
...(PopperComponent ? { popper: PopperComponent } : {}),
|
|
152
|
+
...slots
|
|
153
|
+
}}
|
|
154
|
+
slotProps={{
|
|
155
|
+
...slotProps,
|
|
156
|
+
chip: { ...ChipProps, ...slotProps.chip },
|
|
157
|
+
listbox: {
|
|
158
|
+
...(ListboxComponent ? { component: ListboxComponent } : {}),
|
|
159
|
+
...ListboxProps,
|
|
160
|
+
...slotProps.listbox
|
|
161
|
+
}
|
|
162
|
+
}}
|
|
111
163
|
renderInput={params => (
|
|
112
164
|
<TextField
|
|
113
165
|
margin='dense'
|
|
114
166
|
variant='outlined'
|
|
115
167
|
label={label || retornaType(type).label}
|
|
116
168
|
{...params}
|
|
117
|
-
{...
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
169
|
+
{...resolvedTextFieldProps}
|
|
170
|
+
slotProps={{
|
|
171
|
+
...textFieldSlotProps,
|
|
172
|
+
...params.slotProps,
|
|
173
|
+
formHelperText: { ...FormHelperTextProps, ...textFieldSlotProps.formHelperText, ...params.slotProps.formHelperText },
|
|
174
|
+
input: { ...InputProps, ...textFieldSlotProps.input, ...params.slotProps.input },
|
|
175
|
+
inputLabel: { ...InputLabelProps, ...textFieldSlotProps.inputLabel, ...params.slotProps.inputLabel },
|
|
176
|
+
htmlInput: { ...inputProps, ...textFieldSlotProps.htmlInput, ...params.slotProps.htmlInput, readOnly },
|
|
177
|
+
select: { ...SelectProps, ...textFieldSlotProps.select, ...params.slotProps.select }
|
|
178
|
+
}} />
|
|
121
179
|
)}
|
|
122
180
|
/>
|
|
123
181
|
);
|
|
@@ -135,4 +193,4 @@ const UtilAutoComplete = ({ type = '', label, value, textFieldProps = {}, onChan
|
|
|
135
193
|
// getOptionLabel: PropTypes.func
|
|
136
194
|
// }
|
|
137
195
|
|
|
138
|
-
export default UtilAutoComplete;
|
|
196
|
+
export default UtilAutoComplete;
|