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,22 +1,33 @@
1
- import { makeStyles } from '@material-ui/core';
2
- import clsx from 'clsx';
1
+ import { GlobalStyles } from '@mui/material';
2
+ import { clsx } from 'clsx';
3
3
  import React, { useCallback, useEffect, useRef, useState } from 'react';
4
4
  import { IoIosArrowBack, IoIosArrowForward } from 'react-icons/io';
5
5
 
6
6
 
7
- const useStyles = makeStyles(theme => ({
8
- container: {
7
+ const classes = {
8
+ container: 'argous-carousel-container',
9
+ carouselContainer: 'argous-carousel-carousel-container',
10
+ carousel: 'argous-carousel-carousel',
11
+ button: 'argous-carousel-button',
12
+ leftButton: 'argous-carousel-left-button',
13
+ rightButton: 'argous-carousel-right-button',
14
+ indicator: 'argous-carousel-indicator',
15
+ currentIndicator: 'argous-carousel-current-indicator',
16
+ };
17
+
18
+ const carouselStyles = ({ itemSpacing, indicator, indicatorSize, indicatorGap, indicatorPadding, iconSize }) => theme => ({
19
+ [`.${classes.container}`]: {
9
20
  height: '100%',
10
21
  width: '100%'
11
22
  },
12
- carouselContainer: {
23
+ [`.${classes.carouselContainer}`]: {
13
24
  width: '100%',
14
- height: ({ indicator, indicatorPadding }) => (indicator) ? `calc(100% - ${indicatorPadding * 2}px)` : '100%',
25
+ height: indicator ? `calc(100% - ${indicatorPadding * 2}px)` : '100%',
15
26
  minWidth: '100%',
16
27
  display: 'flex',
17
28
  alignItems: 'center'
18
29
  },
19
- carousel: {
30
+ [`.${classes.carousel}`]: {
20
31
  width: '100%',
21
32
  height: '100%',
22
33
  margin: 'auto',
@@ -26,52 +37,52 @@ const useStyles = makeStyles(theme => ({
26
37
  overflow: 'hidden',
27
38
  scrollBehavior: 'smooth',
28
39
  '&>*:not(:last-child)': {
29
- marginRight: ({ itemSpacing }) => (itemSpacing || '')
40
+ marginRight: itemSpacing || ''
30
41
  }
31
42
  },
32
- button: {
43
+ [`.${classes.button}`]: {
33
44
  display: 'flex',
34
45
  alignItems: 'center',
35
46
  cursor: 'pointer',
36
47
  border: 0,
37
48
  padding: 0,
38
49
  backgroundColor: '#0000',
39
- color: (theme.palette.type === 'light') ? 'rgba(0, 0, 0, .4)' : 'rgba(255, 255, 255, .5)',
50
+ color: theme.palette.mode === 'light' ? 'rgba(0, 0, 0, .4)' : 'rgba(255, 255, 255, .5)',
40
51
  '&:hover': {
41
- color: (theme.palette.type === 'light') ? 'rgba(0, 0, 0, .6)' : 'rgba(255, 255, 255, .8)'
52
+ color: theme.palette.mode === 'light' ? 'rgba(0, 0, 0, .6)' : 'rgba(255, 255, 255, .8)'
42
53
  },
43
54
  '&:disabled': {
44
- color: (theme.palette.type === 'light') ? 'rgba(0, 0, 0, .23)' : 'rgba(255, 255, 255, .3)',
55
+ color: theme.palette.mode === 'light' ? 'rgba(0, 0, 0, .23)' : 'rgba(255, 255, 255, .3)',
45
56
  backgroundColor: 'transparent',
46
57
  cursor: 'default',
47
58
  pointerEvents: 'none'
48
59
  }
49
60
  },
50
- leftButton: {
61
+ [`.${classes.leftButton}`]: {
51
62
  left: 0
52
63
  },
53
- rightButton: {
64
+ [`.${classes.rightButton}`]: {
54
65
  right: 0
55
66
  },
56
- indicator: {
67
+ [`.${classes.indicator}`]: {
57
68
  display: 'flex',
58
69
  flexWrap: 'wrap',
59
70
  alignItems: 'center',
60
71
  justifyContent: 'center',
61
- gap: ({ indicatorGap }) => (indicatorGap || ''),
62
- padding: ({ indicatorPadding, indicatorSize, iconSize }) => `${indicatorPadding - (indicatorSize / 2)}px ${iconSize}px`,
72
+ gap: indicatorGap || '',
73
+ padding: `${indicatorPadding - (indicatorSize / 2)}px ${iconSize}px`,
63
74
  '& span': {
64
- width: ({ indicatorSize }) => (indicatorSize || ''),
65
- height: ({ indicatorSize }) => (indicatorSize || ''),
75
+ width: indicatorSize || '',
76
+ height: indicatorSize || '',
66
77
  borderRadius: '50%',
67
- backgroundColor: (theme.palette.type === 'light') ? 'rgba(0, 0, 0, .4)' : 'rgba(255, 255, 255, .5)',
78
+ backgroundColor: theme.palette.mode === 'light' ? 'rgba(0, 0, 0, .4)' : 'rgba(255, 255, 255, .5)',
68
79
  transition: 'background-color 500ms'
69
80
  }
70
81
  },
71
- currentIndicator: {
72
- backgroundColor: (theme.palette.type === 'light') ? '#000 !important' : '#fff !important'
82
+ [`.${classes.currentIndicator}`]: {
83
+ backgroundColor: theme.palette.mode === 'light' ? '#000 !important' : '#fff !important'
73
84
  }
74
- }));
85
+ });
75
86
 
76
87
 
77
88
  const CAROUSEL_ID = 'carousel';
@@ -102,7 +113,6 @@ const Carousel = ({
102
113
  currentIndicatorClassName
103
114
  }) => {
104
115
 
105
- const classes = useStyles({ itemSpacing, indicator, indicatorSize, indicatorGap, indicatorPadding, iconSize });
106
116
  const [state, setState] = useState(initialState);
107
117
  const { position, indicatorArray } = state;
108
118
  const carousel = useRef(null);
@@ -140,7 +150,9 @@ const Carousel = ({
140
150
 
141
151
  (position === children.length) && logicSetState({ type: 'position', value: (children.length - 1) });
142
152
  }, [itemSpacing, leftButtonId, rightButtonId, position, children.length]);
143
- useEffect(() => control(), [control]);
153
+ useEffect(() => {
154
+ control();
155
+ }, [control]);
144
156
  control();
145
157
 
146
158
  const createIndicatorArray = useCallback(() => {
@@ -148,7 +160,9 @@ const Carousel = ({
148
160
  const newIndicatorArray = Array.from(Array(childrenLength).keys());
149
161
  logicSetState({ type: 'indicatorArray', value: newIndicatorArray });
150
162
  }, []);
151
- useEffect(() => (indicator) && createIndicatorArray(), [indicator, children, createIndicatorArray]);
163
+ useEffect(() => {
164
+ if (indicator) createIndicatorArray();
165
+ }, [indicator, children, createIndicatorArray]);
152
166
 
153
167
  const handleCarouselClick = (e, direction) => {
154
168
  if (!childWidth || (typeof childWidth !== 'number')) return;
@@ -181,6 +195,7 @@ const Carousel = ({
181
195
 
182
196
 
183
197
  return <div id={carouselId} className={classes.container}>
198
+ <GlobalStyles styles={carouselStyles({ itemSpacing, indicator, indicatorSize, indicatorGap, indicatorPadding, iconSize })} />
184
199
  <div className={classes.carouselContainer}>
185
200
  {(buttons && LEFT_ICON) && (
186
201
  <button id={leftButtonId} onClick={(e) => handleCarouselClick(e, 'left')} className={clsx(classes.button, classes.leftButton, buttonClassName)}>
@@ -215,4 +230,4 @@ const Carousel = ({
215
230
  };
216
231
 
217
232
 
218
- export default Carousel;
233
+ export default Carousel;
@@ -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-ui/core';
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';
@@ -71,10 +71,10 @@ function CartaoUsuario({ anchor, idUsuario }) {
71
71
  <Popper onClick={e => e.stopPropagation()} style={{ zIndex: 5 }} onMouseLeave={mouseLeave} onMouseEnter={mouseEnter} open={(!!anchor || !!localAnchor) && !!dados.dsNomeUsuario} anchorEl={anchor || localAnchor}>
72
72
  <Card variant='outlined' style={{ padding: '10px', maxWidth: '350px' }}>
73
73
  <Grid container spacing={1}>
74
- <Grid item xs='auto'>
74
+ <Grid size='auto'>
75
75
  <ArgousAvatar style={{ width: '50px', height: '50px', margin: '10px' }} nome={dados.dsNomeUsuario} idUsuario={idUsuario || localIdUsuario} />
76
76
  </Grid>
77
- <Grid item xs='auto'>
77
+ <Grid size='auto'>
78
78
  <Typography variant='h6' style={{ overflow: 'hidden', width: '250px', textOverflow: 'ellipsis', whiteSpace: 'nowrap' }}>{dados.dsNomeUsuario}</Typography>
79
79
  <Typography variant='body2' style={{ width: '250px' }}>{dados.dsFuncaoUsuario}</Typography>
80
80
  <Typography variant='caption' style={{ width: '250px' }}>{dados.dsSetor}</Typography>
@@ -85,14 +85,14 @@ function CartaoUsuario({ anchor, idUsuario }) {
85
85
  ((idUsuario && (idUsuarioLogado !== idUsuario)) || (localIdUsuario && (idUsuarioLogado !== localIdUsuario))) &&
86
86
  <React.Fragment>
87
87
  {dados.nrRamalUsuario &&
88
- <Grid item xs>
88
+ <Grid size='grow'>
89
89
  <Button fullWidth variant='contained' href={`tel: ${dados.nrRamalUsuario}`} title={`Ramal: ${dados.nrRamalUsuario}`}><IoIosCall/>&nbsp;{dados.nrRamalUsuario}</Button>
90
90
  </Grid>
91
91
  }
92
- <Grid item xs>
92
+ <Grid size='grow'>
93
93
  <Button fullWidth variant='contained' href={`mailto: ${dados.dsEmailUsuario}`} title={dados.dsEmailUsuario}><MdMail/>&nbsp;Email</Button>
94
94
  </Grid>
95
- <Grid item xs>
95
+ <Grid size='grow'>
96
96
  <Button fullWidth variant='contained' onClick={() => setAnotherProgramField('janelaChatOpen', retornaUser(), 'argousSystem')} title='Abrir chat de conversa'><MdMessage/>&nbsp;Mensagem</Button>
97
97
  </Grid>
98
98
  </React.Fragment>
@@ -1,5 +1,5 @@
1
- import { StandardProps } from '@material-ui/core';
2
- import { TransitionProps } from '@material-ui/core/transitions/transition';
1
+ import { StandardProps } from '@mui/material';
2
+ import { TransitionProps } from '@mui/material/transitions';
3
3
  import * as React from 'react';
4
4
 
5
5
  export interface CollapseProps extends StandardProps<TransitionProps, CollapseClassKey, 'timeout'> {
@@ -57,4 +57,4 @@ export type CollapseClassKey = 'container' | 'entered' | 'hidden' | 'wrapper' |
57
57
  * - inherits [Transition API](https://reactcommunity.org/react-transition-group/transition#Transition-props)
58
58
  */
59
59
 
60
- export default function Collapse(props: CollapseProps): JSX.Element;
60
+ export default function Collapse(props: CollapseProps): JSX.Element;
@@ -1,49 +1,80 @@
1
- import { useTheme } from '@material-ui/core';
2
- import { duration } from '@material-ui/core/styles/transitions';
3
- import withStyles from '@material-ui/core/styles/withStyles';
4
- import { getTransitionProps } from '@material-ui/core/transitions/utils';
5
- import clsx from 'clsx';
1
+ import { GlobalStyles, useTheme } from '@mui/material';
2
+ import { clsx } from 'clsx';
6
3
  import PropTypes from 'prop-types';
7
4
  import * as React from 'react';
8
5
  import { Transition } from 'react-transition-group';
9
6
 
7
+ const defaultTransitionDuration = {
8
+ standard: 300,
9
+ };
10
+
11
+ const getTransitionDuration = (timeout, mode) => {
12
+ if (timeout === null || timeout === undefined || timeout === 'auto') {
13
+ return undefined;
14
+ }
15
+
16
+ if (typeof timeout === 'number' || typeof timeout === 'string') {
17
+ return timeout;
18
+ }
19
+
20
+ return timeout[mode];
21
+ };
22
+
23
+ const getTransitionProps = ({ style = {}, timeout }, { mode }) => ({
24
+ duration: style.transitionDuration || getTransitionDuration(timeout, mode),
25
+ easing: style.transitionTimingFunction,
26
+ delay: style.transitionDelay,
27
+ });
28
+
29
+ const collapseClasses = {
30
+ container: 'argous-collapse-container',
31
+ horizontal: 'argous-collapse-horizontal',
32
+ entered: 'argous-collapse-entered',
33
+ hidden: 'argous-collapse-hidden',
34
+ wrapper: 'argous-collapse-wrapper',
35
+ wrapperInner: 'argous-collapse-wrapper-inner',
36
+ };
37
+
38
+ const mergeClasses = (defaultClasses, overrideClasses = {}) => Object.keys(defaultClasses).reduce((acc, key) => ({
39
+ ...acc,
40
+ [key]: overrideClasses[key] || defaultClasses[key],
41
+ }), {});
42
+
10
43
  export const styles = (theme) => ({
11
44
  /* Styles applied to the container element. */
12
- container: {
45
+ [`.${collapseClasses.container}`]: {
13
46
  position: 'relative',
14
47
  overflow: 'hidden',
15
48
  height: 0,
16
49
  transition: theme.transitions.create('height'),
17
- '&$horizontal': {
50
+ [`&.${collapseClasses.horizontal}`]: {
18
51
  width: 0,
19
52
  height: 'auto',
20
53
  transition: theme.transitions.create('width'),
21
54
  },
22
55
  },
23
- /* Pseudo-class applied to the root element if `orientation="horizontal"`. */
24
- horizontal: {},
25
56
  /* Styles applied to the container element when the transition has entered. */
26
- entered: {
57
+ [`.${collapseClasses.entered}`]: {
27
58
  height: 'auto',
28
59
  overflow: 'visible',
29
- '&$horizontal': {
60
+ [`&.${collapseClasses.horizontal}`]: {
30
61
  height: 'initial',
31
62
  width: 'auto',
32
63
  },
33
64
  },
34
65
  /* Styles applied to the container element when the transition has exited and `collapsedHeight` != 0px. */
35
- hidden: {
66
+ [`.${collapseClasses.hidden}`]: {
36
67
  visibility: 'hidden',
37
68
  },
38
69
  /* Styles applied to the outer wrapper element. */
39
- wrapper: {
70
+ [`.${collapseClasses.wrapper}`]: {
40
71
  // Hack to get children with a negative margin to not falsify the height computation.
41
72
  display: 'flex',
42
73
  },
43
74
  /* Styles applied to the inner wrapper element. */
44
- wrapperInner: {
75
+ [`.${collapseClasses.wrapperInner}`]: {
45
76
  width: '100%',
46
- '&$horizontal': {
77
+ [`&.${collapseClasses.horizontal}`]: {
47
78
  // width: 'initial',
48
79
  height: '100%',
49
80
  },
@@ -58,7 +89,7 @@ export const styles = (theme) => ({
58
89
  const Collapse = React.forwardRef(function Collapse(props, ref) {
59
90
  const {
60
91
  children,
61
- classes,
92
+ classes: classesProp = {},
62
93
  className,
63
94
  collapsedHeight = '0px',
64
95
  collapsedSize: collapsedSizeProp = '0px',
@@ -71,12 +102,13 @@ const Collapse = React.forwardRef(function Collapse(props, ref) {
71
102
  onExiting,
72
103
  orientation = 'vertical',
73
104
  style = {},
74
- timeout = duration.standard,
105
+ timeout = defaultTransitionDuration.standard,
75
106
  // eslint-disable-next-line react/prop-types
76
107
  TransitionComponent = Transition,
77
108
  ...other
78
109
  } = props;
79
110
  const theme = useTheme();
111
+ const classes = mergeClasses(collapseClasses, classesProp);
80
112
  const timer = React.useRef();
81
113
  const wrapperRef = React.useRef(null);
82
114
  const autoTransitionDuration = React.useRef();
@@ -184,47 +216,50 @@ const Collapse = React.forwardRef(function Collapse(props, ref) {
184
216
  };
185
217
 
186
218
  return (
187
- <TransitionComponent
188
- in={inProp}
189
- onEnter={handleEnter}
190
- onEntered={handleEntered}
191
- onEntering={handleEntering}
192
- onExit={handleExit}
193
- onExiting={handleExiting}
194
- addEndListener={addEndListener}
195
- timeout={timeout === 'auto' ? null : timeout}
196
- {...other}
197
- >
198
- {(state, childProps) => (
199
- <Component
200
- className={clsx(
201
- classes.container,
202
- {
203
- [classes.horizontal]: isHorizontal,
204
- [classes.entered]: state === 'entered',
205
- [classes.hidden]: state === 'exited' && !inProp && collapsedSize === '0px',
206
- },
207
- className,
208
- )}
209
- style={{
210
- [isHorizontal ? 'minWidth' : 'minHeight']: collapsedSize,
211
- ...style,
212
- }}
213
- ref={ref}
214
- {...childProps}
215
- >
216
- <div className={classes.wrapper} ref={wrapperRef}>
217
- <div
218
- className={clsx(classes.wrapperInner, {
219
+ <>
220
+ <GlobalStyles styles={styles} />
221
+ <TransitionComponent
222
+ in={inProp}
223
+ onEnter={handleEnter}
224
+ onEntered={handleEntered}
225
+ onEntering={handleEntering}
226
+ onExit={handleExit}
227
+ onExiting={handleExiting}
228
+ addEndListener={addEndListener}
229
+ timeout={timeout === 'auto' ? null : timeout}
230
+ {...other}
231
+ >
232
+ {(state, childProps) => (
233
+ <Component
234
+ className={clsx(
235
+ classes.container,
236
+ {
219
237
  [classes.horizontal]: isHorizontal,
220
- })}
221
- >
222
- {children}
238
+ [classes.entered]: state === 'entered',
239
+ [classes.hidden]: state === 'exited' && !inProp && collapsedSize === '0px',
240
+ },
241
+ className,
242
+ )}
243
+ style={{
244
+ [isHorizontal ? 'minWidth' : 'minHeight']: collapsedSize,
245
+ ...style,
246
+ }}
247
+ ref={ref}
248
+ {...childProps}
249
+ >
250
+ <div className={classes.wrapper} ref={wrapperRef}>
251
+ <div
252
+ className={clsx(classes.wrapperInner, {
253
+ [classes.horizontal]: isHorizontal,
254
+ })}
255
+ >
256
+ {children}
257
+ </div>
223
258
  </div>
224
- </div>
225
- </Component>
226
- )}
227
- </TransitionComponent>
259
+ </Component>
260
+ )}
261
+ </TransitionComponent>
262
+ </>
228
263
  );
229
264
  });
230
265
 
@@ -314,4 +349,4 @@ Collapse.propTypes = {
314
349
 
315
350
  Collapse.muiSupportAuto = true;
316
351
 
317
- export default withStyles(styles, { name: 'MuiCollapse' })(Collapse);
352
+ export default Collapse;
@@ -1,18 +1,9 @@
1
1
  import { enviaCompartilhamentoDePrograma, searchUsers } from '../../api/index';
2
2
  import { formataNome, setError } from '../../utils/index';
3
- import { IconButton, Grid, TextField, Button, InputAdornment, Typography, Collapse, Chip, makeStyles, Paper } from '@material-ui/core';
4
- import { Autocomplete } from '@material-ui/lab';
3
+ import { IconButton, Grid, TextField, Button, InputAdornment, Typography, Collapse, Chip, Paper, Autocomplete } from '@mui/material';
5
4
  import React, { useState, useEffect, forwardRef } from 'react';
6
5
  import { MdLink } from 'react-icons/md';
7
6
 
8
- const useStyles = makeStyles({
9
- fundoCompartilhar: {
10
- width: '500px',
11
- padding: '20px',
12
- marginTop: 5,
13
- }
14
- });
15
-
16
7
  const Compartilhar = forwardRef((props, ref) => {
17
8
 
18
9
  const [metodoCompartilhar, setMetodoCompartilhar] = useState('');
@@ -34,8 +25,6 @@ const Compartilhar = forwardRef((props, ref) => {
34
25
  const erroVazio = { email: '', stringEmail: '', notificacao: '', stringNotificacao: '' };
35
26
  const [erro, setErro] = useState(erroVazio);
36
27
 
37
- const classes = useStyles();
38
-
39
28
  function copiarParaAreaDeTransferencia() {
40
29
  let link = document.getElementById('link');
41
30
  link.select();
@@ -111,10 +100,12 @@ const Compartilhar = forwardRef((props, ref) => {
111
100
  }
112
101
 
113
102
  return (
114
- <Grid innerRef={ref} className={classes.fundoCompartilhar} component={Paper} elevation={2} onClick={e => e.stopPropagation()}>
115
- <Grid container spacing={2} style={{ position: 'relative', padding: '6px 12px', display: 'flex' }} justifyContent='center'>
103
+ <Grid ref={ref} sx={{ width: '500px', padding: '20px', marginTop: 5 }} component={Paper} elevation={2} onClick={e => e.stopPropagation()}>
104
+ <Grid container spacing={2} style={{ position: 'relative', padding: '6px 12px', display: 'flex' }} sx={{
105
+ justifyContent: 'center'
106
+ }}>
116
107
  <Typography component='h3' style={{ fontSize: '24px', textAlign: 'center', marginTop: '0px' }}>Compartilhar</Typography>
117
- <Grid item xs={12} className='row'>
108
+ <Grid className='row' size={12}>
118
109
  <TextField
119
110
  label='Link'
120
111
  value={link}
@@ -123,20 +114,22 @@ const Compartilhar = forwardRef((props, ref) => {
123
114
  fullWidth
124
115
  variant='outlined'
125
116
  margin='dense'
126
- InputProps={{
127
- endAdornment: (
128
- <InputAdornment position='end'>
129
- <IconButton onClick={() => copiarParaAreaDeTransferencia()} title='Copiar Link'>
130
- <MdLink />
131
- </IconButton>
132
- </InputAdornment>
133
- ),
117
+ slotProps={{
118
+ input: {
119
+ endAdornment: (
120
+ <InputAdornment position='end'>
121
+ <IconButton onClick={() => copiarParaAreaDeTransferencia()} title='Copiar Link'>
122
+ <MdLink />
123
+ </IconButton>
124
+ </InputAdornment>
125
+ ),
126
+ }
134
127
  }} />
135
128
  <Collapse in={copiado}>
136
129
  <Typography variant='body2' component='div' color='primary'>Link copiado para a área de transferência!</Typography>
137
130
  </Collapse>
138
131
  </Grid>
139
- <Grid item xs={6} style={{ display: 'flex', justifyContent: 'center' }}>
132
+ <Grid style={{ display: 'flex', justifyContent: 'center' }} size={6}>
140
133
  <IconButton size='medium' title='Enviar link por notificação' onClick={() => {
141
134
  setErro(erroVazio); setEmail([]); setStringEmail(''); setMetodoCompartilhar(metodoCompartilhar === 'notificacao' ? '' : 'notificacao');
142
135
  }} >
@@ -153,7 +146,7 @@ const Compartilhar = forwardRef((props, ref) => {
153
146
  />
154
147
  </IconButton>
155
148
  </Grid>
156
- <Grid item xs={6} style={{ display: 'flex', justifyContent: 'center' }}>
149
+ <Grid style={{ display: 'flex', justifyContent: 'center' }} size={6}>
157
150
  <IconButton size='medium' title='Enviar link por email' onClick={() => {
158
151
  setErro(erroVazio); setNotificacao([]); setStringNotificacao(''); setMetodoCompartilhar(metodoCompartilhar === 'email' ? '' : 'email');
159
152
  }} >
@@ -170,16 +163,20 @@ const Compartilhar = forwardRef((props, ref) => {
170
163
  />
171
164
  </IconButton>
172
165
  </Grid>
173
- <Grid item xs={6} style={{ display: 'flex', justifyContent: 'center', paddingTop: 0, marginBottom: '5px' }}>
166
+ <Grid
167
+ style={{ display: 'flex', justifyContent: 'center', paddingTop: 0, marginBottom: '5px' }}
168
+ size={6}>
174
169
  <Typography component='label' variant='body1'>Notificação</Typography>
175
170
  </Grid>
176
- <Grid item xs={6} style={{ display: 'flex', justifyContent: 'center', paddingTop: 0, marginBottom: '5px' }}>
171
+ <Grid
172
+ style={{ display: 'flex', justifyContent: 'center', paddingTop: 0, marginBottom: '5px' }}
173
+ size={6}>
177
174
  <Typography component='label' variant='body1'>Email</Typography>
178
175
  </Grid>
179
- <Grid item xs={12} style={{ padding: 0 }}>
176
+ <Grid style={{ padding: 0 }} size={12}>
180
177
  <Collapse in={metodoCompartilhar === 'notificacao'}>
181
178
  <Grid container spacing={2}>
182
- <Grid item xs={12}>
179
+ <Grid size={12}>
183
180
  <Autocomplete
184
181
  multiple
185
182
  value={notificacao}
@@ -191,12 +188,12 @@ const Compartilhar = forwardRef((props, ref) => {
191
188
  disableCloseOnSelect
192
189
  disablePortal
193
190
  noOptionsText={stringEmail.length < 3 && stringNotificacao.length < 3 ? 'Digite para começar a pesquisar' : 'Não Encontrado'}
194
- renderTags={(value, getTagProps) => (
191
+ renderValue={(value, getItemProps) => (
195
192
  value.map((option, index) => (
196
193
  <Chip
197
194
  variant='outlined'
198
195
  label={option[1] || option}
199
- {...getTagProps({ index })} />
196
+ {...getItemProps({ index })} />
200
197
  ))
201
198
  )}
202
199
  renderInput={params => (
@@ -206,15 +203,17 @@ const Compartilhar = forwardRef((props, ref) => {
206
203
  label='Contatos:'
207
204
  onChange={e => setStringNotificacao(e.target.value)}
208
205
  placeholder={notificacao.length === 0 ? 'Selecionar' : undefined}
209
- InputLabelProps={{ shrink: true }}
210
206
  error={!!erro.notificacao}
211
207
  helperText={erro.notificacao}
212
208
  {...params}
213
- />
209
+ slotProps={{
210
+ ...params.slotProps,
211
+ inputLabel: { shrink: true }
212
+ }} />
214
213
  )}
215
214
  />
216
215
  </Grid>
217
- <Grid item xs={12}>
216
+ <Grid size={12}>
218
217
  <TextField
219
218
  variant='outlined'
220
219
  margin='dense'
@@ -227,10 +226,10 @@ const Compartilhar = forwardRef((props, ref) => {
227
226
  helperText={erro.stringNotificacao} />
228
227
  </Grid>
229
228
  <Grid container style={{ display: 'flex ' }} direction='row-reverse'>
230
- <Grid item xs={2}>
229
+ <Grid size={2}>
231
230
  <Button color='primary' variant='contained' onClick={() => enviaCompartilhamento('N')}>Enviar</Button>
232
231
  </Grid>
233
- <Grid item xs={10}>
232
+ <Grid size={10}>
234
233
  <Collapse in={enviado}>
235
234
  <Typography variant='body2' component='div' color='primary'>Link enviado com sucesso!</Typography>
236
235
  </Collapse>
@@ -239,10 +238,10 @@ const Compartilhar = forwardRef((props, ref) => {
239
238
  </Grid>
240
239
  </Collapse>
241
240
  </Grid>
242
- <Grid item xs={12} style={{ padding: 0 }}>
241
+ <Grid style={{ padding: 0 }} size={12}>
243
242
  <Collapse in={metodoCompartilhar === 'email'}>
244
243
  <Grid container spacing={2}>
245
- <Grid item xs={12}>
244
+ <Grid size={12}>
246
245
  <Autocomplete
247
246
  multiple
248
247
  freeSolo
@@ -255,12 +254,12 @@ const Compartilhar = forwardRef((props, ref) => {
255
254
  disableCloseOnSelect
256
255
  disablePortal
257
256
  noOptionsText={stringEmail.length < 3 && stringNotificacao.length < 3 ? 'Digite para começar a pesquisar' : 'Não Encontrado'}
258
- renderTags={(value, getTagProps) => (
257
+ renderValue={(value, getItemProps) => (
259
258
  value.map((option, index) => (
260
259
  <Chip
261
260
  variant='outlined'
262
261
  label={option[2] || option}
263
- {...getTagProps({ index })} />
262
+ {...getItemProps({ index })} />
264
263
  ))
265
264
  )}
266
265
  renderInput={params => (
@@ -270,15 +269,17 @@ const Compartilhar = forwardRef((props, ref) => {
270
269
  label='Emails:'
271
270
  onChange={e => setStringEmail(e.target.value)}
272
271
  placeholder={email.length === 0 ? 'Selecionar' : undefined}
273
- InputLabelProps={{ shrink: true }}
274
272
  error={!!erro.email}
275
273
  helperText={erro.email}
276
274
  {...params}
277
- />
275
+ slotProps={{
276
+ ...params.slotProps,
277
+ inputLabel: { shrink: true }
278
+ }} />
278
279
  )}
279
280
  />
280
281
  </Grid>
281
- <Grid item xs={12}>
282
+ <Grid size={12}>
282
283
  <TextField
283
284
  multiline
284
285
  label='Mensagem:'
@@ -294,10 +295,10 @@ const Compartilhar = forwardRef((props, ref) => {
294
295
  helperText={erro.stringEmail} />
295
296
  </Grid>
296
297
  <Grid container style={{ display: 'flex' }} direction='row-reverse'>
297
- <Grid item xs={2}>
298
+ <Grid size={2}>
298
299
  <Button color='primary' variant='contained' onClick={() => enviaCompartilhamento('E')}>Enviar</Button>
299
300
  </Grid>
300
- <Grid item xs={10}>
301
+ <Grid size={10}>
301
302
  <Collapse in={enviado}>
302
303
  <Typography variant='body2' component='div' color='primary'>Link enviado com sucesso!</Typography>
303
304
  </Collapse>
@@ -311,4 +312,4 @@ const Compartilhar = forwardRef((props, ref) => {
311
312
  );
312
313
  });
313
314
 
314
- export default Compartilhar;
315
+ export default Compartilhar;
@@ -1,4 +1,4 @@
1
- import { Dialog, DialogTitle, DialogContent, DialogContentText, DialogActions, Button, DialogProps } from '@material-ui/core';
1
+ import { Dialog, DialogTitle, DialogContent, DialogContentText, DialogActions, Button, DialogProps } from '@mui/material';
2
2
  import React from 'react';
3
3
 
4
4
  export interface BasicModalProps {