argous 1.2.247 → 1.3.3

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.
Files changed (226) hide show
  1. package/dist/api/WebSocket.d.ts +18 -10
  2. package/dist/api/WebSocket.js +26 -18
  3. package/dist/api/index.js +54 -43
  4. package/dist/api/ws.d.ts +1 -1
  5. package/dist/api/ws.js +44 -3
  6. package/dist/components/Alert/Alert.js +17 -7
  7. package/dist/components/ArgousAction/ArgousAction.js +17 -7
  8. package/dist/components/ArgousAvatar/ArgousAvatar.d.ts +1 -1
  9. package/dist/components/ArgousAvatar/ArgousAvatar.js +44 -60
  10. package/dist/components/ArgousComplexPagination/ArgousComplexPagination.d.ts +1 -1
  11. package/dist/components/ArgousComplexPagination/ArgousComplexPagination.js +107 -81
  12. package/dist/components/ArgousComplexTable/ArgousComplexTable.d.ts +1 -1
  13. package/dist/components/ArgousComplexTable/ArgousComplexTable.js +39 -52
  14. package/dist/components/ArgousComplexTableBody/ArgousComplexTableBody.d.ts +1 -1
  15. package/dist/components/ArgousComplexTableBody/ArgousComplexTableBody.js +119 -97
  16. package/dist/components/ArgousComplexTableBody/DragAndDrop.d.ts +37 -0
  17. package/dist/components/ArgousComplexTableBody/DragAndDrop.js +156 -0
  18. package/dist/components/ArgousComplexTableHead/ArgousComplexTableHead.js +64 -47
  19. package/dist/components/ArgousComplexTableToolbar/ArgousComplexTableToolBar.js +55 -37
  20. package/dist/components/ArgousInput/ArgousInput.js +19 -9
  21. package/dist/components/ArgousPagination/ArgousPagination.js +18 -11
  22. package/dist/components/ArgousProgressBar/ArgousProgressBar.js +64 -74
  23. package/dist/components/ArgousSimpleTable/ArgousSimpleTable.js +28 -22
  24. package/dist/components/AutoComplete/AutoComplete.js +18 -9
  25. package/dist/components/AutoCompleteFavorites/AutoCompleteFavorites.d.ts +3 -4
  26. package/dist/components/AutoCompleteFavorites/AutoCompleteFavorites.js +226 -174
  27. package/dist/components/BarChart/BarChart.js +17 -7
  28. package/dist/components/BarraFerramentas/BarraFerramentas.js +119 -105
  29. package/dist/components/Button/Button.js +17 -7
  30. package/dist/components/Cabecalho/Cabecalho.js +17 -7
  31. package/dist/components/Calendar/Calendar.js +24 -41
  32. package/dist/components/Cam/Cam.js +19 -9
  33. package/dist/components/Carousel/Carousel.js +113 -103
  34. package/dist/components/CartaoUsuario/CartaoUsuario.js +36 -26
  35. package/dist/components/Collapse/Collapse.d.ts +3 -3
  36. package/dist/components/Collapse/Collapse.js +121 -71
  37. package/dist/components/Compartilhar/Compartilhar.js +70 -65
  38. package/dist/components/ConfirmModal/BasicModal.d.ts +1 -1
  39. package/dist/components/ConfirmModal/BasicModal.js +8 -8
  40. package/dist/components/ConfirmModal/ModalProvider.d.ts +12 -1
  41. package/dist/components/ConfirmModal/ModalProvider.js +17 -7
  42. package/dist/components/ConfirmModal/WrapperModal.d.ts +2 -2
  43. package/dist/components/ConfirmModal/WrapperModal.js +5 -5
  44. package/dist/components/ContactValidationInput/ContactValidationInput.d.ts +1 -1
  45. package/dist/components/ContactValidationInput/ContactValidationInput.js +105 -80
  46. package/dist/components/ContactValidationInput/SealModal.d.ts +1 -1
  47. package/dist/components/ContactValidationInput/SealModal.js +13 -20
  48. package/dist/components/Document/Icons.d.ts +2 -2
  49. package/dist/components/Document/Icons.js +33 -16
  50. package/dist/components/Document/ModalVisualizacaoDocumentos.d.ts +1 -1
  51. package/dist/components/Document/ModalVisualizacaoDocumentos.js +33 -17
  52. package/dist/components/Document/Visualizacao.d.ts +1 -1
  53. package/dist/components/Document/Visualizacao.js +48 -34
  54. package/dist/components/DropArea/DropArea.js +27 -12
  55. package/dist/components/DropArea/Html5FileSelector.js +6 -7
  56. package/dist/components/Editor/ScriptLoader2.d.ts +1 -1
  57. package/dist/components/Editor/ScriptLoader2.js +2 -2
  58. package/dist/components/Editor/Utils.d.ts +3 -3
  59. package/dist/components/Editor/Utils.js +2 -2
  60. package/dist/components/Editor/components/Editor.d.ts +1 -1
  61. package/dist/components/Editor/components/Editor.js +18 -9
  62. package/dist/components/Editor/components/EditorPropTypes.js +17 -7
  63. package/dist/components/FilePreparer/FilePreparer.d.ts +1 -1
  64. package/dist/components/FilePreparer/FilePreparer.js +105 -88
  65. package/dist/components/FileUploader/FileUploader.js +33 -22
  66. package/dist/components/FormVisualizer/FormVisualizer.d.ts +5 -7
  67. package/dist/components/FormVisualizer/FormVisualizer.js +92 -61
  68. package/dist/components/HalfGauge/HalfGauge.js +87 -135
  69. package/dist/components/Highlight/Highlight.js +23 -12
  70. package/dist/components/ImageResize/ImageResize.d.ts +1 -1
  71. package/dist/components/ImageResize/ImageResize.js +79 -85
  72. package/dist/components/ImageResizeButton/ImageResizeButton.d.ts +1 -1
  73. package/dist/components/ImageResizeButton/ImageResizeButton.js +19 -9
  74. package/dist/components/Input/Input.js +19 -9
  75. package/dist/components/InputTags/InputTags.js +22 -13
  76. package/dist/components/ListSelect/ListSelect.js +17 -7
  77. package/dist/components/MaterialButton/MaterialButton.d.ts +2 -4
  78. package/dist/components/MaterialButton/MaterialButton.js +56 -125
  79. package/dist/components/MenuBar/MenuBar.js +17 -7
  80. package/dist/components/MonthPicker/MonthPicker.js +20 -10
  81. package/dist/components/MultipleSelect/MultipleSelect.js +17 -7
  82. package/dist/components/OtpInput/OtpInput.d.ts +1 -1
  83. package/dist/components/OtpInput/OtpInput.js +71 -58
  84. package/dist/components/OutputText/OutputText.js +17 -7
  85. package/dist/components/Pagination/Pagination.js +17 -7
  86. package/dist/components/PercentageDisplay/PercentageDisplay.d.ts +1 -1
  87. package/dist/components/PercentageDisplay/PercentageDisplay.js +24 -92
  88. package/dist/components/Programa/PageCodeEasterEgg.d.ts +5 -4
  89. package/dist/components/Programa/PageCodeEasterEgg.js +41 -32
  90. package/dist/components/Programa/Programa.d.ts +2 -2
  91. package/dist/components/Programa/Programa.js +50 -28
  92. package/dist/components/Programa/Tab.d.ts +2 -2
  93. package/dist/components/Programa/TabNavigationRail.d.ts +3 -3
  94. package/dist/components/Programa/TabNavigationRail.js +13 -55
  95. package/dist/components/ProgressBar/ProgressBar.js +17 -7
  96. package/dist/components/Select/Select.js +17 -7
  97. package/dist/components/SimpleTable/SimpleTable.js +17 -7
  98. package/dist/components/Stepper/Stepper.d.ts +1 -1
  99. package/dist/components/Stepper/Stepper.js +194 -179
  100. package/dist/components/TablePicker/TablePicker.js +37 -12
  101. package/dist/components/Tabs/Tabs.js +17 -7
  102. package/dist/components/TextArea/TextArea.js +17 -7
  103. package/dist/components/TextToHtml/Cursor.d.ts +1 -1
  104. package/dist/components/TextToHtml/Cursor.js +17 -7
  105. package/dist/components/TextToHtml/TextStyles.d.ts +1 -1
  106. package/dist/components/TextToHtml/TextStyles.js +51 -44
  107. package/dist/components/TextToHtml/TextToHtml.js +37 -17
  108. package/dist/components/ThreadLog/ThreadLog.js +19 -9
  109. package/dist/components/UserCard/UserCard.js +36 -26
  110. package/dist/components/UtilAutoComplete/UtilAutoComplete.d.ts +3 -4
  111. package/dist/components/UtilAutoComplete/UtilAutoComplete.js +26 -16
  112. package/dist/components/UtilTextField/UtilTextField.d.ts +1 -1
  113. package/dist/components/UtilTextField/UtilTextField.js +26 -14
  114. package/dist/components/Zoom/Zoom.js +23 -24
  115. package/dist/fieldsRedux/createField.js +17 -7
  116. package/dist/fieldsRedux/fieldsRedux.js +19 -9
  117. package/dist/fieldsRedux/passFields.js +17 -7
  118. package/dist/reducers/index.d.ts +98 -2
  119. package/dist/utils/api.js +32 -15
  120. package/dist/utils/config.js +2 -3
  121. package/dist/utils/index.d.ts +3 -3
  122. package/dist/utils/index.js +68 -54
  123. package/dist/utils/store.js +2 -3
  124. package/lib/api/WebSocket.js +11 -12
  125. package/lib/api/index.js +14 -14
  126. package/lib/api/ws.js +48 -4
  127. package/lib/components/ArgousAvatar/ArgousAvatar.d.ts +1 -1
  128. package/lib/components/ArgousAvatar/ArgousAvatar.js +20 -54
  129. package/lib/components/ArgousComplexPagination/ArgousComplexPagination.d.ts +1 -1
  130. package/lib/components/ArgousComplexPagination/ArgousComplexPagination.js +50 -25
  131. package/lib/components/ArgousComplexTable/ArgousComplexTable.d.ts +1 -1
  132. package/lib/components/ArgousComplexTable/ArgousComplexTable.js +15 -15
  133. package/lib/components/ArgousComplexTableBody/ArgousComplexTableBody.d.ts +1 -1
  134. package/lib/components/ArgousComplexTableBody/ArgousComplexTableBody.js +121 -106
  135. package/lib/components/ArgousComplexTableBody/DragAndDrop.js +85 -0
  136. package/lib/components/ArgousComplexTableHead/ArgousComplexTableHead.js +60 -51
  137. package/lib/components/ArgousComplexTableToolbar/ArgousComplexTableToolBar.js +21 -12
  138. package/lib/components/ArgousInput/ArgousInput.js +2 -2
  139. package/lib/components/ArgousPagination/ArgousPagination.js +12 -4
  140. package/lib/components/ArgousProgressBar/ArgousProgressBar.js +67 -78
  141. package/lib/components/ArgousSimpleTable/ArgousSimpleTable.js +12 -18
  142. package/lib/components/AutoComplete/AutoComplete.js +2 -3
  143. package/lib/components/AutoCompleteFavorites/AutoCompleteFavorites.d.ts +3 -4
  144. package/lib/components/AutoCompleteFavorites/AutoCompleteFavorites.js +174 -108
  145. package/lib/components/BarraFerramentas/BarraFerramentas.js +32 -21
  146. package/lib/components/Calendar/Calendar.js +7 -42
  147. package/lib/components/Carousel/Carousel.js +42 -27
  148. package/lib/components/CartaoUsuario/CartaoUsuario.js +6 -6
  149. package/lib/components/Collapse/Collapse.d.ts +3 -3
  150. package/lib/components/Collapse/Collapse.js +92 -57
  151. package/lib/components/Compartilhar/Compartilhar.js +47 -46
  152. package/lib/components/ConfirmModal/BasicModal.tsx +1 -1
  153. package/lib/components/ConfirmModal/WrapperModal.tsx +2 -2
  154. package/lib/components/ContactValidationInput/ContactValidationInput.d.ts +1 -1
  155. package/lib/components/ContactValidationInput/ContactValidationInput.js +248 -213
  156. package/lib/components/ContactValidationInput/SealModal.js +38 -32
  157. package/lib/components/Document/Icons.js +14 -6
  158. package/lib/components/Document/ModalVisualizacaoDocumentos.js +9 -2
  159. package/lib/components/Document/Visualizacao.js +31 -25
  160. package/lib/components/DropArea/DropArea.js +9 -3
  161. package/lib/components/Editor/ScriptLoader2.ts +3 -3
  162. package/lib/components/Editor/Utils.ts +3 -3
  163. package/lib/components/Editor/components/Editor.tsx +1 -1
  164. package/lib/components/Editor/tinymce/README.md +73 -0
  165. package/lib/components/Editor/tinymce/langs/README.md +3 -0
  166. package/lib/components/Editor/tinymce/models/dom/model.min.js +1 -1
  167. package/lib/components/Editor/tinymce/plugins/accordion/plugin.min.js +1 -1
  168. package/lib/components/Editor/tinymce/plugins/autolink/plugin.min.js +1 -1
  169. package/lib/components/Editor/tinymce/plugins/autosave/plugin.min.js +1 -1
  170. package/lib/components/Editor/tinymce/plugins/charmap/plugin.min.js +1 -1
  171. package/lib/components/Editor/tinymce/plugins/codesample/plugin.min.js +1 -1
  172. package/lib/components/Editor/tinymce/plugins/directionality/plugin.min.js +1 -1
  173. package/lib/components/Editor/tinymce/plugins/fullscreen/plugin.min.js +1 -1
  174. package/lib/components/Editor/tinymce/plugins/help/plugin.min.js +1 -1
  175. package/lib/components/Editor/tinymce/plugins/image/plugin.min.js +1 -1
  176. package/lib/components/Editor/tinymce/plugins/link/plugin.min.js +1 -1
  177. package/lib/components/Editor/tinymce/plugins/lists/plugin.min.js +1 -1
  178. package/lib/components/Editor/tinymce/plugins/media/plugin.min.js +1 -1
  179. package/lib/components/Editor/tinymce/plugins/searchreplace/plugin.min.js +1 -1
  180. package/lib/components/Editor/tinymce/plugins/table/plugin.js +3 -3
  181. package/lib/components/Editor/tinymce/plugins/table/plugin.min.js +1 -1
  182. package/lib/components/Editor/tinymce/plugins/visualchars/plugin.min.js +1 -1
  183. package/lib/components/Editor/tinymce/themes/silver/theme.js +38 -38
  184. package/lib/components/Editor/tinymce/themes/silver/theme.min.js +1 -1
  185. package/lib/components/Editor/tinymce/tinymce.js +12 -12
  186. package/lib/components/Editor/tinymce/tinymce.min.js +1 -1
  187. package/lib/components/FilePreparer/FilePreparer.d.ts +1 -1
  188. package/lib/components/FilePreparer/FilePreparer.js +112 -108
  189. package/lib/components/FileUploader/FileUploader.js +8 -7
  190. package/lib/components/FormVisualizer/FormVisualizer.d.ts +5 -7
  191. package/lib/components/FormVisualizer/FormVisualizer.js +59 -46
  192. package/lib/components/HalfGauge/HalfGauge.js +87 -85
  193. package/lib/components/Highlight/Highlight.js +4 -4
  194. package/lib/components/ImageResize/ImageResize.d.ts +1 -1
  195. package/lib/components/ImageResize/ImageResize.js +123 -118
  196. package/lib/components/ImageResizeButton/ImageResizeButton.d.ts +1 -1
  197. package/lib/components/ImageResizeButton/ImageResizeButton.js +1 -1
  198. package/lib/components/Input/Input.js +2 -2
  199. package/lib/components/InputTags/InputTags.js +6 -7
  200. package/lib/components/MaterialButton/MaterialButton.d.ts +2 -4
  201. package/lib/components/MaterialButton/MaterialButton.js +50 -125
  202. package/lib/components/MonthPicker/MonthPicker.js +2 -2
  203. package/lib/components/OtpInput/OtpInput.tsx +77 -69
  204. package/lib/components/PercentageDisplay/PercentageDisplay.d.ts +1 -1
  205. package/lib/components/PercentageDisplay/PercentageDisplay.js +29 -54
  206. package/lib/components/Programa/PageCodeEasterEgg.js +41 -40
  207. package/lib/components/Programa/Programa.d.ts +2 -2
  208. package/lib/components/Programa/Programa.js +21 -5
  209. package/lib/components/Programa/Tab.ts +4 -2
  210. package/lib/components/Programa/TabNavigationRail.js +9 -31
  211. package/lib/components/Stepper/Stepper.d.ts +1 -1
  212. package/lib/components/Stepper/Stepper.js +222 -190
  213. package/lib/components/TablePicker/TablePicker.js +11 -6
  214. package/lib/components/TextToHtml/TextStyles.js +42 -42
  215. package/lib/components/TextToHtml/TextToHtml.js +102 -92
  216. package/lib/components/ThreadLog/ThreadLog.js +1 -1
  217. package/lib/components/UserCard/UserCard.js +6 -6
  218. package/lib/components/UtilAutoComplete/UtilAutoComplete.d.ts +3 -4
  219. package/lib/components/UtilAutoComplete/UtilAutoComplete.js +67 -9
  220. package/lib/components/UtilTextField/UtilTextField.d.ts +1 -1
  221. package/lib/components/UtilTextField/UtilTextField.js +18 -16
  222. package/lib/components/Zoom/Zoom.js +6 -3
  223. package/lib/utils/api.ts +1 -1
  224. package/lib/utils/index.ts +10 -8
  225. package/package.json +56 -56
  226. package/.gitlab-ci.yml +0 -21
