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.
- package/dist/api/WebSocket.d.ts +18 -10
- package/dist/api/WebSocket.js +26 -18
- package/dist/api/index.js +54 -43
- package/dist/api/ws.d.ts +1 -1
- package/dist/api/ws.js +44 -3
- package/dist/components/Alert/Alert.js +17 -7
- package/dist/components/ArgousAction/ArgousAction.js +17 -7
- package/dist/components/ArgousAvatar/ArgousAvatar.d.ts +1 -1
- package/dist/components/ArgousAvatar/ArgousAvatar.js +44 -60
- package/dist/components/ArgousComplexPagination/ArgousComplexPagination.d.ts +1 -1
- package/dist/components/ArgousComplexPagination/ArgousComplexPagination.js +107 -81
- package/dist/components/ArgousComplexTable/ArgousComplexTable.d.ts +1 -1
- package/dist/components/ArgousComplexTable/ArgousComplexTable.js +39 -52
- package/dist/components/ArgousComplexTableBody/ArgousComplexTableBody.d.ts +1 -1
- package/dist/components/ArgousComplexTableBody/ArgousComplexTableBody.js +119 -97
- package/dist/components/ArgousComplexTableBody/DragAndDrop.d.ts +37 -0
- package/dist/components/ArgousComplexTableBody/DragAndDrop.js +156 -0
- package/dist/components/ArgousComplexTableHead/ArgousComplexTableHead.js +64 -47
- package/dist/components/ArgousComplexTableToolbar/ArgousComplexTableToolBar.js +55 -37
- package/dist/components/ArgousInput/ArgousInput.js +19 -9
- package/dist/components/ArgousPagination/ArgousPagination.js +18 -11
- package/dist/components/ArgousProgressBar/ArgousProgressBar.js +64 -74
- package/dist/components/ArgousSimpleTable/ArgousSimpleTable.js +28 -22
- package/dist/components/AutoComplete/AutoComplete.js +18 -9
- package/dist/components/AutoCompleteFavorites/AutoCompleteFavorites.d.ts +3 -4
- package/dist/components/AutoCompleteFavorites/AutoCompleteFavorites.js +226 -174
- package/dist/components/BarChart/BarChart.js +17 -7
- package/dist/components/BarraFerramentas/BarraFerramentas.js +119 -105
- package/dist/components/Button/Button.js +17 -7
- package/dist/components/Cabecalho/Cabecalho.js +17 -7
- package/dist/components/Calendar/Calendar.js +24 -41
- package/dist/components/Cam/Cam.js +19 -9
- package/dist/components/Carousel/Carousel.js +113 -103
- package/dist/components/CartaoUsuario/CartaoUsuario.js +36 -26
- package/dist/components/Collapse/Collapse.d.ts +3 -3
- package/dist/components/Collapse/Collapse.js +121 -71
- package/dist/components/Compartilhar/Compartilhar.js +70 -65
- 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 +17 -7
- package/dist/components/ConfirmModal/WrapperModal.d.ts +2 -2
- package/dist/components/ConfirmModal/WrapperModal.js +5 -5
- package/dist/components/ContactValidationInput/ContactValidationInput.d.ts +1 -1
- package/dist/components/ContactValidationInput/ContactValidationInput.js +105 -80
- package/dist/components/ContactValidationInput/SealModal.d.ts +1 -1
- package/dist/components/ContactValidationInput/SealModal.js +13 -20
- package/dist/components/Document/Icons.d.ts +2 -2
- package/dist/components/Document/Icons.js +33 -16
- package/dist/components/Document/ModalVisualizacaoDocumentos.d.ts +1 -1
- package/dist/components/Document/ModalVisualizacaoDocumentos.js +33 -17
- package/dist/components/Document/Visualizacao.d.ts +1 -1
- package/dist/components/Document/Visualizacao.js +48 -34
- package/dist/components/DropArea/DropArea.js +27 -12
- package/dist/components/DropArea/Html5FileSelector.js +6 -7
- package/dist/components/Editor/ScriptLoader2.d.ts +1 -1
- package/dist/components/Editor/ScriptLoader2.js +2 -2
- package/dist/components/Editor/Utils.d.ts +3 -3
- package/dist/components/Editor/Utils.js +2 -2
- package/dist/components/Editor/components/Editor.d.ts +1 -1
- package/dist/components/Editor/components/Editor.js +18 -9
- package/dist/components/Editor/components/EditorPropTypes.js +17 -7
- package/dist/components/FilePreparer/FilePreparer.d.ts +1 -1
- package/dist/components/FilePreparer/FilePreparer.js +105 -88
- package/dist/components/FileUploader/FileUploader.js +33 -22
- package/dist/components/FormVisualizer/FormVisualizer.d.ts +5 -7
- package/dist/components/FormVisualizer/FormVisualizer.js +92 -61
- package/dist/components/HalfGauge/HalfGauge.js +87 -135
- package/dist/components/Highlight/Highlight.js +23 -12
- package/dist/components/ImageResize/ImageResize.d.ts +1 -1
- package/dist/components/ImageResize/ImageResize.js +79 -85
- package/dist/components/ImageResizeButton/ImageResizeButton.d.ts +1 -1
- package/dist/components/ImageResizeButton/ImageResizeButton.js +19 -9
- package/dist/components/Input/Input.js +19 -9
- package/dist/components/InputTags/InputTags.js +22 -13
- package/dist/components/ListSelect/ListSelect.js +17 -7
- package/dist/components/MaterialButton/MaterialButton.d.ts +2 -4
- package/dist/components/MaterialButton/MaterialButton.js +56 -125
- package/dist/components/MenuBar/MenuBar.js +17 -7
- package/dist/components/MonthPicker/MonthPicker.js +20 -10
- package/dist/components/MultipleSelect/MultipleSelect.js +17 -7
- package/dist/components/OtpInput/OtpInput.d.ts +1 -1
- package/dist/components/OtpInput/OtpInput.js +71 -58
- package/dist/components/OutputText/OutputText.js +17 -7
- package/dist/components/Pagination/Pagination.js +17 -7
- package/dist/components/PercentageDisplay/PercentageDisplay.d.ts +1 -1
- package/dist/components/PercentageDisplay/PercentageDisplay.js +24 -92
- package/dist/components/Programa/PageCodeEasterEgg.d.ts +5 -4
- package/dist/components/Programa/PageCodeEasterEgg.js +41 -32
- package/dist/components/Programa/Programa.d.ts +2 -2
- package/dist/components/Programa/Programa.js +50 -28
- package/dist/components/Programa/Tab.d.ts +2 -2
- package/dist/components/Programa/TabNavigationRail.d.ts +3 -3
- package/dist/components/Programa/TabNavigationRail.js +13 -55
- package/dist/components/ProgressBar/ProgressBar.js +17 -7
- package/dist/components/Select/Select.js +17 -7
- package/dist/components/SimpleTable/SimpleTable.js +17 -7
- package/dist/components/Stepper/Stepper.d.ts +1 -1
- package/dist/components/Stepper/Stepper.js +194 -179
- package/dist/components/TablePicker/TablePicker.js +37 -12
- package/dist/components/Tabs/Tabs.js +17 -7
- package/dist/components/TextArea/TextArea.js +17 -7
- package/dist/components/TextToHtml/Cursor.d.ts +1 -1
- package/dist/components/TextToHtml/Cursor.js +17 -7
- package/dist/components/TextToHtml/TextStyles.d.ts +1 -1
- package/dist/components/TextToHtml/TextStyles.js +51 -44
- package/dist/components/TextToHtml/TextToHtml.js +37 -17
- package/dist/components/ThreadLog/ThreadLog.js +19 -9
- package/dist/components/UserCard/UserCard.js +36 -26
- package/dist/components/UtilAutoComplete/UtilAutoComplete.d.ts +3 -4
- package/dist/components/UtilAutoComplete/UtilAutoComplete.js +26 -16
- package/dist/components/UtilTextField/UtilTextField.d.ts +1 -1
- package/dist/components/UtilTextField/UtilTextField.js +26 -14
- package/dist/components/Zoom/Zoom.js +23 -24
- package/dist/fieldsRedux/createField.js +17 -7
- package/dist/fieldsRedux/fieldsRedux.js +19 -9
- package/dist/fieldsRedux/passFields.js +17 -7
- package/dist/reducers/index.d.ts +98 -2
- package/dist/utils/api.js +32 -15
- package/dist/utils/config.js +2 -3
- package/dist/utils/index.d.ts +3 -3
- package/dist/utils/index.js +68 -54
- package/dist/utils/store.js +2 -3
- 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.js +32 -21
- 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/README.md +73 -0
- package/lib/components/Editor/tinymce/langs/README.md +3 -0
- 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 +2 -2
- package/lib/components/Programa/Programa.js +21 -5
- package/lib/components/Programa/Tab.ts +4 -2
- package/lib/components/Programa/TabNavigationRail.js +9 -31
- 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 -8
- package/package.json +56 -56
- package/.gitlab-ci.yml +0 -21
|
@@ -1,11 +1,15 @@
|
|
|
1
|
-
import { Box, Button, DialogActions, Divider, ListItem, ListItemIcon, ListItemText, MobileStepper, Paper, Step, StepButton, StepConnector, StepLabel, Stepper as MuiStepper, Typography, useMediaQuery, useTheme
|
|
2
|
-
import
|
|
1
|
+
import { Box, Button, DialogActions, Divider, GlobalStyles, ListItem, ListItemIcon, ListItemText, MobileStepper, Paper, Step, StepButton, StepConnector, StepLabel, Stepper as MuiStepper, Typography, useMediaQuery, useTheme } from '@mui/material';
|
|
2
|
+
import { stepConnectorClasses } from '@mui/material/StepConnector';
|
|
3
|
+
import { styled } from '@mui/material/styles';
|
|
4
|
+
import { clsx } from 'clsx';
|
|
3
5
|
import React, { useEffect, useState } from 'react';
|
|
4
6
|
import { IconContext } from 'react-icons/lib';
|
|
5
7
|
import { MdCheck, MdChevronLeft, MdChevronRight } from 'react-icons/md';
|
|
6
8
|
|
|
7
|
-
const ColorlibConnector =
|
|
8
|
-
|
|
9
|
+
const ColorlibConnector = styled(StepConnector, {
|
|
10
|
+
shouldForwardProp: prop => prop !== 'customOrientation'
|
|
11
|
+
})(({ theme, customOrientation }) => ({
|
|
12
|
+
[`&.${stepConnectorClasses.alternativeLabel}`]: customOrientation === 'vertical' ? {
|
|
9
13
|
top: -28,
|
|
10
14
|
transform: 'rotate(90deg)',
|
|
11
15
|
left: 'calc(-50% + 40px)',
|
|
@@ -16,18 +20,18 @@ const ColorlibConnector = withStyles(theme => ({
|
|
|
16
20
|
} : {
|
|
17
21
|
top: 22,
|
|
18
22
|
},
|
|
19
|
-
active: {
|
|
20
|
-
|
|
23
|
+
[`&.${stepConnectorClasses.active}`]: {
|
|
24
|
+
[`& .${stepConnectorClasses.line}`]: {
|
|
21
25
|
backgroundPosition: 'left bottom'
|
|
22
26
|
},
|
|
23
27
|
},
|
|
24
|
-
completed: {
|
|
25
|
-
|
|
28
|
+
[`&.${stepConnectorClasses.completed}`]: {
|
|
29
|
+
[`& .${stepConnectorClasses.line}`]: {
|
|
26
30
|
backgroundPosition: 'left bottom',
|
|
27
31
|
backgroundImage: `linear-gradient( to right, ${theme.palette.secondary.main} 0%,${theme.palette.secondary.main} 50%,#eaeaf0 51%, #eaeaf0 100%)`,
|
|
28
32
|
},
|
|
29
33
|
},
|
|
30
|
-
line: {
|
|
34
|
+
[`& .${stepConnectorClasses.line}`]: {
|
|
31
35
|
height: 3,
|
|
32
36
|
border: 0,
|
|
33
37
|
backgroundImage: `linear-gradient( to right, ${theme.palette.secondary.main} 0%,${theme.palette.primary.main} 50%,#eaeaf0 51%, #eaeaf0 100%)`,
|
|
@@ -36,91 +40,101 @@ const ColorlibConnector = withStyles(theme => ({
|
|
|
36
40
|
transition: 'background-position 500ms ease',
|
|
37
41
|
borderRadius: 1,
|
|
38
42
|
}
|
|
39
|
-
}))
|
|
43
|
+
}));
|
|
40
44
|
|
|
41
|
-
const ColorlibStepIcon =
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
45
|
+
const ColorlibStepIcon = ({ initial, active, completed, icon, error, ambienteTeste }) => {
|
|
46
|
+
const theme = useTheme();
|
|
47
|
+
const initialBackground = theme.palette.mode === 'light'
|
|
48
|
+
? ambienteTeste ? '#ffc7a2' : '#9acbb8'
|
|
49
|
+
: ambienteTeste ? '#8b6751' : '#507265';
|
|
50
|
+
const backgroundColor = error
|
|
51
|
+
? '#f44336 !important'
|
|
52
|
+
: completed
|
|
53
|
+
? '#2979ff !important'
|
|
54
|
+
: active
|
|
55
|
+
? ambienteTeste ? '#f5781e !important' : '#00995D !important'
|
|
56
|
+
: initial
|
|
57
|
+
? initialBackground
|
|
58
|
+
: theme.palette.mode === 'light' ? '#ccc' : '#838383';
|
|
59
|
+
|
|
60
|
+
return (
|
|
61
|
+
<Box
|
|
62
|
+
sx={{
|
|
63
|
+
zIndex: 1,
|
|
64
|
+
color: '#fff',
|
|
65
|
+
width: 50,
|
|
66
|
+
height: 50,
|
|
67
|
+
display: 'flex',
|
|
68
|
+
borderRadius: '50%',
|
|
69
|
+
justifyContent: 'center',
|
|
70
|
+
alignItems: 'center',
|
|
71
|
+
fontSize: 24,
|
|
72
|
+
backgroundColor,
|
|
73
|
+
transition: 'all 400ms ease 100ms',
|
|
74
|
+
boxShadow: active ? theme.shadows[5] : undefined,
|
|
75
|
+
'& svg path': {
|
|
76
|
+
stroke: '#FFF'
|
|
77
|
+
}
|
|
78
|
+
}}
|
|
79
|
+
>
|
|
80
|
+
<IconContext.Provider value={{}}>
|
|
81
|
+
{icon}
|
|
82
|
+
</IconContext.Provider>
|
|
83
|
+
</Box>
|
|
84
|
+
);
|
|
85
|
+
};
|
|
86
|
+
|
|
87
|
+
const stepperClasses = {
|
|
88
|
+
root: 'argous-stepper-root',
|
|
89
|
+
header: 'argous-stepper-header',
|
|
90
|
+
caption: 'argous-stepper-caption',
|
|
91
|
+
selectedCaption: 'argous-stepper-selected-caption',
|
|
92
|
+
stepper: 'argous-stepper-stepper',
|
|
93
|
+
subDescription: 'argous-stepper-sub-description',
|
|
94
|
+
icon: 'argous-stepper-icon',
|
|
95
|
+
mobileDivider: 'argous-stepper-mobile-divider',
|
|
96
|
+
stepLabel: 'argous-stepper-step-label',
|
|
97
|
+
};
|
|
98
|
+
|
|
99
|
+
const mergeClasses = (defaultClasses, overrideClasses = {}) => Object.keys(defaultClasses).reduce((acc, key) => ({
|
|
100
|
+
...acc,
|
|
101
|
+
[key]: overrideClasses[key] || defaultClasses[key],
|
|
102
|
+
}), {});
|
|
89
103
|
|
|
90
|
-
const stepperStyles = theme => ({
|
|
91
|
-
root: {
|
|
104
|
+
const stepperStyles = ({ orientation }) => theme => ({
|
|
105
|
+
[`.${stepperClasses.root}`]: {
|
|
92
106
|
'&>div': {
|
|
93
107
|
minHeight: 'calc(100vh - 50px)'
|
|
94
108
|
}
|
|
95
109
|
},
|
|
96
|
-
header: {
|
|
110
|
+
[`.${stepperClasses.header}`]: {
|
|
97
111
|
background: theme.palette.background.default,
|
|
98
112
|
marginTop: -10,
|
|
99
113
|
},
|
|
100
|
-
caption: {
|
|
114
|
+
[`.${stepperClasses.caption}`]: {
|
|
101
115
|
display: 'block',
|
|
102
116
|
textAlign: 'center',
|
|
103
117
|
color: theme.palette.text.hint
|
|
104
118
|
},
|
|
105
|
-
selectedCaption: {
|
|
119
|
+
[`.${stepperClasses.selectedCaption}`]: {
|
|
106
120
|
color: theme.palette.text.secondary
|
|
107
121
|
},
|
|
108
|
-
stepper: {
|
|
109
|
-
padding:
|
|
122
|
+
[`.${stepperClasses.stepper}`]: {
|
|
123
|
+
padding: orientation === 'vertical' ? '0 0 0 136px' : '',
|
|
110
124
|
[theme.breakpoints.down('sm')]: {
|
|
111
125
|
padding: 0
|
|
112
126
|
},
|
|
113
127
|
'&>div': {
|
|
114
128
|
display: 'flex',
|
|
115
|
-
padding:
|
|
129
|
+
padding: orientation === 'vertical' ? '0 0 30px' : '',
|
|
116
130
|
'&>button': {
|
|
117
131
|
'&>span:nth-child(1)': {
|
|
118
|
-
flexDirection:
|
|
132
|
+
flexDirection: orientation === 'vertical' ? 'row' : 'column'
|
|
119
133
|
}
|
|
120
134
|
}
|
|
121
135
|
}
|
|
122
136
|
},
|
|
123
|
-
subDescription: {
|
|
137
|
+
[`.${stepperClasses.subDescription}`]: {
|
|
124
138
|
minWidth: 140,
|
|
125
139
|
display: 'flex',
|
|
126
140
|
alignItems: 'center',
|
|
@@ -129,34 +143,34 @@ const stepperStyles = theme => ({
|
|
|
129
143
|
top: 17,
|
|
130
144
|
left: -148,
|
|
131
145
|
},
|
|
132
|
-
icon: {
|
|
146
|
+
[`.${stepperClasses.icon}`]: {
|
|
133
147
|
fontSize: theme.typography.fontSize * 2,
|
|
134
148
|
'& path': {
|
|
135
149
|
stroke: theme.palette.text.primary
|
|
136
150
|
}
|
|
137
151
|
},
|
|
138
|
-
mobileDivider: {
|
|
152
|
+
[`.${stepperClasses.mobileDivider}`]: {
|
|
139
153
|
marginBottom: theme.spacing(2)
|
|
140
154
|
},
|
|
141
|
-
stepLabel: {
|
|
155
|
+
[`.${stepperClasses.stepLabel}`]: {
|
|
142
156
|
'&>span:nth-child(2)': {
|
|
143
|
-
margin:
|
|
157
|
+
margin: orientation === 'vertical' ? '0 0 0 8px' : '',
|
|
144
158
|
'&>span:nth-child(1)': {
|
|
145
|
-
margin:
|
|
159
|
+
margin: orientation === 'vertical' ? 0 : ''
|
|
146
160
|
}
|
|
147
161
|
},
|
|
148
162
|
}
|
|
149
163
|
});
|
|
150
164
|
|
|
151
|
-
const Stepper = ({
|
|
152
|
-
children,
|
|
153
|
-
classes = {},
|
|
154
|
-
steps = [],
|
|
155
|
-
onClick = (index) => (event) => void(index, event),
|
|
156
|
-
onNext = (event) => void(event),
|
|
157
|
-
onPrevious = (event) => void(event),
|
|
158
|
-
onFinish = (event) => void(event),
|
|
159
|
-
maxStep: maxStepProps,
|
|
165
|
+
const Stepper = ({
|
|
166
|
+
children,
|
|
167
|
+
classes: classesProp = {},
|
|
168
|
+
steps = [],
|
|
169
|
+
onClick = (index) => (event) => void(index, event),
|
|
170
|
+
onNext = (event) => void(event),
|
|
171
|
+
onPrevious = (event) => void(event),
|
|
172
|
+
onFinish = (event) => void(event),
|
|
173
|
+
maxStep: maxStepProps,
|
|
160
174
|
activeStep = 0,
|
|
161
175
|
errors = [],
|
|
162
176
|
component: Component = 'div',
|
|
@@ -172,126 +186,144 @@ const Stepper = ({
|
|
|
172
186
|
...props
|
|
173
187
|
}) => {
|
|
174
188
|
const theme = useTheme();
|
|
189
|
+
const classes = mergeClasses(stepperClasses, classesProp);
|
|
175
190
|
const maxSteps = steps.length;
|
|
176
191
|
const maxStep = maxStepProps || steps.length - 1;
|
|
177
192
|
const mobile = useMediaQuery(theme.breakpoints.down(Math.max(maxSteps * 100, theme.breakpoints.values.sm)));
|
|
178
193
|
const ambienteTeste = JSON.parse(window.localStorage.getItem('ambienteTeste'));
|
|
179
194
|
const [initialStep, setInitialStep] = useState(-1);
|
|
180
|
-
useEffect(() =>
|
|
195
|
+
useEffect(() => {
|
|
196
|
+
if (activeStep > initialStep && showProgress) setInitialStep(activeStep);
|
|
197
|
+
}, [activeStep, initialStep, showProgress]);
|
|
181
198
|
|
|
182
|
-
return
|
|
183
|
-
{
|
|
184
|
-
<
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
<
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
</Typography>
|
|
208
|
-
</div>
|
|
209
|
-
}
|
|
210
|
-
<StepButton
|
|
211
|
-
onClick={onClick(i)}
|
|
212
|
-
disabled={i > maxStep}
|
|
213
|
-
optional={
|
|
214
|
-
<>
|
|
215
|
-
<Typography
|
|
216
|
-
variant='caption'
|
|
199
|
+
return (
|
|
200
|
+
<Component {...props} className={clsx(classes.root, props.className)}>
|
|
201
|
+
<GlobalStyles styles={stepperStyles({ orientation })} />
|
|
202
|
+
{mobile && orientation !== 'vertical' ? (
|
|
203
|
+
<Paper square elevation={0}>
|
|
204
|
+
<ListItem dense className={classes.header}>
|
|
205
|
+
<ListItemIcon className={classes.icon}>{steps[activeStep][0]}</ListItemIcon>
|
|
206
|
+
<ListItemText primary={steps[activeStep][1]} secondary={steps[activeStep][2]}/>
|
|
207
|
+
</ListItem>
|
|
208
|
+
<Divider className={classes.mobileDivider}/>
|
|
209
|
+
</Paper>
|
|
210
|
+
) : (
|
|
211
|
+
<MuiStepper
|
|
212
|
+
className={classes.stepper}
|
|
213
|
+
alternativeLabel
|
|
214
|
+
activeStep={activeStep}
|
|
215
|
+
orientation={orientation}
|
|
216
|
+
connector={<ColorlibConnector customOrientation={orientation} />}
|
|
217
|
+
>
|
|
218
|
+
{steps.map(([icon, label, description, subDescription], i) => (
|
|
219
|
+
<Step key={label}>
|
|
220
|
+
{orientation === 'vertical' && subDescription &&
|
|
221
|
+
<div className={classes.subDescription}>
|
|
222
|
+
<Typography
|
|
223
|
+
variant='caption'
|
|
217
224
|
className={clsx(classes.caption, { [classes.selectedCaption]: activeStep >= i })}>
|
|
218
|
-
{
|
|
225
|
+
{subDescription}
|
|
219
226
|
</Typography>
|
|
220
|
-
|
|
221
|
-
|
|
227
|
+
</div>
|
|
228
|
+
}
|
|
229
|
+
<StepButton
|
|
230
|
+
onClick={onClick(i)}
|
|
231
|
+
disabled={i > maxStep}
|
|
232
|
+
optional={
|
|
233
|
+
<>
|
|
234
|
+
<Typography
|
|
222
235
|
variant='caption'
|
|
223
236
|
className={clsx(classes.caption, { [classes.selectedCaption]: activeStep >= i })}>
|
|
224
|
-
{
|
|
237
|
+
{description}
|
|
225
238
|
</Typography>
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
StepIconProps={{ icon, error: errors[i], initial: initialStep >= i, ambienteTeste }}
|
|
239
|
+
{orientation !== 'vertical' && subDescription &&
|
|
240
|
+
<Typography
|
|
241
|
+
variant='caption'
|
|
242
|
+
className={clsx(classes.caption, { [classes.selectedCaption]: activeStep >= i })}>
|
|
243
|
+
{subDescription}
|
|
244
|
+
</Typography>
|
|
245
|
+
}
|
|
246
|
+
</>
|
|
247
|
+
}
|
|
236
248
|
>
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
</Button>
|
|
264
|
-
}
|
|
265
|
-
nextButton={
|
|
266
|
-
<Button
|
|
267
|
-
variant='contained'
|
|
268
|
-
color='primary'
|
|
269
|
-
endIcon={activeStep === maxSteps - 1 ? <MdCheck/> : <MdChevronRight/>}
|
|
270
|
-
onClick={activeStep === steps.length - 1 ? onFinish : onNext}>
|
|
271
|
-
{activeStep === steps.length - 1 ? finishLabel : nextLabel}
|
|
272
|
-
</Button>
|
|
273
|
-
}
|
|
274
|
-
/>
|
|
275
|
-
) : !disableActions ? (
|
|
276
|
-
<DialogActions>
|
|
277
|
-
<Box padding={mobile ? 0 : 4} paddingTop={1} paddingBottom={1}>
|
|
278
|
-
<Button
|
|
279
|
-
disabled={activeStep === 0 || disablePrevious}
|
|
280
|
-
onClick={onPrevious}>
|
|
281
|
-
{backLabel}
|
|
282
|
-
</Button>
|
|
283
|
-
<Button
|
|
284
|
-
variant='contained'
|
|
285
|
-
color='primary'
|
|
286
|
-
onClick={activeStep === steps.length - 1 ? onFinish : onNext}
|
|
287
|
-
disabled={activeStep === steps.length - 1 ? disableFinish : disableNext}
|
|
288
|
-
>
|
|
289
|
-
{activeStep === steps.length - 1 ? finishLabel : nextLabel}
|
|
290
|
-
</Button>
|
|
249
|
+
<StepLabel
|
|
250
|
+
className={classes.stepLabel}
|
|
251
|
+
disabled={i > maxStep}
|
|
252
|
+
error={errors[i]}
|
|
253
|
+
slots={{
|
|
254
|
+
stepIcon: ColorlibStepIcon
|
|
255
|
+
}}
|
|
256
|
+
slotProps={{
|
|
257
|
+
stepIcon: { icon, error: errors[i], initial: initialStep >= i, ambienteTeste }
|
|
258
|
+
}}
|
|
259
|
+
>
|
|
260
|
+
{label}
|
|
261
|
+
</StepLabel>
|
|
262
|
+
</StepButton>
|
|
263
|
+
</Step>
|
|
264
|
+
))}
|
|
265
|
+
</MuiStepper>
|
|
266
|
+
)}
|
|
267
|
+
{children &&
|
|
268
|
+
<Box
|
|
269
|
+
sx={{
|
|
270
|
+
padding: mobile ? 0 : 4,
|
|
271
|
+
pt: 1,
|
|
272
|
+
pb: 0
|
|
273
|
+
}}>
|
|
274
|
+
{children}
|
|
291
275
|
</Box>
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
276
|
+
}
|
|
277
|
+
{mobile && orientation !== 'vertical' ? (
|
|
278
|
+
<MobileStepper
|
|
279
|
+
steps={maxSteps}
|
|
280
|
+
position='bottom'
|
|
281
|
+
variant='dots'
|
|
282
|
+
activeStep={activeStep}
|
|
283
|
+
backButton={
|
|
284
|
+
<Button
|
|
285
|
+
startIcon={<MdChevronLeft/>}
|
|
286
|
+
onClick={onPrevious}
|
|
287
|
+
disabled={activeStep === 0}>
|
|
288
|
+
{backLabel}
|
|
289
|
+
</Button>
|
|
290
|
+
}
|
|
291
|
+
nextButton={
|
|
292
|
+
<Button
|
|
293
|
+
variant='contained'
|
|
294
|
+
color='primary'
|
|
295
|
+
endIcon={activeStep === maxSteps - 1 ? <MdCheck/> : <MdChevronRight/>}
|
|
296
|
+
onClick={activeStep === steps.length - 1 ? onFinish : onNext}>
|
|
297
|
+
{activeStep === steps.length - 1 ? finishLabel : nextLabel}
|
|
298
|
+
</Button>
|
|
299
|
+
}
|
|
300
|
+
/>
|
|
301
|
+
) : !disableActions ? (
|
|
302
|
+
<DialogActions>
|
|
303
|
+
<Box
|
|
304
|
+
sx={{
|
|
305
|
+
padding: mobile ? 0 : 4,
|
|
306
|
+
paddingTop: 1,
|
|
307
|
+
paddingBottom: 1
|
|
308
|
+
}}>
|
|
309
|
+
<Button
|
|
310
|
+
disabled={activeStep === 0 || disablePrevious}
|
|
311
|
+
onClick={onPrevious}>
|
|
312
|
+
{backLabel}
|
|
313
|
+
</Button>
|
|
314
|
+
<Button
|
|
315
|
+
variant='contained'
|
|
316
|
+
color='primary'
|
|
317
|
+
onClick={activeStep === steps.length - 1 ? onFinish : onNext}
|
|
318
|
+
disabled={activeStep === steps.length - 1 ? disableFinish : disableNext}
|
|
319
|
+
>
|
|
320
|
+
{activeStep === steps.length - 1 ? finishLabel : nextLabel}
|
|
321
|
+
</Button>
|
|
322
|
+
</Box>
|
|
323
|
+
</DialogActions>
|
|
324
|
+
) : null }
|
|
325
|
+
</Component>
|
|
326
|
+
);
|
|
295
327
|
};
|
|
296
328
|
|
|
297
|
-
export default
|
|
329
|
+
export default Stepper;
|
|
@@ -2,10 +2,9 @@ import Input from './../Input';
|
|
|
2
2
|
import SimpleTable, { Action } from './../SimpleTable';
|
|
3
3
|
import { setField, getField } from '../../fieldsRedux';
|
|
4
4
|
import { serverAction } from '../../utils/api';
|
|
5
|
-
import {
|
|
5
|
+
import { useTheme } from '@mui/material/styles';
|
|
6
6
|
import PropTypes from 'prop-types';
|
|
7
7
|
import React, { Component } from 'react';
|
|
8
|
-
import { Scrollbars } from 'react-custom-scrollbars';
|
|
9
8
|
|
|
10
9
|
/**
|
|
11
10
|
* @deprecated
|
|
@@ -190,7 +189,7 @@ class TablePicker extends Component {
|
|
|
190
189
|
<td colSpan='2'>
|
|
191
190
|
|
|
192
191
|
<div className='argous-list-dropdown' style={{ height: resultHeight }}>
|
|
193
|
-
<
|
|
192
|
+
<div style={{ height: '100%', overflowY: 'auto' }}>
|
|
194
193
|
{typeMessage > 0 && (
|
|
195
194
|
<div className='padding-top-sm padding-bottom-sm color999 text-center'>
|
|
196
195
|
{typeMessage === 1 && 'Escreva para começar a buscar'}
|
|
@@ -200,7 +199,7 @@ class TablePicker extends Component {
|
|
|
200
199
|
)}
|
|
201
200
|
|
|
202
201
|
<SimpleTable field={`results-${field}`} alias={alias} onClick={this.selectResult} className='reset-margin' />
|
|
203
|
-
</
|
|
202
|
+
</div>
|
|
204
203
|
</div>
|
|
205
204
|
|
|
206
205
|
<SimpleTable field={field} defaultValue={defaultValue} alias={alias} head={head} rows={value && value.length > rows ? rows : undefined} fieldListener={fieldListener} className='reset-margin-bottom'>
|
|
@@ -232,7 +231,13 @@ TablePicker.propTypes = {
|
|
|
232
231
|
placeholder: PropTypes.string,
|
|
233
232
|
removeAction: PropTypes.string,
|
|
234
233
|
head: PropTypes.array,
|
|
235
|
-
rows: PropTypes.number
|
|
234
|
+
rows: PropTypes.number,
|
|
235
|
+
theme: PropTypes.object
|
|
236
|
+
};
|
|
237
|
+
|
|
238
|
+
const TablePickerWithTheme = props => {
|
|
239
|
+
const theme = useTheme();
|
|
240
|
+
return <TablePicker {...props} theme={theme} />;
|
|
236
241
|
};
|
|
237
242
|
|
|
238
|
-
export default
|
|
243
|
+
export default TablePickerWithTheme;
|