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
|
@@ -26,13 +26,23 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
|
|
|
26
26
|
}) : function(o, v) {
|
|
27
27
|
o["default"] = v;
|
|
28
28
|
});
|
|
29
|
-
var __importStar = (this && this.__importStar) || function (
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
};
|
|
29
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
30
|
+
var ownKeys = function(o) {
|
|
31
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
32
|
+
var ar = [];
|
|
33
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
34
|
+
return ar;
|
|
35
|
+
};
|
|
36
|
+
return ownKeys(o);
|
|
37
|
+
};
|
|
38
|
+
return function (mod) {
|
|
39
|
+
if (mod && mod.__esModule) return mod;
|
|
40
|
+
var result = {};
|
|
41
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
42
|
+
__setModuleDefault(result, mod);
|
|
43
|
+
return result;
|
|
44
|
+
};
|
|
45
|
+
})();
|
|
36
46
|
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
37
47
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
38
48
|
return new (P || (P = Promise))(function (resolve, reject) {
|
|
@@ -43,8 +53,8 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
43
53
|
});
|
|
44
54
|
};
|
|
45
55
|
var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
46
|
-
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
|
47
|
-
return g =
|
|
56
|
+
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype);
|
|
57
|
+
return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
48
58
|
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
49
59
|
function step(op) {
|
|
50
60
|
if (f) throw new TypeError("Generator is already executing.");
|
|
@@ -72,17 +82,9 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
|
72
82
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
73
83
|
var index_1 = require("../../api/index");
|
|
74
84
|
var index_2 = require("../../utils/index");
|
|
75
|
-
var
|
|
76
|
-
var lab_1 = require("@material-ui/lab");
|
|
85
|
+
var material_1 = require("@mui/material");
|
|
77
86
|
var react_1 = __importStar(require("react"));
|
|
78
87
|
var md_1 = require("react-icons/md");
|
|
79
|
-
var useStyles = (0, core_1.makeStyles)({
|
|
80
|
-
fundoCompartilhar: {
|
|
81
|
-
width: '500px',
|
|
82
|
-
padding: '20px',
|
|
83
|
-
marginTop: 5,
|
|
84
|
-
}
|
|
85
|
-
});
|
|
86
88
|
var Compartilhar = (0, react_1.forwardRef)(function (props, ref) {
|
|
87
89
|
var _a = (0, react_1.useState)(''), metodoCompartilhar = _a[0], setMetodoCompartilhar = _a[1];
|
|
88
90
|
var _b = (0, react_1.useState)(''), mensagemEmail = _b[0], setMensagemEmail = _b[1];
|
|
@@ -97,7 +99,6 @@ var Compartilhar = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
97
99
|
var _l = (0, react_1.useState)([]), options = _l[0], setOptions = _l[1];
|
|
98
100
|
var erroVazio = { email: '', stringEmail: '', notificacao: '', stringNotificacao: '' };
|
|
99
101
|
var _m = (0, react_1.useState)(erroVazio), erro = _m[0], setErro = _m[1];
|
|
100
|
-
var classes = useStyles();
|
|
101
102
|
function copiarParaAreaDeTransferencia() {
|
|
102
103
|
var link = document.getElementById('link');
|
|
103
104
|
link.select();
|
|
@@ -193,25 +194,29 @@ var Compartilhar = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
193
194
|
});
|
|
194
195
|
});
|
|
195
196
|
}
|
|
196
|
-
return (react_1.default.createElement(
|
|
197
|
-
react_1.default.createElement(
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
197
|
+
return (react_1.default.createElement(material_1.Grid, { ref: ref, sx: { width: '500px', padding: '20px', marginTop: 5 }, component: material_1.Paper, elevation: 2, onClick: function (e) { return e.stopPropagation(); } },
|
|
198
|
+
react_1.default.createElement(material_1.Grid, { container: true, spacing: 2, style: { position: 'relative', padding: '6px 12px', display: 'flex' }, sx: {
|
|
199
|
+
justifyContent: 'center'
|
|
200
|
+
} },
|
|
201
|
+
react_1.default.createElement(material_1.Typography, { component: 'h3', style: { fontSize: '24px', textAlign: 'center', marginTop: '0px' } }, "Compartilhar"),
|
|
202
|
+
react_1.default.createElement(material_1.Grid, { className: 'row', size: 12 },
|
|
203
|
+
react_1.default.createElement(material_1.TextField, { label: 'Link', value: link, readOnly: true, id: 'link', fullWidth: true, variant: 'outlined', margin: 'dense', slotProps: {
|
|
204
|
+
input: {
|
|
205
|
+
endAdornment: (react_1.default.createElement(material_1.InputAdornment, { position: 'end' },
|
|
206
|
+
react_1.default.createElement(material_1.IconButton, { onClick: function () { return copiarParaAreaDeTransferencia(); }, title: 'Copiar Link' },
|
|
207
|
+
react_1.default.createElement(md_1.MdLink, null)))),
|
|
208
|
+
}
|
|
204
209
|
} }),
|
|
205
|
-
react_1.default.createElement(
|
|
206
|
-
react_1.default.createElement(
|
|
207
|
-
react_1.default.createElement(
|
|
208
|
-
react_1.default.createElement(
|
|
210
|
+
react_1.default.createElement(material_1.Collapse, { in: copiado },
|
|
211
|
+
react_1.default.createElement(material_1.Typography, { variant: 'body2', component: 'div', color: 'primary' }, "Link copiado para a \u00E1rea de transfer\u00EAncia!"))),
|
|
212
|
+
react_1.default.createElement(material_1.Grid, { style: { display: 'flex', justifyContent: 'center' }, size: 6 },
|
|
213
|
+
react_1.default.createElement(material_1.IconButton, { size: 'medium', title: 'Enviar link por notifica\u00E7\u00E3o', onClick: function () {
|
|
209
214
|
setErro(erroVazio);
|
|
210
215
|
setEmail([]);
|
|
211
216
|
setStringEmail('');
|
|
212
217
|
setMetodoCompartilhar(metodoCompartilhar === 'notificacao' ? '' : 'notificacao');
|
|
213
218
|
} },
|
|
214
|
-
react_1.default.createElement(
|
|
219
|
+
react_1.default.createElement(material_1.Typography, { component: 'span', variant: 'body1', className: 'icon-linecons-megaphone icon-lg', style: {
|
|
215
220
|
fontSize: '45px',
|
|
216
221
|
width: '75px',
|
|
217
222
|
height: '75px',
|
|
@@ -220,14 +225,14 @@ var Compartilhar = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
220
225
|
borderRadius: '50px',
|
|
221
226
|
border: '5px solid #33b088',
|
|
222
227
|
} }))),
|
|
223
|
-
react_1.default.createElement(
|
|
224
|
-
react_1.default.createElement(
|
|
228
|
+
react_1.default.createElement(material_1.Grid, { style: { display: 'flex', justifyContent: 'center' }, size: 6 },
|
|
229
|
+
react_1.default.createElement(material_1.IconButton, { size: 'medium', title: 'Enviar link por email', onClick: function () {
|
|
225
230
|
setErro(erroVazio);
|
|
226
231
|
setNotificacao([]);
|
|
227
232
|
setStringNotificacao('');
|
|
228
233
|
setMetodoCompartilhar(metodoCompartilhar === 'email' ? '' : 'email');
|
|
229
234
|
} },
|
|
230
|
-
react_1.default.createElement(
|
|
235
|
+
react_1.default.createElement(material_1.Typography, { component: 'span', variant: 'body1', className: 'glyph-icon icon-envelope icon-lg', style: {
|
|
231
236
|
fontSize: '45px',
|
|
232
237
|
width: '75px',
|
|
233
238
|
height: '75px',
|
|
@@ -236,35 +241,35 @@ var Compartilhar = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
236
241
|
borderRadius: '50px',
|
|
237
242
|
border: '5px solid #33b088',
|
|
238
243
|
} }))),
|
|
239
|
-
react_1.default.createElement(
|
|
240
|
-
react_1.default.createElement(
|
|
241
|
-
react_1.default.createElement(
|
|
242
|
-
react_1.default.createElement(
|
|
243
|
-
react_1.default.createElement(
|
|
244
|
-
react_1.default.createElement(
|
|
245
|
-
react_1.default.createElement(
|
|
246
|
-
react_1.default.createElement(
|
|
247
|
-
react_1.default.createElement(
|
|
248
|
-
react_1.default.createElement(
|
|
249
|
-
react_1.default.createElement(
|
|
250
|
-
react_1.default.createElement(
|
|
251
|
-
react_1.default.createElement(
|
|
252
|
-
react_1.default.createElement(
|
|
253
|
-
react_1.default.createElement(
|
|
254
|
-
react_1.default.createElement(
|
|
255
|
-
react_1.default.createElement(
|
|
256
|
-
react_1.default.createElement(
|
|
257
|
-
react_1.default.createElement(
|
|
258
|
-
react_1.default.createElement(
|
|
259
|
-
react_1.default.createElement(
|
|
260
|
-
react_1.default.createElement(
|
|
261
|
-
react_1.default.createElement(
|
|
262
|
-
react_1.default.createElement(
|
|
263
|
-
react_1.default.createElement(
|
|
264
|
-
react_1.default.createElement(
|
|
265
|
-
react_1.default.createElement(
|
|
266
|
-
react_1.default.createElement(
|
|
267
|
-
react_1.default.createElement(
|
|
268
|
-
react_1.default.createElement(
|
|
244
|
+
react_1.default.createElement(material_1.Grid, { style: { display: 'flex', justifyContent: 'center', paddingTop: 0, marginBottom: '5px' }, size: 6 },
|
|
245
|
+
react_1.default.createElement(material_1.Typography, { component: 'label', variant: 'body1' }, "Notifica\u00E7\u00E3o")),
|
|
246
|
+
react_1.default.createElement(material_1.Grid, { style: { display: 'flex', justifyContent: 'center', paddingTop: 0, marginBottom: '5px' }, size: 6 },
|
|
247
|
+
react_1.default.createElement(material_1.Typography, { component: 'label', variant: 'body1' }, "Email")),
|
|
248
|
+
react_1.default.createElement(material_1.Grid, { style: { padding: 0 }, size: 12 },
|
|
249
|
+
react_1.default.createElement(material_1.Collapse, { in: metodoCompartilhar === 'notificacao' },
|
|
250
|
+
react_1.default.createElement(material_1.Grid, { container: true, spacing: 2 },
|
|
251
|
+
react_1.default.createElement(material_1.Grid, { size: 12 },
|
|
252
|
+
react_1.default.createElement(material_1.Autocomplete, { multiple: true, value: notificacao, options: options, getOptionLabel: function (option) { return (0, index_2.formataNome)(option[1]); }, size: 'small', limitTags: 1, onChange: function (_e, value) { return setNotificacao(value); }, disableCloseOnSelect: true, disablePortal: true, noOptionsText: stringEmail.length < 3 && stringNotificacao.length < 3 ? 'Digite para começar a pesquisar' : 'Não Encontrado', renderValue: function (value, getItemProps) { return (value.map(function (option, index) { return (react_1.default.createElement(material_1.Chip, __assign({ variant: 'outlined', label: option[1] || option }, getItemProps({ index: index })))); })); }, renderInput: function (params) { return (react_1.default.createElement(material_1.TextField, __assign({ variant: 'outlined', margin: 'dense', label: 'Contatos:', onChange: function (e) { return setStringNotificacao(e.target.value); }, placeholder: notificacao.length === 0 ? 'Selecionar' : undefined, error: !!erro.notificacao, helperText: erro.notificacao }, params, { slotProps: __assign(__assign({}, params.slotProps), { inputLabel: { shrink: true } }) }))); } })),
|
|
253
|
+
react_1.default.createElement(material_1.Grid, { size: 12 },
|
|
254
|
+
react_1.default.createElement(material_1.TextField, { variant: 'outlined', margin: 'dense', label: 'Mensagem:', placeholder: 'Mensagem da Notifica\u00E7\u00E3o', fullWidth: true, value: mensagemNotificação, onChange: function (e) { return setMensagemNotificacao(e.target.value); }, error: !!erro.stringNotificacao, helperText: erro.stringNotificacao })),
|
|
255
|
+
react_1.default.createElement(material_1.Grid, { container: true, style: { display: 'flex ' }, direction: 'row-reverse' },
|
|
256
|
+
react_1.default.createElement(material_1.Grid, { size: 2 },
|
|
257
|
+
react_1.default.createElement(material_1.Button, { color: 'primary', variant: 'contained', onClick: function () { return enviaCompartilhamento('N'); } }, "Enviar")),
|
|
258
|
+
react_1.default.createElement(material_1.Grid, { size: 10 },
|
|
259
|
+
react_1.default.createElement(material_1.Collapse, { in: enviado },
|
|
260
|
+
react_1.default.createElement(material_1.Typography, { variant: 'body2', component: 'div', color: 'primary' }, "Link enviado com sucesso!"))))))),
|
|
261
|
+
react_1.default.createElement(material_1.Grid, { style: { padding: 0 }, size: 12 },
|
|
262
|
+
react_1.default.createElement(material_1.Collapse, { in: metodoCompartilhar === 'email' },
|
|
263
|
+
react_1.default.createElement(material_1.Grid, { container: true, spacing: 2 },
|
|
264
|
+
react_1.default.createElement(material_1.Grid, { size: 12 },
|
|
265
|
+
react_1.default.createElement(material_1.Autocomplete, { multiple: true, freeSolo: true, value: email, options: options, getOptionLabel: function (option) { return option[2]; }, size: 'small', limitTags: 1, onChange: function (_e, value) { return setEmail(value); }, disableCloseOnSelect: true, disablePortal: true, noOptionsText: stringEmail.length < 3 && stringNotificacao.length < 3 ? 'Digite para começar a pesquisar' : 'Não Encontrado', renderValue: function (value, getItemProps) { return (value.map(function (option, index) { return (react_1.default.createElement(material_1.Chip, __assign({ variant: 'outlined', label: option[2] || option }, getItemProps({ index: index })))); })); }, renderInput: function (params) { return (react_1.default.createElement(material_1.TextField, __assign({ variant: 'outlined', margin: 'dense', label: 'Emails:', onChange: function (e) { return setStringEmail(e.target.value); }, placeholder: email.length === 0 ? 'Selecionar' : undefined, error: !!erro.email, helperText: erro.email }, params, { slotProps: __assign(__assign({}, params.slotProps), { inputLabel: { shrink: true } }) }))); } })),
|
|
266
|
+
react_1.default.createElement(material_1.Grid, { size: 12 },
|
|
267
|
+
react_1.default.createElement(material_1.TextField, { multiline: true, label: 'Mensagem:', minRows: '2', margin: 'dense', variant: 'outlined', fullWidth: true, placeholder: 'Mensagem do Email', value: mensagemEmail, onChange: function (e) { return setMensagemEmail(e.target.value); }, style: { resize: 'vertical', height: '50px' }, error: !!erro.stringEmail, helperText: erro.stringEmail })),
|
|
268
|
+
react_1.default.createElement(material_1.Grid, { container: true, style: { display: 'flex' }, direction: 'row-reverse' },
|
|
269
|
+
react_1.default.createElement(material_1.Grid, { size: 2 },
|
|
270
|
+
react_1.default.createElement(material_1.Button, { color: 'primary', variant: 'contained', onClick: function () { return enviaCompartilhamento('E'); } }, "Enviar")),
|
|
271
|
+
react_1.default.createElement(material_1.Grid, { size: 10 },
|
|
272
|
+
react_1.default.createElement(material_1.Collapse, { in: enviado },
|
|
273
|
+
react_1.default.createElement(material_1.Typography, { variant: 'body2', component: 'div', color: 'primary' }, "Link enviado com sucesso!"))))))))));
|
|
269
274
|
});
|
|
270
275
|
exports.default = Compartilhar;
|
|
@@ -14,16 +14,16 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
14
14
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
var
|
|
17
|
+
var material_1 = require("@mui/material");
|
|
18
18
|
var react_1 = __importDefault(require("react"));
|
|
19
19
|
var BasicModal = function (_a) {
|
|
20
20
|
var _b = _a.okLabel, okLabel = _b === void 0 ? 'Ok' : _b, _c = _a.cancelLabel, cancelLabel = _c === void 0 ? 'Cancelar' : _c, _d = _a.title, title = _d === void 0 ? '' : _d, _e = _a.description, description = _e === void 0 ? '' : _e, open = _a.open, proceed = _a.proceed, dialogProps = _a.dialogProps, cancel = _a.cancel;
|
|
21
|
-
return (react_1.default.createElement(
|
|
22
|
-
react_1.default.createElement(
|
|
23
|
-
react_1.default.createElement(
|
|
24
|
-
react_1.default.createElement(
|
|
25
|
-
react_1.default.createElement(
|
|
26
|
-
react_1.default.createElement(
|
|
27
|
-
react_1.default.createElement(
|
|
21
|
+
return (react_1.default.createElement(material_1.Dialog, __assign({ open: open, onClose: function () { return cancel(false); } }, dialogProps),
|
|
22
|
+
react_1.default.createElement(material_1.DialogTitle, null, title),
|
|
23
|
+
react_1.default.createElement(material_1.DialogContent, null,
|
|
24
|
+
react_1.default.createElement(material_1.DialogContentText, { component: 'div' }, description)),
|
|
25
|
+
react_1.default.createElement(material_1.DialogActions, null,
|
|
26
|
+
react_1.default.createElement(material_1.Button, { variant: 'contained', color: 'secondary', onClick: function () { return proceed(false); } }, cancelLabel),
|
|
27
|
+
react_1.default.createElement(material_1.Button, { variant: 'contained', color: 'primary', onClick: function () { return proceed(true); } }, okLabel))));
|
|
28
28
|
};
|
|
29
29
|
exports.default = BasicModal;
|
|
@@ -1,5 +1,16 @@
|
|
|
1
1
|
import { ModalProviderContextProps } from '.';
|
|
2
2
|
import React from 'react';
|
|
3
3
|
export declare const ModalProviderContext: React.Context<ModalProviderContextProps>;
|
|
4
|
-
declare const _default: import("react-redux").ConnectedComponent<({ children, argousSystem }: any) => React.JSX.Element,
|
|
4
|
+
declare const _default: import("react-redux").ConnectedComponent<({ children, argousSystem }: any) => React.JSX.Element, {
|
|
5
|
+
[x: string]: any;
|
|
6
|
+
[x: number]: any;
|
|
7
|
+
[x: symbol]: any;
|
|
8
|
+
context?: React.Context<import("react-redux").ReactReduxContextValue<any, import("redux").UnknownAction> | null> | undefined;
|
|
9
|
+
store?: import("redux").Store | undefined;
|
|
10
|
+
} | {
|
|
11
|
+
[x: string]: any;
|
|
12
|
+
[x: number]: any;
|
|
13
|
+
[x: symbol]: any;
|
|
14
|
+
store?: import("redux").Store | undefined;
|
|
15
|
+
}>;
|
|
5
16
|
export default _default;
|
|
@@ -26,13 +26,23 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
|
|
|
26
26
|
}) : function(o, v) {
|
|
27
27
|
o["default"] = v;
|
|
28
28
|
});
|
|
29
|
-
var __importStar = (this && this.__importStar) || function (
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
};
|
|
29
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
30
|
+
var ownKeys = function(o) {
|
|
31
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
32
|
+
var ar = [];
|
|
33
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
34
|
+
return ar;
|
|
35
|
+
};
|
|
36
|
+
return ownKeys(o);
|
|
37
|
+
};
|
|
38
|
+
return function (mod) {
|
|
39
|
+
if (mod && mod.__esModule) return mod;
|
|
40
|
+
var result = {};
|
|
41
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
42
|
+
__setModuleDefault(result, mod);
|
|
43
|
+
return result;
|
|
44
|
+
};
|
|
45
|
+
})();
|
|
36
46
|
var __rest = (this && this.__rest) || function (s, e) {
|
|
37
47
|
var t = {};
|
|
38
48
|
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { DialogProps } from '@material
|
|
1
|
+
import { DialogProps } from '@mui/material';
|
|
2
2
|
import React from 'react';
|
|
3
3
|
export interface WrapperModalProps {
|
|
4
4
|
okLabel: React.ReactNode;
|
|
@@ -14,5 +14,5 @@ export interface WrapperModalProps {
|
|
|
14
14
|
*/
|
|
15
15
|
open: boolean;
|
|
16
16
|
}
|
|
17
|
-
declare const WrapperModal: (Component: (props: any) =>
|
|
17
|
+
declare const WrapperModal: (Component: (props: any) => React.ReactElement) => ({ proceed, open, title, cancelLabel, okLabel, dialogProps, ...props }: WrapperModalProps) => React.JSX.Element;
|
|
18
18
|
export default WrapperModal;
|
|
@@ -26,15 +26,15 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
26
26
|
};
|
|
27
27
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
28
28
|
var MaterialButton_1 = __importDefault(require("../MaterialButton/MaterialButton"));
|
|
29
|
-
var
|
|
29
|
+
var material_1 = require("@mui/material");
|
|
30
30
|
var react_1 = __importDefault(require("react"));
|
|
31
31
|
var WrapperModal = function (Component) { return function (_a) {
|
|
32
32
|
var proceed = _a.proceed, open = _a.open, title = _a.title, _b = _a.cancelLabel, cancelLabel = _b === void 0 ? 'Cancelar' : _b, _c = _a.okLabel, okLabel = _c === void 0 ? 'Ok' : _c, dialogProps = _a.dialogProps, props = __rest(_a, ["proceed", "open", "title", "cancelLabel", "okLabel", "dialogProps"]);
|
|
33
|
-
return react_1.default.createElement(
|
|
34
|
-
title && react_1.default.createElement(
|
|
35
|
-
react_1.default.createElement(
|
|
33
|
+
return react_1.default.createElement(material_1.Dialog, __assign({ open: open, onClose: function () { return proceed(false); } }, dialogProps),
|
|
34
|
+
title && react_1.default.createElement(material_1.DialogTitle, null, title),
|
|
35
|
+
react_1.default.createElement(material_1.DialogContent, null,
|
|
36
36
|
react_1.default.createElement(Component, __assign({}, props))),
|
|
37
|
-
react_1.default.createElement(
|
|
37
|
+
react_1.default.createElement(material_1.DialogActions, null,
|
|
38
38
|
cancelLabel && react_1.default.createElement(MaterialButton_1.default, { variant: 'contained', color: 'secondary', onClick: function () { return proceed(false); } }, cancelLabel),
|
|
39
39
|
okLabel && react_1.default.createElement(MaterialButton_1.default, { variant: 'contained', color: 'primary', onClick: function () { return proceed(true); } }, okLabel)));
|
|
40
40
|
}; };
|
|
@@ -26,13 +26,23 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
|
|
|
26
26
|
}) : function(o, v) {
|
|
27
27
|
o["default"] = v;
|
|
28
28
|
});
|
|
29
|
-
var __importStar = (this && this.__importStar) || function (
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
};
|
|
29
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
30
|
+
var ownKeys = function(o) {
|
|
31
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
32
|
+
var ar = [];
|
|
33
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
34
|
+
return ar;
|
|
35
|
+
};
|
|
36
|
+
return ownKeys(o);
|
|
37
|
+
};
|
|
38
|
+
return function (mod) {
|
|
39
|
+
if (mod && mod.__esModule) return mod;
|
|
40
|
+
var result = {};
|
|
41
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
42
|
+
__setModuleDefault(result, mod);
|
|
43
|
+
return result;
|
|
44
|
+
};
|
|
45
|
+
})();
|
|
36
46
|
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
37
47
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
38
48
|
return new (P || (P = Promise))(function (resolve, reject) {
|
|
@@ -43,8 +53,8 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
43
53
|
});
|
|
44
54
|
};
|
|
45
55
|
var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
46
|
-
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
|
47
|
-
return g =
|
|
56
|
+
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype);
|
|
57
|
+
return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
48
58
|
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
49
59
|
function step(op) {
|
|
50
60
|
if (f) throw new TypeError("Generator is already executing.");
|
|
@@ -69,6 +79,17 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
|
69
79
|
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
70
80
|
}
|
|
71
81
|
};
|
|
82
|
+
var __rest = (this && this.__rest) || function (s, e) {
|
|
83
|
+
var t = {};
|
|
84
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
85
|
+
t[p] = s[p];
|
|
86
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
87
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
88
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
89
|
+
t[p[i]] = s[p[i]];
|
|
90
|
+
}
|
|
91
|
+
return t;
|
|
92
|
+
};
|
|
72
93
|
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
73
94
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
74
95
|
};
|
|
@@ -80,14 +101,14 @@ var __1 = require("../");
|
|
|
80
101
|
var api_1 = require("../../api");
|
|
81
102
|
var utils_1 = require("../../utils");
|
|
82
103
|
var api_2 = require("../../utils/api");
|
|
83
|
-
var
|
|
104
|
+
var material_1 = require("@mui/material");
|
|
84
105
|
var react_1 = __importStar(require("react"));
|
|
85
106
|
var io_1 = require("react-icons/io");
|
|
86
107
|
var lia_1 = require("react-icons/lia");
|
|
87
108
|
var pi_1 = require("react-icons/pi");
|
|
88
|
-
var
|
|
109
|
+
var react_input_mask_1 = __importDefault(require("@mona-health/react-input-mask"));
|
|
89
110
|
var EMAIL_VALIDATION_REGEX = /^[\w-.]+@([\w-]+\.)+[\w-]{2,4}$/;
|
|
90
|
-
var cellphoneMaskedInput = function (props) { return react_1.default.createElement(
|
|
111
|
+
var cellphoneMaskedInput = function (props) { return react_1.default.createElement(react_input_mask_1.default, __assign({ mask: '(99) 99999-9999' }, props)); };
|
|
91
112
|
exports.SealIcon = pi_1.PiSealCheck;
|
|
92
113
|
exports.GREEN_COLOR = '#00995D';
|
|
93
114
|
var ORANGE_COLOR = '#f5781e';
|
|
@@ -110,9 +131,11 @@ var initialState = {
|
|
|
110
131
|
message: messageInitialState
|
|
111
132
|
};
|
|
112
133
|
var ContactValidationInput = function (_a) {
|
|
113
|
-
var
|
|
114
|
-
var
|
|
115
|
-
var
|
|
134
|
+
var _b;
|
|
135
|
+
var id = _a.id, _c = _a.type, type = _c === void 0 ? ('cellphone' || 'email') : _c, _d = _a.textFieldProps, textFieldProps = _d === void 0 ? {} : _d, _e = _a.style, style = _e === void 0 ? {} : _e, _f = _a.className, className = _f === void 0 ? '' : _f, disabled = _a.disabled, _g = _a.cpf, cpf = _g === void 0 ? '' : _g, _h = _a.userName, userName = _h === void 0 ? '' : _h, _j = _a.value, value = _j === void 0 ? '' : _j, _k = _a.onChange, onChange = _k === void 0 ? function () { return ''; } : _k, _l = _a.getComponentData, getComponentData = _l === void 0 ? function () { return ''; } : _l;
|
|
136
|
+
var FormHelperTextProps = textFieldProps.FormHelperTextProps, InputLabelProps = textFieldProps.InputLabelProps, InputProps = textFieldProps.InputProps, inputProps = textFieldProps.inputProps, SelectProps = textFieldProps.SelectProps, _m = textFieldProps.slotProps, textFieldSlotProps = _m === void 0 ? {} : _m, resolvedTextFieldProps = __rest(textFieldProps, ["FormHelperTextProps", "InputLabelProps", "InputProps", "inputProps", "SelectProps", "slotProps"]);
|
|
137
|
+
var theme = (0, material_1.useTheme)();
|
|
138
|
+
var _o = (0, react_1.useState)(__assign(__assign({}, initialState), { inputValue: value })), state = _o[0], setState = _o[1];
|
|
116
139
|
var inputValue = state.inputValue, loading = state.loading, searched = state.searched, validated = state.validated, idContato = state.idContato, cdContato = state.cdContato, code = state.code, message = state.message, validating = state.validating;
|
|
117
140
|
var createModal = (0, utils_1.useModal)().createModal;
|
|
118
141
|
var sealModal = createModal(SealModal_1.default);
|
|
@@ -285,62 +308,60 @@ var ContactValidationInput = function (_a) {
|
|
|
285
308
|
}
|
|
286
309
|
});
|
|
287
310
|
}); };
|
|
288
|
-
var validateCode = function (_a) {
|
|
289
|
-
var
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
case 1: return [2 /*return*/, _a.sent()];
|
|
317
|
-
}
|
|
318
|
-
}); }); })];
|
|
319
|
-
case 1:
|
|
320
|
-
_c = _d.sent(), status = _c.status, isVerificado = _c.isVerificado;
|
|
321
|
-
if (status) {
|
|
322
|
-
messageText_1 = '';
|
|
323
|
-
if (isVerificado) {
|
|
324
|
-
if (cellphoneType)
|
|
325
|
-
messageText_1 = 'Celular validado com sucesso';
|
|
326
|
-
else if (emailType)
|
|
327
|
-
messageText_1 = 'E-mail validado com sucesso';
|
|
328
|
-
setTimeout(function () { return logicSetState({ type: 'message', value: messageInitialState }); }, 6000);
|
|
329
|
-
}
|
|
330
|
-
else {
|
|
331
|
-
messageText_1 = 'Código inválido. Por favor tente novamente.';
|
|
311
|
+
var validateCode = function (_a) { return __awaiter(void 0, [_a], void 0, function (_b) {
|
|
312
|
+
var parameters, fetchOptions, _c, status, isVerificado, messageText_1;
|
|
313
|
+
var _d = _b.snChancela, snChancela = _d === void 0 ? false : _d;
|
|
314
|
+
return __generator(this, function (_e) {
|
|
315
|
+
switch (_e.label) {
|
|
316
|
+
case 0:
|
|
317
|
+
if (invalidType)
|
|
318
|
+
return [2 /*return*/];
|
|
319
|
+
logicSetState({ type: 'loading', field: (snChancela) ? 'input' : 'validation', value: true });
|
|
320
|
+
parameters = {
|
|
321
|
+
method: 'V',
|
|
322
|
+
type: (cellphoneType) ? '1' : (emailType) ? '2' : '',
|
|
323
|
+
cdCpf: (0, utils_1.numbersOnly)(cpf),
|
|
324
|
+
dsNome: userName,
|
|
325
|
+
cdCode: code,
|
|
326
|
+
cdContato: formattedInputValue,
|
|
327
|
+
idContato: idContato,
|
|
328
|
+
snChancela: snChancela
|
|
329
|
+
};
|
|
330
|
+
fetchOptions = {
|
|
331
|
+
method: 'POST',
|
|
332
|
+
body: JSON.stringify(parameters),
|
|
333
|
+
headers: (0, api_1.headers)()
|
|
334
|
+
};
|
|
335
|
+
return [4 /*yield*/, fetch("".concat((0, api_1.api)(), "agscontactconfirmation.rslvr"), fetchOptions).then(function (response) { return __awaiter(void 0, void 0, void 0, function () { return __generator(this, function (_a) {
|
|
336
|
+
switch (_a.label) {
|
|
337
|
+
case 0: return [4 /*yield*/, response.json()];
|
|
338
|
+
case 1: return [2 /*return*/, _a.sent()];
|
|
332
339
|
}
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
340
|
+
}); }); })];
|
|
341
|
+
case 1:
|
|
342
|
+
_c = _e.sent(), status = _c.status, isVerificado = _c.isVerificado;
|
|
343
|
+
if (status) {
|
|
344
|
+
messageText_1 = '';
|
|
345
|
+
if (isVerificado) {
|
|
346
|
+
if (cellphoneType)
|
|
347
|
+
messageText_1 = 'Celular validado com sucesso';
|
|
348
|
+
else if (emailType)
|
|
349
|
+
messageText_1 = 'E-mail validado com sucesso';
|
|
350
|
+
setTimeout(function () { return logicSetState({ type: 'message', value: messageInitialState }); }, 6000);
|
|
337
351
|
}
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
352
|
+
else {
|
|
353
|
+
messageText_1 = 'Código inválido. Por favor tente novamente.';
|
|
354
|
+
}
|
|
355
|
+
setState(function (states) { return (__assign(__assign({}, states), { validated: isVerificado, validating: false, idContato: '', code: '', message: {
|
|
356
|
+
color: (isVerificado) ? '' : RED_COLOR,
|
|
357
|
+
text: messageText_1
|
|
358
|
+
} })); });
|
|
359
|
+
}
|
|
360
|
+
logicSetState({ type: 'loading', field: (snChancela) ? 'input' : 'validation', value: false });
|
|
361
|
+
return [2 /*return*/];
|
|
362
|
+
}
|
|
342
363
|
});
|
|
343
|
-
};
|
|
364
|
+
}); };
|
|
344
365
|
var toSeal = function () { return __awaiter(void 0, void 0, void 0, function () {
|
|
345
366
|
var status;
|
|
346
367
|
return __generator(this, function (_a) {
|
|
@@ -363,25 +384,29 @@ var ContactValidationInput = function (_a) {
|
|
|
363
384
|
setState(function (states) { return (__assign(__assign({}, states), { idContato: '', validated: false, validating: false, code: '', message: messageInitialState })); });
|
|
364
385
|
}
|
|
365
386
|
}, [formattedInputValue, cdContato, validated, validating]);
|
|
366
|
-
(0, react_1.useEffect)(function () {
|
|
387
|
+
(0, react_1.useEffect)(function () {
|
|
388
|
+
checkConsistency();
|
|
389
|
+
}, [formattedInputValue, checkConsistency]);
|
|
367
390
|
(0, react_1.useEffect)(function () {
|
|
368
391
|
(typeof getComponentData === 'function') && getComponentData(state);
|
|
369
392
|
}, [state, getComponentData]);
|
|
370
|
-
return react_1.default.createElement(
|
|
371
|
-
react_1.default.createElement(
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
393
|
+
return (react_1.default.createElement(material_1.Stack, { id: id, className: className, style: __assign(__assign({}, style), containerStyle) },
|
|
394
|
+
react_1.default.createElement(material_1.TextField, __assign({}, resolvedTextFieldProps, { disabled: disabledRule, value: inputValue, onChange: handleOnChange, slotProps: __assign(__assign({}, textFieldSlotProps), { formHelperText: __assign(__assign({}, FormHelperTextProps), textFieldSlotProps.formHelperText), htmlInput: __assign(__assign({}, inputProps), textFieldSlotProps.htmlInput), input: __assign(__assign(__assign({}, InputProps), textFieldSlotProps.input), { inputComponent: (cellphoneType) ? cellphoneMaskedInput : (_b = textFieldSlotProps.input) === null || _b === void 0 ? void 0 : _b.inputComponent, endAdornment: (react_1.default.createElement(material_1.InputAdornment, { position: 'end', style: endInputAdornmentStyle },
|
|
395
|
+
(validatedRule) && react_1.default.createElement(io_1.IoMdCheckmark, { color: exports.GREEN_COLOR, size: INPUT_ADORNMENT_ICON_SIZE }),
|
|
396
|
+
(noValidatedRule) && react_1.default.createElement(lia_1.LiaExclamationTriangleSolid, { color: ORANGE_COLOR, size: INPUT_ADORNMENT_ICON_SIZE }),
|
|
397
|
+
(loading.input) && react_1.default.createElement(material_1.CircularProgress, { color: 'secondary', size: INPUT_ADORNMENT_ICON_SIZE }),
|
|
398
|
+
(noValidatedRule) && (react_1.default.createElement(material_1.Button, { size: 'small', variant: 'contained', disableElevation: true, disabled: disabledRule || loading.validation || sendValidationCodeButtonDisabled, onClick: sendValidationCode }, "Validar")))) }), inputLabel: __assign(__assign({}, InputLabelProps), textFieldSlotProps.inputLabel), select: __assign(__assign({}, SelectProps), textFieldSlotProps.select) }) })),
|
|
376
399
|
(message.text) && (react_1.default.createElement("div", null,
|
|
377
|
-
react_1.default.createElement(
|
|
400
|
+
react_1.default.createElement(material_1.Typography, { style: messageStyle }, message.text))),
|
|
378
401
|
(codeWasSent) && (react_1.default.createElement(react_1.default.Fragment, null,
|
|
379
402
|
react_1.default.createElement("div", { className: 'otp-input-container' },
|
|
380
403
|
react_1.default.createElement(__1.OtpInput, { autoFocus: true, numInputs: 5, disabled: disabledRule || loading.validation, value: code, onChange: function (newCode) { return logicSetState({ type: 'code', value: newCode }); } })),
|
|
381
|
-
react_1.default.createElement(
|
|
382
|
-
|
|
404
|
+
react_1.default.createElement(material_1.Grid, { container: true, style: validateCodeButtonsContainerStyle, sx: {
|
|
405
|
+
alignItems: 'center'
|
|
406
|
+
} },
|
|
407
|
+
react_1.default.createElement(material_1.IconButton, { title: 'Chancelar', tabIndex: '1', size: 'small', disabled: disabledRule || loading.validation || loading.sendValidationLink, onClick: toSeal, style: sealButtonStyle },
|
|
383
408
|
react_1.default.createElement(exports.SealIcon, null)),
|
|
384
|
-
react_1.default.createElement(
|
|
385
|
-
(emailType) && (react_1.default.createElement(
|
|
409
|
+
react_1.default.createElement(material_1.Button, { color: 'primary', variant: 'contained', disableElevation: true, disabled: disabledRule || loading.validation || loading.sendValidationLink || (code.length < 5), startIcon: (loading.validation) ? react_1.default.createElement(material_1.CircularProgress, { color: 'secondary', size: 20 }) : null, onClick: validateCode, style: validateCodeButtonStyle }, "Validar c\u00F3digo")),
|
|
410
|
+
(emailType) && (react_1.default.createElement(material_1.Button, { variant: 'contained', disableElevation: true, disabled: disabledRule || loading.validation || loading.sendValidationLink, startIcon: (loading.sendValidationLink) ? react_1.default.createElement(material_1.CircularProgress, { color: 'secondary', size: 20 }) : null, onClick: sendValidationLink }, "Enviar link para valida\u00E7\u00E3o no e-mail"))))));
|
|
386
411
|
};
|
|
387
412
|
exports.default = ContactValidationInput;
|