@@ -1,37 +1,34 @@
1
- import { makeStyles, Slide, Snackbar, Typography } from '@material-ui/core';
1
+ import { Box, Slide, Snackbar, Typography } from '@mui/material';
2
2
  import React, { useEffect, useState } from 'react';
3
3
  import { connect } from 'react-redux';
4
4
 
5
- const useStyles = makeStyles(theme => ({
6
- container: {
7
- display: 'flex',
8
- overflow: 'hidden',
9
- borderRadius: 4,
10
- color: theme.palette.type === 'light' ? '#fff' : '#000',
11
- background: `linear-gradient(90deg, rgba(0,0,0,0) 0%, rgba(${theme.palette.type === 'light' ? '66,66,66' : '255,255,255' },1) 3%)`
12
- },
13
- messageDiv: {
14
- padding: '.5rem 1rem'
15
- },
16
- gradientStripe: {
17
- width: '1rem',
18
- background: 'linear-gradient(180deg, rgba(131,58,180,1) 0%, rgba(253,29,29,1) 50%, rgba(252,176,69,1) 100%)'
19
- }
20
- }));
5
+ const containerSx = theme => ({
6
+ display: 'flex',
7
+ overflow: 'hidden',
8
+ borderRadius: 4,
9
+ color: theme.palette.mode === 'light' ? '#fff' : '#000',
10
+ background: `linear-gradient(90deg, rgba(0,0,0,0) 0%, rgba(${theme.palette.mode === 'light' ? '66,66,66' : '255,255,255' },1) 3%)`
11
+ });
12
+ const messageDivSx = {
13
+ padding: '.5rem 1rem'
14
+ };
15
+ const gradientStripeSx = {
16
+ width: '1rem',
17
+ background: 'linear-gradient(180deg, rgba(131,58,180,1) 0%, rgba(253,29,29,1) 50%, rgba(252,176,69,1) 100%)'
18
+ };
21
19
 
22
20
 
23
21
  const SnackbarTransition = props => <Slide {...props} direction='up' />;
24
22
 
25
23
  const PageCodeEasterEgg = ({ code, usuarioLogado }) => {
26
-
27
- const classes = useStyles();
24
+
28
25
  const [open, setOpen] = useState(false);
29
-
26
+
30
27
  function easterEggListener(e) {
31
28
  const teamMember = usuarioLogado?.idFornecedorInterno === 1; // Membro da TI
32
29
  if (teamMember && code && !open && e.ctrlKey && e.shiftKey && e.key === 'Z') setOpen(true);
33
30
  }
34
-
31
+
35
32
  useEffect(() => {
36
33
  document.addEventListener('keydown', easterEggListener, false);
37
34
  return () => document.removeEventListener('keydown', easterEggListener, false);
@@ -40,27 +37,31 @@ const PageCodeEasterEgg = ({ code, usuarioLogado }) => {
40
37
 
41
38
  const handleClose = _ => setOpen(false);
42
39
 
43
-
44
- return <Snackbar
45
- open={open}
46
- onClose={handleClose}
47
- autoHideDuration={5000}
48
- TransitionComponent={SnackbarTransition}
49
- anchorOrigin={{ vertical: 'bottom', horizontal: 'left' }}
50
- >
51
- <div className={classes.container}>
52
- <div className={classes.gradientStripe} />
53
- <div className={classes.messageDiv}>
54
- <Typography variant='subtitle1'>Hi, dev!</Typography>
55
- <Typography variant='body1'>{`The page code is ${code}.`}</Typography>
56
- </div>
57
- </div>
58
- </Snackbar>;
40
+
41
+ return (
42
+ <Snackbar
43
+ open={open}
44
+ onClose={handleClose}
45
+ autoHideDuration={5000}
46
+ anchorOrigin={{ vertical: 'bottom', horizontal: 'left' }}
47
+ slots={{
48
+ transition: SnackbarTransition
49
+ }}
50
+ >
51
+ <Box sx={containerSx}>
52
+ <Box sx={gradientStripeSx} />
53
+ <Box sx={messageDivSx}>
54
+ <Typography variant='subtitle1'>Hi, dev!</Typography>
55
+ <Typography variant='body1'>{`The page code is ${code}.`}</Typography>
56
+ </Box>
57
+ </Box>
58
+ </Snackbar>
59
+ );
59
60
  };
60
61
 
61
62
 
62
- const mapStateToProps = (state) => ({
63
- usuarioLogado: state.argous.usuarioLogado
63
+ const mapStateToProps = (state) => ({
64
+ usuarioLogado: state.argous.usuarioLogado
64
65
  });
65
66
 
66
- export default connect(mapStateToProps)(PageCodeEasterEgg);
67
+ export default connect(mapStateToProps)(PageCodeEasterEgg);
@@ -1,5 +1,5 @@
1
1
  import { TabArray } from './Tab';
2
- import { BoxProps } from '@material-ui/core';
2
+ import { BoxProps } from '@mui/material';
3
3
  import * as React from 'react';
4
4
 
5
5
 
@@ -45,4 +45,4 @@ export interface ProgramaProps extends BoxProps {
45
45
 
46
46
  declare function Programa(props: ProgramaProps): JSX.Element
47
47
 
48
- export default Programa;
48
+ export default Programa;
@@ -3,7 +3,7 @@ import PageCodeEasterEgg from './PageCodeEasterEgg';
3
3
  import TabNavigationRail from './TabNavigationRail';
4
4
  import * as argous from '../../actions';
5
5
  import { getProgram, toggleFavorite } from '../../api';
6
- import { Box, CircularProgress, Paper, Typography, useMediaQuery, useTheme } from '@material-ui/core';
6
+ import { Box, CircularProgress, Paper, Typography, useMediaQuery, useTheme } from '@mui/material';
7
7
  import { isArray } from 'lodash';
8
8
  import PropTypes from 'prop-types';
9
9
  import React, { useEffect, useState } from 'react';
@@ -125,7 +125,12 @@ function Programa({
125
125
  if (bfTitulo === undefined) bfTitulo = pnlTitle;
126
126
 
127
127
  return (
128
- <Box fontFamily='Raleway, Helvetica, Arial, sans-serif' className={className} {...props}>
128
+ <Box
129
+ className={className}
130
+ {...props}
131
+ sx={[{
132
+ fontFamily: 'Raleway, Helvetica, Arial, sans-serif'
133
+ }, ...(Array.isArray(props.sx) ? props.sx : [props.sx])]}>
129
134
  {!hideTitle &&
130
135
  <span style={{ cursor: 'default', overflow: 'hidden', display: 'block', marginBottom: '2px', color: theme.palette.text.primary }}>
131
136
  <h2 className='reset-margin pull-left' style={{ color: theme.palette.text.primary }}>
@@ -166,12 +171,23 @@ function Programa({
166
171
  }}
167
172
  />
168
173
  {dsErro ? (
169
- <Box textAlign='center' >
174
+ <Box sx={{
175
+ textAlign: 'center'
176
+ }} >
170
177
  <FaExclamationTriangle style={{ color: '#ED1651', width: '90px', height: '90px' }} />
171
178
  <Typography variant='h6'>{dsErro}</Typography>
172
179
  </Box>
173
180
  ) : (!pnlTitle || loading || !loaded) ? (
174
- <Box position='relative' top={20} left='50%' z-index={20} height={80} width={0} marginLeft='-20px'>
181
+ <Box
182
+ z-index={20}
183
+ sx={{
184
+ position: 'relative',
185
+ top: 20,
186
+ left: '50%',
187
+ height: 80,
188
+ width: 0,
189
+ marginLeft: '-20px'
190
+ }}>
175
191
  <CircularProgress disableShrink/>
176
192
  </Box>
177
193
  ) : (
@@ -237,4 +253,4 @@ Programa.propTypes = {
237
253
  // permissoes: PropTypes.object,
238
254
  };
239
255
 
240
- export default connect(mapStateToProps, mapDispatchToProps)(Programa);
256
+ export default connect(mapStateToProps, mapDispatchToProps)(Programa);
@@ -1,6 +1,8 @@
1
+ import { IconType } from 'react-icons';
2
+
1
3
  export interface TabArray {
2
4
  [0]: (string | undefined),
3
5
  [1]?: (string | undefined),
4
6
  [2]?: (string | undefined),
5
- [3]?: (JSX.Element | undefined)
6
- }
7
+ [3]?: (IconType | undefined)
8
+ }
@@ -1,7 +1,6 @@
1
- import { usePrevious } from '../../utils';
2
- import { alpha, IconButton, Paper, Tooltip, useTheme } from '@material-ui/core';
1
+ import { alpha, IconButton, Paper, Tooltip, useTheme } from '@mui/material';
3
2
  import { isArray, isEqual, isNumber } from 'lodash';
4
- import React, { useEffect, useRef } from 'react';
3
+ import React from 'react';
5
4
  import { IoSettings } from 'react-icons/io5';
6
5
 
7
6
 
@@ -20,9 +19,6 @@ const TabNavigationRail = ({
20
19
  executesFunction = () => ''
21
20
  }) => {
22
21
 
23
- const selectedTabRef = useRef(selectedTab);
24
- const setSelectedTabRef = useRef(setSelectedTab);
25
-
26
22
  const theme = useTheme();
27
23
 
28
24
  const styles = {
@@ -55,35 +51,17 @@ const TabNavigationRail = ({
55
51
  }
56
52
  };
57
53
 
58
- const previousTabs = usePrevious(tabs);
59
-
60
- useEffect(() => {
61
-
62
- if (isEqual(tabs, previousTabs) || !!selectedTabRef.current?.length) return;
63
- if (!tabs?.length) {
64
- if (typeof setSelectedTabRef.current === 'function') setSelectedTabRef.current([]);
65
- } else for (let index = 0; index < tabs?.length; index++) {
66
-
67
- const tab = tabs[index];
68
-
69
- if (tab?.[TAB_ACTIVE_INDEX] === 'active') {
70
- if (typeof setSelectedTabRef.current === 'function') setSelectedTabRef.current(tab);
71
- break;
72
- }
73
- }
74
- }, [tabs, previousTabs]);
75
-
76
- const navigate = (event, index, tab) => {
54
+ const navigate = (index, tab) => {
77
55
 
78
56
  const alias = tab?.[TAB_ALIAS_INDEX];
79
57
 
80
- if (typeof setSelectedTabRef.current === 'function') setSelectedTabRef.current(tab);
58
+ if (typeof setSelectedTab === 'function') setSelectedTab(tab);
81
59
  if (isNumber(index)) executesFunction(alias || `T${index}`);
82
60
  };
83
61
 
84
62
 
85
63
  return (
86
- <Paper component='nav' elevation={1} style={styles.rail}>
64
+ <Paper component='nav' elevation={1} sx={styles.rail}>
87
65
  {(isArray(tabs)) && tabs.map((tab, tabIndex) => {
88
66
 
89
67
  const label = tab?.[TAB_LABEL_INDEX];
@@ -92,13 +70,13 @@ const TabNavigationRail = ({
92
70
 
93
71
 
94
72
  return (
95
- <Tooltip key={label} title={label} placement='right'>
73
+ <Tooltip key={`${label || 'tab'}-${tabIndex}`} title={label || ''} placement='right'>
96
74
  <IconButton
97
75
  size='small'
98
76
  aria-label={label}
99
77
  aria-current={(active) ? 'page' : undefined}
100
- onClick={(event) => navigate(event, tabIndex, tab)}
101
- style={{ ...styles.button, ...((active) ? styles.activeButton : {}) }}
78
+ onClick={() => navigate(tabIndex, tab)}
79
+ sx={{ ...styles.button, ...((active) ? styles.activeButton : {}) }}
102
80
  >
103
81
  {(Icon) && (
104
82
  <Icon style={styles.icon} />
@@ -115,4 +93,4 @@ const TabNavigationRail = ({
115
93
  };
116
94
 
117
95
 
118
- export default TabNavigationRail;
96
+ export default TabNavigationRail;
@@ -1,4 +1,4 @@
1
- import { OverrideProps, OverridableComponent } from '@material-ui/core/OverridableComponent';
1
+ import { OverrideProps, OverridableComponent } from '@mui/material/OverridableComponent';
2
2
  import * as React from 'react';
3
3
  import { IconType } from 'react-icons';
4
4