argous 1.2.134 → 1.2.135
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/actions/index.d.ts +58 -0
- package/dist/actions/index.js +59 -0
- package/dist/api/WebSocket.d.ts +25 -0
- package/dist/api/WebSocket.js +170 -0
- package/dist/api/index.d.ts +63 -0
- package/dist/api/index.js +762 -0
- package/dist/api/ws.d.ts +4 -0
- package/dist/api/ws.js +36 -0
- package/dist/components/Alert/Alert.d.ts +8 -0
- package/dist/components/Alert/Alert.js +68 -0
- package/dist/components/Alert/index.d.ts +2 -0
- package/dist/components/Alert/index.js +8 -0
- package/dist/components/ArgousAction/ArgousAction.d.ts +8 -0
- package/dist/components/ArgousAction/ArgousAction.js +87 -0
- package/dist/components/ArgousAction/index.d.ts +2 -0
- package/dist/components/ArgousAction/index.js +8 -0
- package/dist/components/ArgousAvatar/ArgousAvatar.d.ts +14 -0
- package/dist/components/ArgousAvatar/ArgousAvatar.js +124 -0
- package/dist/components/ArgousAvatar/index.d.ts +2 -0
- package/dist/components/ArgousAvatar/index.js +8 -0
- package/dist/components/ArgousComplexPagination/ArgousComplexPagination.d.ts +76 -0
- package/dist/components/ArgousComplexPagination/ArgousComplexPagination.js +156 -0
- package/dist/components/ArgousComplexPagination/index.d.ts +2 -0
- package/dist/components/ArgousComplexPagination/index.js +8 -0
- package/dist/components/ArgousComplexTable/ArgousComplexTable.d.ts +131 -0
- package/dist/components/ArgousComplexTable/ArgousComplexTable.js +333 -0
- package/dist/components/ArgousComplexTable/index.d.ts +2 -0
- package/dist/components/ArgousComplexTable/index.js +8 -0
- package/dist/components/ArgousComplexTableBody/ArgousComplexTableBody.d.ts +177 -0
- package/dist/components/ArgousComplexTableBody/ArgousComplexTableBody.js +155 -0
- package/dist/components/ArgousComplexTableBody/index.d.ts +2 -0
- package/dist/components/ArgousComplexTableBody/index.js +8 -0
- package/dist/components/ArgousComplexTableHead/ArgousComplexTableHead.d.ts +73 -0
- package/dist/components/ArgousComplexTableHead/ArgousComplexTableHead.js +88 -0
- package/dist/components/ArgousComplexTableHead/index.d.ts +2 -0
- package/dist/components/ArgousComplexTableHead/index.js +8 -0
- package/dist/components/ArgousComplexTableToolbar/ArgousComplexTableToolBar.d.ts +58 -0
- package/dist/components/ArgousComplexTableToolbar/ArgousComplexTableToolBar.js +70 -0
- package/dist/components/ArgousComplexTableToolbar/index.d.ts +2 -0
- package/dist/components/ArgousComplexTableToolbar/index.js +8 -0
- package/dist/components/ArgousInput/ArgousInput.d.ts +8 -0
- package/dist/components/ArgousInput/ArgousInput.js +578 -0
- package/dist/components/ArgousInput/index.d.ts +2 -0
- package/dist/components/ArgousInput/index.js +8 -0
- package/dist/components/ArgousPagination/ArgousPagination.d.ts +8 -0
- package/dist/components/ArgousPagination/ArgousPagination.js +29 -0
- package/dist/components/ArgousPagination/index.d.ts +2 -0
- package/dist/components/ArgousPagination/index.js +8 -0
- package/dist/components/ArgousProgressBar/ArgousProgressBar.d.ts +22 -0
- package/dist/components/ArgousProgressBar/ArgousProgressBar.js +162 -0
- package/dist/components/ArgousProgressBar/index.d.ts +2 -0
- package/dist/components/ArgousProgressBar/index.js +8 -0
- package/dist/components/ArgousSimpleTable/ArgousSimpleTable.d.ts +8 -0
- package/dist/components/ArgousSimpleTable/ArgousSimpleTable.js +201 -0
- package/dist/components/ArgousSimpleTable/index.d.ts +2 -0
- package/dist/components/ArgousSimpleTable/index.js +8 -0
- package/dist/components/AutoComplete/AutoComplete.d.ts +8 -0
- package/dist/components/AutoComplete/AutoComplete.js +185 -0
- package/dist/components/AutoComplete/index.d.ts +2 -0
- package/dist/components/AutoComplete/index.js +8 -0
- package/dist/components/BarChart/BarChart.d.ts +8 -0
- package/dist/components/BarChart/BarChart.js +125 -0
- package/dist/components/BarChart/index.d.ts +2 -0
- package/dist/components/BarChart/index.js +8 -0
- package/dist/components/BarraFerramentas/BarraFerramentas.d.ts +21 -0
- package/dist/components/BarraFerramentas/BarraFerramentas.js +228 -0
- package/dist/components/BarraFerramentas/index.d.ts +2 -0
- package/dist/components/BarraFerramentas/index.js +8 -0
- package/dist/components/Button/Button.d.ts +8 -0
- package/dist/components/Button/Button.js +144 -0
- package/dist/components/Button/index.d.ts +2 -0
- package/dist/components/Button/index.js +8 -0
- package/dist/components/Cabecalho/Cabecalho.d.ts +8 -0
- package/dist/components/Cabecalho/Cabecalho.js +231 -0
- package/dist/components/Cabecalho/index.d.ts +2 -0
- package/dist/components/Cabecalho/index.js +8 -0
- package/dist/components/Calendar/Calendar.d.ts +8 -0
- package/dist/components/Calendar/Calendar.js +171 -0
- package/dist/components/Calendar/index.d.ts +2 -0
- package/dist/components/Calendar/index.js +8 -0
- package/dist/components/CartaoUsuario/CartaoUsuario.d.ts +9 -0
- package/dist/components/CartaoUsuario/CartaoUsuario.js +165 -0
- package/dist/components/CartaoUsuario/index.d.ts +2 -0
- package/dist/components/CartaoUsuario/index.js +8 -0
- package/dist/components/Collapse/Collapse.d.ts +60 -0
- package/dist/components/Collapse/Collapse.js +290 -0
- package/dist/components/Collapse/index.d.ts +3 -0
- package/dist/components/Collapse/index.js +8 -0
- package/dist/components/Compartilhar/Compartilhar.d.ts +7 -0
- package/dist/components/Compartilhar/Compartilhar.js +266 -0
- package/dist/components/Compartilhar/index.d.ts +2 -0
- package/dist/components/Compartilhar/index.js +8 -0
- package/dist/components/ConfirmModal/BasicModal.d.ts +38 -0
- package/dist/components/ConfirmModal/BasicModal.js +29 -0
- package/dist/components/ConfirmModal/ModalProvider.d.ts +5 -0
- package/dist/components/ConfirmModal/ModalProvider.js +108 -0
- package/dist/components/ConfirmModal/WrapperModal.d.ts +18 -0
- package/dist/components/ConfirmModal/WrapperModal.js +41 -0
- package/dist/components/ConfirmModal/index.d.ts +20 -0
- package/dist/components/ConfirmModal/index.js +25 -0
- package/dist/components/DropArea/DropArea.d.ts +21 -0
- package/dist/components/DropArea/DropArea.js +149 -0
- package/dist/components/DropArea/Html5FileSelector.d.ts +16 -0
- package/dist/components/DropArea/Html5FileSelector.js +229 -0
- package/dist/components/DropArea/index.d.ts +2 -0
- package/dist/components/DropArea/index.js +8 -0
- package/dist/components/Editor/Events.d.ts +79 -0
- package/dist/components/Editor/Events.js +9 -0
- package/dist/components/Editor/ScriptLoader.d.ts +20 -0
- package/dist/components/Editor/ScriptLoader.js +70 -0
- package/dist/components/Editor/TinyMCE.d.ts +10 -0
- package/dist/components/Editor/TinyMCE.js +16 -0
- package/dist/components/Editor/Utils.d.ts +19 -0
- package/dist/components/Editor/Utils.js +62 -0
- package/dist/components/Editor/components/Editor.d.ts +67 -0
- package/dist/components/Editor/components/Editor.js +351 -0
- package/dist/components/Editor/components/EditorPropTypes.d.ts +18 -0
- package/dist/components/Editor/components/EditorPropTypes.js +110 -0
- package/dist/components/Editor/index.d.ts +9 -0
- package/dist/components/Editor/index.js +12 -0
- package/dist/components/Editor/tinymce/tinymce.d.ts +2963 -0
- package/dist/components/FilePreparer/FilePreparer.d.ts +26 -0
- package/dist/components/FilePreparer/FilePreparer.js +279 -0
- package/dist/components/FilePreparer/index.d.ts +2 -0
- package/dist/components/FilePreparer/index.js +8 -0
- package/dist/components/FileUploader/FileUploader.d.ts +9 -0
- package/dist/components/FileUploader/FileUploader.js +445 -0
- package/dist/components/FileUploader/index.d.ts +2 -0
- package/dist/components/FileUploader/index.js +8 -0
- package/dist/components/FormVisualizer/FormVisualizer.d.ts +92 -0
- package/dist/components/FormVisualizer/FormVisualizer.js +264 -0
- package/dist/components/FormVisualizer/index.d.ts +2 -0
- package/dist/components/FormVisualizer/index.js +8 -0
- package/dist/components/Highlight/Highlight.d.ts +7 -0
- package/dist/components/Highlight/Highlight.js +75 -0
- package/dist/components/Highlight/index.d.ts +2 -0
- package/dist/components/Highlight/index.js +8 -0
- package/dist/components/ImageResize/ImageResize.d.ts +28 -0
- package/dist/components/ImageResize/ImageResize.js +472 -0
- package/dist/components/ImageResize/index.d.ts +2 -0
- package/dist/components/ImageResize/index.js +8 -0
- package/dist/components/ImageResizeButton/ImageResizeButton.d.ts +26 -0
- package/dist/components/ImageResizeButton/ImageResizeButton.js +89 -0
- package/dist/components/ImageResizeButton/index.d.ts +2 -0
- package/dist/components/ImageResizeButton/index.js +8 -0
- package/dist/components/Input/Input.d.ts +8 -0
- package/dist/components/Input/Input.js +328 -0
- package/dist/components/Input/index.d.ts +2 -0
- package/dist/components/Input/index.js +8 -0
- package/dist/components/InputTags/InputTags.d.ts +8 -0
- package/dist/components/InputTags/InputTags.js +129 -0
- package/dist/components/InputTags/index.d.ts +2 -0
- package/dist/components/InputTags/index.js +8 -0
- package/dist/components/ListSelect/ListSelect.d.ts +8 -0
- package/dist/components/ListSelect/ListSelect.js +126 -0
- package/dist/components/ListSelect/index.d.ts +2 -0
- package/dist/components/ListSelect/index.js +8 -0
- package/dist/components/MaterialButton/MaterialButton.d.ts +13 -0
- package/dist/components/MaterialButton/MaterialButton.js +192 -0
- package/dist/components/MaterialButton/index.d.ts +2 -0
- package/dist/components/MaterialButton/index.js +8 -0
- package/dist/components/MenuBar/MenuBar.d.ts +8 -0
- package/dist/components/MenuBar/MenuBar.js +157 -0
- package/dist/components/MenuBar/index.d.ts +2 -0
- package/dist/components/MenuBar/index.js +8 -0
- package/dist/components/MonthPicker/MonthPicker.d.ts +8 -0
- package/dist/components/MonthPicker/MonthPicker.js +288 -0
- package/dist/components/MonthPicker/index.d.ts +2 -0
- package/dist/components/MonthPicker/index.js +8 -0
- package/dist/components/MultipleSelect/MultipleSelect.d.ts +8 -0
- package/dist/components/MultipleSelect/MultipleSelect.js +139 -0
- package/dist/components/MultipleSelect/index.d.ts +2 -0
- package/dist/components/MultipleSelect/index.js +8 -0
- package/dist/components/OtpInput/OtpInput.d.ts +18 -0
- package/dist/components/OtpInput/OtpInput.js +207 -0
- package/dist/components/OtpInput/index.d.ts +2 -0
- package/dist/components/OtpInput/index.js +8 -0
- package/dist/components/OutputText/OutputText.d.ts +8 -0
- package/dist/components/OutputText/OutputText.js +89 -0
- package/dist/components/OutputText/index.d.ts +2 -0
- package/dist/components/OutputText/index.js +8 -0
- package/dist/components/Pagination/Pagination.d.ts +8 -0
- package/dist/components/Pagination/Pagination.js +64 -0
- package/dist/components/Pagination/index.d.ts +2 -0
- package/dist/components/Pagination/index.js +8 -0
- package/dist/components/Programa/Programa.d.ts +31 -0
- package/dist/components/Programa/Programa.js +201 -0
- package/dist/components/Programa/index.d.ts +2 -0
- package/dist/components/Programa/index.js +8 -0
- package/dist/components/ProgressBar/ProgressBar.d.ts +8 -0
- package/dist/components/ProgressBar/ProgressBar.js +98 -0
- package/dist/components/ProgressBar/index.d.ts +2 -0
- package/dist/components/ProgressBar/index.js +8 -0
- package/dist/components/Select/Select.d.ts +8 -0
- package/dist/components/Select/Select.js +142 -0
- package/dist/components/Select/index.d.ts +2 -0
- package/dist/components/Select/index.js +8 -0
- package/dist/components/SimpleTable/SimpleTable.d.ts +13 -0
- package/dist/components/SimpleTable/SimpleTable.js +390 -0
- package/dist/components/SimpleTable/index.d.ts +2 -0
- package/dist/components/SimpleTable/index.js +10 -0
- package/dist/components/Stepper/Stepper.d.ts +54 -0
- package/dist/components/Stepper/Stepper.js +157 -0
- package/dist/components/Stepper/index.d.ts +2 -0
- package/dist/components/Stepper/index.js +8 -0
- package/dist/components/TablePicker/TablePicker.d.ts +8 -0
- package/dist/components/TablePicker/TablePicker.js +222 -0
- package/dist/components/TablePicker/index.d.ts +2 -0
- package/dist/components/TablePicker/index.js +8 -0
- package/dist/components/Tabs/Tabs.d.ts +8 -0
- package/dist/components/Tabs/Tabs.js +76 -0
- package/dist/components/Tabs/index.d.ts +2 -0
- package/dist/components/Tabs/index.js +8 -0
- package/dist/components/TextArea/TextArea.d.ts +8 -0
- package/dist/components/TextArea/TextArea.js +148 -0
- package/dist/components/TextArea/index.d.ts +2 -0
- package/dist/components/TextArea/index.js +8 -0
- package/dist/components/ThreadLog/ThreadLog.d.ts +8 -0
- package/dist/components/ThreadLog/ThreadLog.js +225 -0
- package/dist/components/ThreadLog/index.d.ts +2 -0
- package/dist/components/ThreadLog/index.js +8 -0
- package/dist/components/UtilAutoComplete/UtilAutoComplete.d.ts +93 -0
- package/dist/components/UtilAutoComplete/UtilAutoComplete.js +188 -0
- package/dist/components/UtilAutoComplete/index.d.ts +2 -0
- package/dist/components/UtilAutoComplete/index.js +8 -0
- package/dist/components/index.d.ts +148 -0
- package/dist/components/index.js +162 -0
- package/dist/fieldsRedux/createField.d.ts +8 -0
- package/dist/fieldsRedux/createField.js +149 -0
- package/dist/fieldsRedux/fieldsRedux.d.ts +71 -0
- package/dist/fieldsRedux/fieldsRedux.js +436 -0
- package/dist/fieldsRedux/index.d.ts +4 -0
- package/dist/fieldsRedux/index.js +27 -0
- package/dist/fieldsRedux/passFields.d.ts +5 -0
- package/dist/fieldsRedux/passFields.js +107 -0
- package/dist/reducers/argous.d.ts +76 -0
- package/dist/reducers/argous.js +63 -0
- package/dist/reducers/index.d.ts +4 -0
- package/dist/reducers/index.js +9 -0
- package/dist/types.d.ts +144 -0
- package/dist/utils/api.d.ts +29 -0
- package/dist/utils/api.js +255 -0
- package/dist/utils/config.d.ts +3 -0
- package/dist/utils/config.js +13 -0
- package/dist/utils/date.d.ts +8 -0
- package/dist/utils/date.js +60 -0
- package/dist/utils/index.d.ts +61 -0
- package/dist/utils/index.js +383 -0
- package/dist/utils/rippleEffect.d.ts +2 -0
- package/dist/utils/rippleEffect.js +173 -0
- package/dist/utils/store.d.ts +3 -0
- package/dist/utils/store.js +12 -0
- package/dist/utils/xmlToJson.d.ts +2 -0
- package/dist/utils/xmlToJson.js +158 -0
- package/lib/api/index.js +16 -0
- package/package.json +1 -1
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import { StandardProps } from '@material-ui/core';
|
|
2
|
+
import { TransitionProps } from '@material-ui/core/transitions/transition';
|
|
3
|
+
import * as React from 'react';
|
|
4
|
+
|
|
5
|
+
export interface CollapseProps extends StandardProps<TransitionProps, CollapseClassKey, 'timeout'> {
|
|
6
|
+
/**
|
|
7
|
+
* The content node to be collapsed.
|
|
8
|
+
*/
|
|
9
|
+
children?: React.ReactNode;
|
|
10
|
+
/**
|
|
11
|
+
* The height of the container when collapsed.
|
|
12
|
+
*/
|
|
13
|
+
collapsedHeight?: string | number;
|
|
14
|
+
/**
|
|
15
|
+
* The component used for the root node.
|
|
16
|
+
* Either a string to use a HTML element or a component.
|
|
17
|
+
*/
|
|
18
|
+
component?: React.ElementType<TransitionProps>;
|
|
19
|
+
/**
|
|
20
|
+
* Enable this prop if you encounter 'Function components cannot be given refs',
|
|
21
|
+
* use `unstable_createStrictModeTheme`,
|
|
22
|
+
* and can't forward the ref in the passed `Component`.
|
|
23
|
+
*/
|
|
24
|
+
disableStrictModeCompat?: boolean;
|
|
25
|
+
/**
|
|
26
|
+
* If `true`, the component will transition in.
|
|
27
|
+
*/
|
|
28
|
+
in?: boolean;
|
|
29
|
+
/**
|
|
30
|
+
* The duration for the transition, in milliseconds.
|
|
31
|
+
* You may specify a single timeout for all transitions, or individually with an object.
|
|
32
|
+
*
|
|
33
|
+
* Set to 'auto' to automatically calculate transition time based on height.
|
|
34
|
+
*/
|
|
35
|
+
timeout?: TransitionProps['timeout'] | 'auto';
|
|
36
|
+
/**
|
|
37
|
+
* Orientation of the collapse
|
|
38
|
+
*/
|
|
39
|
+
orientation?: 'vertical' | 'horizontal'
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
export type CollapseClassKey = 'container' | 'entered' | 'hidden' | 'wrapper' | 'wrapperInner';
|
|
43
|
+
|
|
44
|
+
/**
|
|
45
|
+
* The Collapse transition is used by the
|
|
46
|
+
* [Vertical Stepper](https://material-ui.com/components/steppers/#vertical-stepper) StepContent component.
|
|
47
|
+
* It uses [react-transition-group](https://github.com/reactjs/react-transition-group) internally.
|
|
48
|
+
* Demos:
|
|
49
|
+
*
|
|
50
|
+
* - [Cards](https://material-ui.com/components/cards/)
|
|
51
|
+
* - [Lists](https://material-ui.com/components/lists/)
|
|
52
|
+
* - [Transitions](https://material-ui.com/components/transitions/)
|
|
53
|
+
*
|
|
54
|
+
* API:
|
|
55
|
+
*
|
|
56
|
+
* - [Collapse API](https://material-ui.com/api/collapse/)
|
|
57
|
+
* - inherits [Transition API](https://reactcommunity.org/react-transition-group/transition#Transition-props)
|
|
58
|
+
*/
|
|
59
|
+
|
|
60
|
+
export default function Collapse(props: CollapseProps): JSX.Element;
|
|
@@ -0,0 +1,290 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __assign = (this && this.__assign) || function () {
|
|
3
|
+
__assign = Object.assign || function(t) {
|
|
4
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
5
|
+
s = arguments[i];
|
|
6
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
7
|
+
t[p] = s[p];
|
|
8
|
+
}
|
|
9
|
+
return t;
|
|
10
|
+
};
|
|
11
|
+
return __assign.apply(this, arguments);
|
|
12
|
+
};
|
|
13
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
14
|
+
if (k2 === undefined) k2 = k;
|
|
15
|
+
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
|
|
16
|
+
}) : (function(o, m, k, k2) {
|
|
17
|
+
if (k2 === undefined) k2 = k;
|
|
18
|
+
o[k2] = m[k];
|
|
19
|
+
}));
|
|
20
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
21
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
22
|
+
}) : function(o, v) {
|
|
23
|
+
o["default"] = v;
|
|
24
|
+
});
|
|
25
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
26
|
+
if (mod && mod.__esModule) return mod;
|
|
27
|
+
var result = {};
|
|
28
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
29
|
+
__setModuleDefault(result, mod);
|
|
30
|
+
return result;
|
|
31
|
+
};
|
|
32
|
+
var __rest = (this && this.__rest) || function (s, e) {
|
|
33
|
+
var t = {};
|
|
34
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
35
|
+
t[p] = s[p];
|
|
36
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
37
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
38
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
39
|
+
t[p[i]] = s[p[i]];
|
|
40
|
+
}
|
|
41
|
+
return t;
|
|
42
|
+
};
|
|
43
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
44
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
45
|
+
};
|
|
46
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
47
|
+
exports.styles = void 0;
|
|
48
|
+
var core_1 = require("@material-ui/core");
|
|
49
|
+
var transitions_1 = require("@material-ui/core/styles/transitions");
|
|
50
|
+
var withStyles_1 = __importDefault(require("@material-ui/core/styles/withStyles"));
|
|
51
|
+
var utils_1 = require("@material-ui/core/transitions/utils");
|
|
52
|
+
var clsx_1 = __importDefault(require("clsx"));
|
|
53
|
+
var prop_types_1 = __importDefault(require("prop-types"));
|
|
54
|
+
var React = __importStar(require("react"));
|
|
55
|
+
var react_transition_group_1 = require("react-transition-group");
|
|
56
|
+
var styles = function (theme) { return ({
|
|
57
|
+
/* Styles applied to the container element. */
|
|
58
|
+
container: {
|
|
59
|
+
position: 'relative',
|
|
60
|
+
overflow: 'hidden',
|
|
61
|
+
height: 0,
|
|
62
|
+
transition: theme.transitions.create('height'),
|
|
63
|
+
'&$horizontal': {
|
|
64
|
+
width: 0,
|
|
65
|
+
height: 'auto',
|
|
66
|
+
transition: theme.transitions.create('width'),
|
|
67
|
+
},
|
|
68
|
+
},
|
|
69
|
+
/* Pseudo-class applied to the root element if `orientation="horizontal"`. */
|
|
70
|
+
horizontal: {},
|
|
71
|
+
/* Styles applied to the container element when the transition has entered. */
|
|
72
|
+
entered: {
|
|
73
|
+
height: 'auto',
|
|
74
|
+
overflow: 'visible',
|
|
75
|
+
'&$horizontal': {
|
|
76
|
+
height: 'initial',
|
|
77
|
+
width: 'auto',
|
|
78
|
+
},
|
|
79
|
+
},
|
|
80
|
+
/* Styles applied to the container element when the transition has exited and `collapsedHeight` != 0px. */
|
|
81
|
+
hidden: {
|
|
82
|
+
visibility: 'hidden',
|
|
83
|
+
},
|
|
84
|
+
/* Styles applied to the outer wrapper element. */
|
|
85
|
+
wrapper: {
|
|
86
|
+
// Hack to get children with a negative margin to not falsify the height computation.
|
|
87
|
+
display: 'flex',
|
|
88
|
+
},
|
|
89
|
+
/* Styles applied to the inner wrapper element. */
|
|
90
|
+
wrapperInner: {
|
|
91
|
+
width: '100%',
|
|
92
|
+
'&$horizontal': {
|
|
93
|
+
// width: 'initial',
|
|
94
|
+
height: '100%',
|
|
95
|
+
},
|
|
96
|
+
},
|
|
97
|
+
}); };
|
|
98
|
+
exports.styles = styles;
|
|
99
|
+
/**
|
|
100
|
+
* The Collapse transition is used by the
|
|
101
|
+
* [Vertical Stepper](/components/steppers/#vertical-stepper) StepContent component.
|
|
102
|
+
* It uses [react-transition-group](https://github.com/reactjs/react-transition-group) internally.
|
|
103
|
+
*/
|
|
104
|
+
var Collapse = React.forwardRef(function Collapse(props, ref) {
|
|
105
|
+
var children = props.children, classes = props.classes, className = props.className, _a = props.collapsedHeight, collapsedHeight = _a === void 0 ? '0px' : _a, _b = props.collapsedSize, collapsedSizeProp = _b === void 0 ? '0px' : _b, _c = props.component, Component = _c === void 0 ? 'div' : _c, inProp = props.in, onEnter = props.onEnter, onEntered = props.onEntered, onEntering = props.onEntering, onExit = props.onExit, onExiting = props.onExiting, _d = props.orientation, orientation = _d === void 0 ? 'vertical' : _d, _e = props.style, style = _e === void 0 ? {} : _e, _f = props.timeout, timeout = _f === void 0 ? transitions_1.duration.standard : _f,
|
|
106
|
+
// eslint-disable-next-line react/prop-types
|
|
107
|
+
_g = props.TransitionComponent,
|
|
108
|
+
// eslint-disable-next-line react/prop-types
|
|
109
|
+
TransitionComponent = _g === void 0 ? react_transition_group_1.Transition : _g, other = __rest(props, ["children", "classes", "className", "collapsedHeight", "collapsedSize", "component", "in", "onEnter", "onEntered", "onEntering", "onExit", "onExiting", "orientation", "style", "timeout", "TransitionComponent"]);
|
|
110
|
+
var theme = core_1.useTheme();
|
|
111
|
+
var timer = React.useRef();
|
|
112
|
+
var wrapperRef = React.useRef(null);
|
|
113
|
+
var autoTransitionDuration = React.useRef();
|
|
114
|
+
var collapsedSizeOrHeight = collapsedHeight === '0px' ? collapsedSizeProp : collapsedHeight;
|
|
115
|
+
var collapsedSize = typeof collapsedSizeOrHeight === 'number'
|
|
116
|
+
? collapsedSizeOrHeight + "px"
|
|
117
|
+
: collapsedSizeOrHeight;
|
|
118
|
+
var isHorizontal = orientation === 'horizontal';
|
|
119
|
+
var size = isHorizontal ? 'width' : 'height';
|
|
120
|
+
React.useEffect(function () {
|
|
121
|
+
return function () {
|
|
122
|
+
clearTimeout(timer.current);
|
|
123
|
+
};
|
|
124
|
+
}, []);
|
|
125
|
+
var handleEnter = function (node, isAppearing) {
|
|
126
|
+
// Set absolute position to get the size of collapsed content
|
|
127
|
+
wrapperRef.current.style.position = 'absolute';
|
|
128
|
+
node.style[size] = collapsedSize;
|
|
129
|
+
if (onEnter) {
|
|
130
|
+
onEnter(node, isAppearing);
|
|
131
|
+
}
|
|
132
|
+
};
|
|
133
|
+
var handleEntering = function (node, isAppearing) {
|
|
134
|
+
var wrapperSize = wrapperRef.current[isHorizontal ? 'clientWidth' : 'clientHeight'];
|
|
135
|
+
// After the size is read reset the position back to default
|
|
136
|
+
wrapperRef.current.style.position = '';
|
|
137
|
+
var transitionDuration = utils_1.getTransitionProps({ style: style, timeout: timeout }, {
|
|
138
|
+
mode: 'enter',
|
|
139
|
+
}).duration;
|
|
140
|
+
if (timeout === 'auto') {
|
|
141
|
+
var duration2 = theme.transitions.getAutoHeightDuration(wrapperSize);
|
|
142
|
+
node.style.transitionDuration = duration2 + "ms";
|
|
143
|
+
autoTransitionDuration.current = duration2;
|
|
144
|
+
}
|
|
145
|
+
else {
|
|
146
|
+
node.style.transitionDuration
|
|
147
|
+
= typeof transitionDuration === 'string' ? transitionDuration : transitionDuration + "ms";
|
|
148
|
+
}
|
|
149
|
+
node.style[size] = wrapperSize + "px";
|
|
150
|
+
if (onEntering) {
|
|
151
|
+
onEntering(node, isAppearing);
|
|
152
|
+
}
|
|
153
|
+
};
|
|
154
|
+
var handleEntered = function (node, isAppearing) {
|
|
155
|
+
node.style[size] = style[size] || 'auto';
|
|
156
|
+
if (onEntered) {
|
|
157
|
+
onEntered(node, isAppearing);
|
|
158
|
+
}
|
|
159
|
+
};
|
|
160
|
+
var handleExit = function (node) {
|
|
161
|
+
var wrapperSize = wrapperRef.current[isHorizontal ? 'clientWidth' : 'clientHeight'];
|
|
162
|
+
node.style[size] = wrapperSize + "px";
|
|
163
|
+
if (onExit) {
|
|
164
|
+
onExit(node);
|
|
165
|
+
}
|
|
166
|
+
};
|
|
167
|
+
var handleExiting = function (node) {
|
|
168
|
+
var wrapperSize = wrapperRef.current[isHorizontal ? 'clientWidth' : 'clientHeight'];
|
|
169
|
+
var transitionDuration = utils_1.getTransitionProps({ style: style, timeout: timeout }, {
|
|
170
|
+
mode: 'exit',
|
|
171
|
+
}).duration;
|
|
172
|
+
if (timeout === 'auto') {
|
|
173
|
+
// TODO: rename getAutoHeightDuration to something more generic (width support)
|
|
174
|
+
// Actually it just calculates animation duration based on size
|
|
175
|
+
var duration2 = theme.transitions.getAutoHeightDuration(wrapperSize);
|
|
176
|
+
node.style.transitionDuration = duration2 + "ms";
|
|
177
|
+
autoTransitionDuration.current = duration2;
|
|
178
|
+
}
|
|
179
|
+
else {
|
|
180
|
+
node.style.transitionDuration
|
|
181
|
+
= typeof transitionDuration === 'string' ? transitionDuration : transitionDuration + "ms";
|
|
182
|
+
}
|
|
183
|
+
node.style[size] = collapsedSize;
|
|
184
|
+
if (onExiting) {
|
|
185
|
+
onExiting(node);
|
|
186
|
+
}
|
|
187
|
+
};
|
|
188
|
+
var addEndListener = function (_, next) {
|
|
189
|
+
if (timeout === 'auto') {
|
|
190
|
+
timer.current = setTimeout(next, autoTransitionDuration.current || 0);
|
|
191
|
+
}
|
|
192
|
+
};
|
|
193
|
+
return (React.createElement(TransitionComponent, __assign({ in: inProp, onEnter: handleEnter, onEntered: handleEntered, onEntering: handleEntering, onExit: handleExit, onExiting: handleExiting, addEndListener: addEndListener, timeout: timeout === 'auto' ? null : timeout }, other), function (state, childProps) {
|
|
194
|
+
var _a, _b, _c;
|
|
195
|
+
return (React.createElement(Component, __assign({ className: clsx_1.default(classes.container, (_a = {},
|
|
196
|
+
_a[classes.horizontal] = isHorizontal,
|
|
197
|
+
_a[classes.entered] = state === 'entered',
|
|
198
|
+
_a[classes.hidden] = state === 'exited' && !inProp && collapsedSize === '0px',
|
|
199
|
+
_a), className), style: __assign((_b = {}, _b[isHorizontal ? 'minWidth' : 'minHeight'] = collapsedSize, _b), style), ref: ref }, childProps),
|
|
200
|
+
React.createElement("div", { className: classes.wrapper, ref: wrapperRef },
|
|
201
|
+
React.createElement("div", { className: clsx_1.default(classes.wrapperInner, (_c = {},
|
|
202
|
+
_c[classes.horizontal] = isHorizontal,
|
|
203
|
+
_c)) }, children))));
|
|
204
|
+
}));
|
|
205
|
+
});
|
|
206
|
+
Collapse.propTypes = {
|
|
207
|
+
// ----------------------------- Warning --------------------------------
|
|
208
|
+
// | These PropTypes are generated from the TypeScript type definitions |
|
|
209
|
+
// | To update them edit the d.ts file and run "yarn proptypes" |
|
|
210
|
+
// ----------------------------------------------------------------------
|
|
211
|
+
/**
|
|
212
|
+
* The content node to be collapsed.
|
|
213
|
+
*/
|
|
214
|
+
children: prop_types_1.default.node,
|
|
215
|
+
/**
|
|
216
|
+
* Override or extend the styles applied to the component.
|
|
217
|
+
* See [CSS API](#css) below for more details.
|
|
218
|
+
*/
|
|
219
|
+
classes: prop_types_1.default.object,
|
|
220
|
+
/**
|
|
221
|
+
* @ignore
|
|
222
|
+
*/
|
|
223
|
+
className: prop_types_1.default.string,
|
|
224
|
+
/**
|
|
225
|
+
* @ignore
|
|
226
|
+
* @deprecated
|
|
227
|
+
* The height of the container when collapsed.
|
|
228
|
+
*
|
|
229
|
+
* This prop will be deprecated and removed in v5, use collapsedSize instead.
|
|
230
|
+
*/
|
|
231
|
+
collapsedHeight: prop_types_1.default.oneOfType([prop_types_1.default.number, prop_types_1.default.string]),
|
|
232
|
+
/**
|
|
233
|
+
* The width (horizontal) or height (vertical) of the container when collapsed.
|
|
234
|
+
*/
|
|
235
|
+
collapsedSize: prop_types_1.default.oneOfType([prop_types_1.default.number, prop_types_1.default.string]),
|
|
236
|
+
/**
|
|
237
|
+
* The component used for the root node.
|
|
238
|
+
* Either a string to use a DOM element or a component.
|
|
239
|
+
*/
|
|
240
|
+
component: prop_types_1.default.elementType,
|
|
241
|
+
/**
|
|
242
|
+
* If `true`, the component will transition in.
|
|
243
|
+
*/
|
|
244
|
+
in: prop_types_1.default.bool,
|
|
245
|
+
/**
|
|
246
|
+
* @ignore
|
|
247
|
+
*/
|
|
248
|
+
onEnter: prop_types_1.default.func,
|
|
249
|
+
/**
|
|
250
|
+
* @ignore
|
|
251
|
+
*/
|
|
252
|
+
onEntered: prop_types_1.default.func,
|
|
253
|
+
/**
|
|
254
|
+
* @ignore
|
|
255
|
+
*/
|
|
256
|
+
onEntering: prop_types_1.default.func,
|
|
257
|
+
/**
|
|
258
|
+
* @ignore
|
|
259
|
+
*/
|
|
260
|
+
onExit: prop_types_1.default.func,
|
|
261
|
+
/**
|
|
262
|
+
* @ignore
|
|
263
|
+
*/
|
|
264
|
+
onExiting: prop_types_1.default.func,
|
|
265
|
+
/**
|
|
266
|
+
* The collapse transition orientation.
|
|
267
|
+
*/
|
|
268
|
+
orientation: prop_types_1.default.oneOf(['horizontal', 'vertical']),
|
|
269
|
+
/**
|
|
270
|
+
* @ignore
|
|
271
|
+
*/
|
|
272
|
+
style: prop_types_1.default.object,
|
|
273
|
+
/**
|
|
274
|
+
* The duration for the transition, in milliseconds.
|
|
275
|
+
* You may specify a single timeout for all transitions, or individually with an object.
|
|
276
|
+
*
|
|
277
|
+
* Set to 'auto' to automatically calculate transition time based on height.
|
|
278
|
+
*/
|
|
279
|
+
timeout: prop_types_1.default.oneOfType([
|
|
280
|
+
prop_types_1.default.oneOf(['auto']),
|
|
281
|
+
prop_types_1.default.number,
|
|
282
|
+
prop_types_1.default.shape({
|
|
283
|
+
appear: prop_types_1.default.number,
|
|
284
|
+
enter: prop_types_1.default.number,
|
|
285
|
+
exit: prop_types_1.default.number,
|
|
286
|
+
}),
|
|
287
|
+
]),
|
|
288
|
+
};
|
|
289
|
+
Collapse.muiSupportAuto = true;
|
|
290
|
+
exports.default = withStyles_1.default(exports.styles, { name: 'MuiCollapse' })(Collapse);
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.default = void 0;
|
|
7
|
+
var Collapse_1 = require("./Collapse");
|
|
8
|
+
Object.defineProperty(exports, "default", { enumerable: true, get: function () { return __importDefault(Collapse_1).default; } });
|
|
@@ -0,0 +1,266 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __assign = (this && this.__assign) || function () {
|
|
3
|
+
__assign = Object.assign || function(t) {
|
|
4
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
5
|
+
s = arguments[i];
|
|
6
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
7
|
+
t[p] = s[p];
|
|
8
|
+
}
|
|
9
|
+
return t;
|
|
10
|
+
};
|
|
11
|
+
return __assign.apply(this, arguments);
|
|
12
|
+
};
|
|
13
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
14
|
+
if (k2 === undefined) k2 = k;
|
|
15
|
+
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
|
|
16
|
+
}) : (function(o, m, k, k2) {
|
|
17
|
+
if (k2 === undefined) k2 = k;
|
|
18
|
+
o[k2] = m[k];
|
|
19
|
+
}));
|
|
20
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
21
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
22
|
+
}) : function(o, v) {
|
|
23
|
+
o["default"] = v;
|
|
24
|
+
});
|
|
25
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
26
|
+
if (mod && mod.__esModule) return mod;
|
|
27
|
+
var result = {};
|
|
28
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
29
|
+
__setModuleDefault(result, mod);
|
|
30
|
+
return result;
|
|
31
|
+
};
|
|
32
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
33
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
34
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
35
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
36
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
37
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
38
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
39
|
+
});
|
|
40
|
+
};
|
|
41
|
+
var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
42
|
+
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
|
43
|
+
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
44
|
+
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
45
|
+
function step(op) {
|
|
46
|
+
if (f) throw new TypeError("Generator is already executing.");
|
|
47
|
+
while (_) try {
|
|
48
|
+
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
49
|
+
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
50
|
+
switch (op[0]) {
|
|
51
|
+
case 0: case 1: t = op; break;
|
|
52
|
+
case 4: _.label++; return { value: op[1], done: false };
|
|
53
|
+
case 5: _.label++; y = op[1]; op = [0]; continue;
|
|
54
|
+
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
|
55
|
+
default:
|
|
56
|
+
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
|
57
|
+
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
|
58
|
+
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
|
59
|
+
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
|
60
|
+
if (t[2]) _.ops.pop();
|
|
61
|
+
_.trys.pop(); continue;
|
|
62
|
+
}
|
|
63
|
+
op = body.call(thisArg, _);
|
|
64
|
+
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
|
65
|
+
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
66
|
+
}
|
|
67
|
+
};
|
|
68
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
69
|
+
var index_1 = require("../../api/index");
|
|
70
|
+
var index_2 = require("../../utils/index");
|
|
71
|
+
var core_1 = require("@material-ui/core");
|
|
72
|
+
var lab_1 = require("@material-ui/lab");
|
|
73
|
+
var react_1 = __importStar(require("react"));
|
|
74
|
+
var md_1 = require("react-icons/md");
|
|
75
|
+
var useStyles = core_1.makeStyles({
|
|
76
|
+
fundoCompartilhar: {
|
|
77
|
+
width: '500px',
|
|
78
|
+
padding: '20px',
|
|
79
|
+
marginTop: 5,
|
|
80
|
+
}
|
|
81
|
+
});
|
|
82
|
+
var Compartilhar = react_1.forwardRef(function (props, ref) {
|
|
83
|
+
var _a = react_1.useState(''), metodoCompartilhar = _a[0], setMetodoCompartilhar = _a[1];
|
|
84
|
+
var _b = react_1.useState(''), mensagemEmail = _b[0], setMensagemEmail = _b[1];
|
|
85
|
+
var _c = react_1.useState([]), email = _c[0], setEmail = _c[1];
|
|
86
|
+
var _d = react_1.useState(''), stringEmail = _d[0], setStringEmail = _d[1];
|
|
87
|
+
var _f = react_1.useState([]), notificacao = _f[0], setNotificacao = _f[1];
|
|
88
|
+
var _g = react_1.useState(''), stringNotificacao = _g[0], setStringNotificacao = _g[1];
|
|
89
|
+
var _h = react_1.useState(''), mensagemNotificação = _h[0], setMensagemNotificacao = _h[1];
|
|
90
|
+
var link = props.linkCompartilhamento;
|
|
91
|
+
var _j = react_1.useState(false), copiado = _j[0], setCopiado = _j[1];
|
|
92
|
+
var _k = react_1.useState(false), enviado = _k[0], setEnviado = _k[1];
|
|
93
|
+
var _l = react_1.useState([]), options = _l[0], setOptions = _l[1];
|
|
94
|
+
var erroVazio = { email: '', stringEmail: '', notificacao: '', stringNotificacao: '' };
|
|
95
|
+
var _m = react_1.useState(erroVazio), erro = _m[0], setErro = _m[1];
|
|
96
|
+
var classes = useStyles();
|
|
97
|
+
function copiarParaAreaDeTransferencia() {
|
|
98
|
+
var link = document.getElementById('link');
|
|
99
|
+
link.select();
|
|
100
|
+
link.setSelectionRange(0, 99999);
|
|
101
|
+
document.execCommand('copy');
|
|
102
|
+
setCopiado(true);
|
|
103
|
+
setTimeout(function () {
|
|
104
|
+
setCopiado(false);
|
|
105
|
+
}, 3500);
|
|
106
|
+
}
|
|
107
|
+
react_1.useEffect(function () {
|
|
108
|
+
if (stringEmail.length < 3 && stringNotificacao.length < 3)
|
|
109
|
+
return;
|
|
110
|
+
(function () { return __awaiter(void 0, void 0, void 0, function () {
|
|
111
|
+
var res;
|
|
112
|
+
return __generator(this, function (_a) {
|
|
113
|
+
switch (_a.label) {
|
|
114
|
+
case 0: return [4 /*yield*/, index_1.searchUsers({ dsFiltroNome: metodoCompartilhar === 'email' ? stringEmail : stringNotificacao })];
|
|
115
|
+
case 1:
|
|
116
|
+
res = _a.sent();
|
|
117
|
+
if (res.status) {
|
|
118
|
+
setOptions(res.users);
|
|
119
|
+
}
|
|
120
|
+
else
|
|
121
|
+
index_2.setError(res.dsErro);
|
|
122
|
+
return [2 /*return*/];
|
|
123
|
+
}
|
|
124
|
+
});
|
|
125
|
+
}); })();
|
|
126
|
+
}, [stringEmail, stringNotificacao, metodoCompartilhar]);
|
|
127
|
+
function enviaCompartilhamento(tpComp) {
|
|
128
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
129
|
+
var temp, not, mail, dados, res;
|
|
130
|
+
return __generator(this, function (_a) {
|
|
131
|
+
switch (_a.label) {
|
|
132
|
+
case 0:
|
|
133
|
+
temp = false;
|
|
134
|
+
if (tpComp === 'E') {
|
|
135
|
+
if (email.length === 0 && mensagemEmail === '') {
|
|
136
|
+
setErro(__assign(__assign({}, erro), { email: 'Campo Obrigatório', stringEmail: 'Campo Obrigatório' }));
|
|
137
|
+
temp = true;
|
|
138
|
+
}
|
|
139
|
+
else {
|
|
140
|
+
if (email.length === 0) {
|
|
141
|
+
setErro(__assign(__assign({}, erro), { email: 'Campo Obrigatório' }));
|
|
142
|
+
temp = true;
|
|
143
|
+
}
|
|
144
|
+
if (mensagemEmail === '') {
|
|
145
|
+
setErro(__assign(__assign({}, erro), { stringEmail: 'Campo Obrigatório' }));
|
|
146
|
+
temp = true;
|
|
147
|
+
}
|
|
148
|
+
}
|
|
149
|
+
}
|
|
150
|
+
else if (notificacao.length === 0 && mensagemNotificação === '') {
|
|
151
|
+
setErro(__assign(__assign({}, erro), { notificacao: 'Campo Obrigatório', stringNotificacao: 'Campo Obrigatório' }));
|
|
152
|
+
temp = true;
|
|
153
|
+
}
|
|
154
|
+
else if (notificacao.length === 0) {
|
|
155
|
+
setErro(__assign(__assign({}, erro), { notificacao: 'Campo Obrigatório' }));
|
|
156
|
+
temp = true;
|
|
157
|
+
}
|
|
158
|
+
else if (mensagemNotificação === '') {
|
|
159
|
+
setErro(__assign(__assign({}, erro), { stringNotificacao: 'Campo Obrigatório' }));
|
|
160
|
+
temp = true;
|
|
161
|
+
}
|
|
162
|
+
if (temp)
|
|
163
|
+
return [2 /*return*/];
|
|
164
|
+
not = notificacao.map(function (item) { return item[0]; });
|
|
165
|
+
mail = email.map(function (item) { return item[0]; });
|
|
166
|
+
dados = {
|
|
167
|
+
mensagem: mensagemNotificação || mensagemEmail,
|
|
168
|
+
usuarios: not.length > 0 ? not : mail,
|
|
169
|
+
tpMensagem: tpComp,
|
|
170
|
+
link: link
|
|
171
|
+
};
|
|
172
|
+
return [4 /*yield*/, index_1.enviaCompartilhamentoDePrograma(dados)];
|
|
173
|
+
case 1:
|
|
174
|
+
res = _a.sent();
|
|
175
|
+
if (res.status) {
|
|
176
|
+
setNotificacao([]);
|
|
177
|
+
setEmail([]);
|
|
178
|
+
setMensagemEmail('');
|
|
179
|
+
setStringEmail('');
|
|
180
|
+
setStringNotificacao('');
|
|
181
|
+
setMensagemNotificacao('');
|
|
182
|
+
setEnviado(true);
|
|
183
|
+
setTimeout(function () {
|
|
184
|
+
setEnviado(false);
|
|
185
|
+
}, 3500);
|
|
186
|
+
}
|
|
187
|
+
return [2 /*return*/];
|
|
188
|
+
}
|
|
189
|
+
});
|
|
190
|
+
});
|
|
191
|
+
}
|
|
192
|
+
return (react_1.default.createElement(core_1.Grid, { innerRef: ref, className: classes.fundoCompartilhar, component: core_1.Paper, elevation: 2, onClick: function (e) { return e.stopPropagation(); } },
|
|
193
|
+
react_1.default.createElement(core_1.Grid, { container: true, spacing: 2, style: { position: 'relative', padding: '6px 12px', display: 'flex' }, justifyContent: 'center' },
|
|
194
|
+
react_1.default.createElement(core_1.Typography, { component: 'h3', style: { fontSize: '24px', textAlign: 'center', marginTop: '0px' } }, "Compartilhar"),
|
|
195
|
+
react_1.default.createElement(core_1.Grid, { item: true, xs: 12, className: 'row' },
|
|
196
|
+
react_1.default.createElement(core_1.TextField, { label: 'Link', value: link, readOnly: true, id: 'link', fullWidth: true, variant: 'outlined', margin: 'dense', InputProps: {
|
|
197
|
+
endAdornment: (react_1.default.createElement(core_1.InputAdornment, { position: 'end' },
|
|
198
|
+
react_1.default.createElement(core_1.IconButton, { onClick: function () { return copiarParaAreaDeTransferencia(); }, title: 'Copiar Link' },
|
|
199
|
+
react_1.default.createElement(md_1.MdLink, null)))),
|
|
200
|
+
} }),
|
|
201
|
+
react_1.default.createElement(core_1.Collapse, { in: copiado },
|
|
202
|
+
react_1.default.createElement(core_1.Typography, { variant: 'body2', component: 'div', color: 'primary' }, "Link copiado para a \u00E1rea de transfer\u00EAncia!"))),
|
|
203
|
+
react_1.default.createElement(core_1.Grid, { item: true, xs: 6, style: { display: 'flex', justifyContent: 'center' } },
|
|
204
|
+
react_1.default.createElement(core_1.IconButton, { size: 'medium', title: 'Enviar link por notifica\u00E7\u00E3o', onClick: function () {
|
|
205
|
+
setErro(erroVazio);
|
|
206
|
+
setEmail([]);
|
|
207
|
+
setStringEmail('');
|
|
208
|
+
setMetodoCompartilhar(metodoCompartilhar === 'notificacao' ? '' : 'notificacao');
|
|
209
|
+
} },
|
|
210
|
+
react_1.default.createElement(core_1.Typography, { component: 'span', variant: 'body1', className: 'icon-linecons-megaphone icon-lg', style: {
|
|
211
|
+
fontSize: '45px',
|
|
212
|
+
width: '75px',
|
|
213
|
+
height: '75px',
|
|
214
|
+
color: 'white',
|
|
215
|
+
background: '#009C6A',
|
|
216
|
+
borderRadius: '50px',
|
|
217
|
+
border: '5px solid #33b088',
|
|
218
|
+
} }))),
|
|
219
|
+
react_1.default.createElement(core_1.Grid, { item: true, xs: 6, style: { display: 'flex', justifyContent: 'center' } },
|
|
220
|
+
react_1.default.createElement(core_1.IconButton, { size: 'medium', title: 'Enviar link por email', onClick: function () {
|
|
221
|
+
setErro(erroVazio);
|
|
222
|
+
setNotificacao([]);
|
|
223
|
+
setStringNotificacao('');
|
|
224
|
+
setMetodoCompartilhar(metodoCompartilhar === 'email' ? '' : 'email');
|
|
225
|
+
} },
|
|
226
|
+
react_1.default.createElement(core_1.Typography, { component: 'span', variant: 'body1', className: 'glyph-icon icon-envelope icon-lg', style: {
|
|
227
|
+
fontSize: '45px',
|
|
228
|
+
width: '75px',
|
|
229
|
+
height: '75px',
|
|
230
|
+
color: 'white',
|
|
231
|
+
background: '#009C6A',
|
|
232
|
+
borderRadius: '50px',
|
|
233
|
+
border: '5px solid #33b088',
|
|
234
|
+
} }))),
|
|
235
|
+
react_1.default.createElement(core_1.Grid, { item: true, xs: 6, style: { display: 'flex', justifyContent: 'center', paddingTop: 0, marginBottom: '5px' } },
|
|
236
|
+
react_1.default.createElement(core_1.Typography, { component: 'label', variant: 'body1' }, "Notifica\u00E7\u00E3o")),
|
|
237
|
+
react_1.default.createElement(core_1.Grid, { item: true, xs: 6, style: { display: 'flex', justifyContent: 'center', paddingTop: 0, marginBottom: '5px' } },
|
|
238
|
+
react_1.default.createElement(core_1.Typography, { component: 'label', variant: 'body1' }, "Email")),
|
|
239
|
+
react_1.default.createElement(core_1.Grid, { item: true, xs: 12, style: { padding: 0 } },
|
|
240
|
+
react_1.default.createElement(core_1.Collapse, { in: metodoCompartilhar === 'notificacao' },
|
|
241
|
+
react_1.default.createElement(core_1.Grid, { container: true, spacing: 2 },
|
|
242
|
+
react_1.default.createElement(core_1.Grid, { item: true, xs: 12 },
|
|
243
|
+
react_1.default.createElement(lab_1.Autocomplete, { multiple: true, value: notificacao, options: options, getOptionLabel: function (option) { return 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', renderTags: function (value, getTagProps) { return (value.map(function (option, index) { return (react_1.default.createElement(core_1.Chip, __assign({ variant: 'outlined', label: option[1] || option }, getTagProps({ index: index })))); })); }, renderInput: function (params) { return (react_1.default.createElement(core_1.TextField, __assign({ variant: 'outlined', margin: 'dense', label: 'Contatos:', onChange: function (e) { return setStringNotificacao(e.target.value); }, placeholder: notificacao.length === 0 ? 'Selecionar' : undefined, InputLabelProps: { shrink: true }, error: !!erro.notificacao, helperText: erro.notificacao }, params))); } })),
|
|
244
|
+
react_1.default.createElement(core_1.Grid, { item: true, xs: 12 },
|
|
245
|
+
react_1.default.createElement(core_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 })),
|
|
246
|
+
react_1.default.createElement(core_1.Grid, { container: true, style: { display: 'flex ' }, direction: 'row-reverse' },
|
|
247
|
+
react_1.default.createElement(core_1.Grid, { item: true, xs: 2 },
|
|
248
|
+
react_1.default.createElement(core_1.Button, { color: 'primary', variant: 'contained', onClick: function () { return enviaCompartilhamento('N'); } }, "Enviar")),
|
|
249
|
+
react_1.default.createElement(core_1.Grid, { item: true, xs: 10 },
|
|
250
|
+
react_1.default.createElement(core_1.Collapse, { in: enviado },
|
|
251
|
+
react_1.default.createElement(core_1.Typography, { variant: 'body2', component: 'div', color: 'primary' }, "Link enviado com sucesso!"))))))),
|
|
252
|
+
react_1.default.createElement(core_1.Grid, { item: true, xs: 12, style: { padding: 0 } },
|
|
253
|
+
react_1.default.createElement(core_1.Collapse, { in: metodoCompartilhar === 'email' },
|
|
254
|
+
react_1.default.createElement(core_1.Grid, { container: true, spacing: 2 },
|
|
255
|
+
react_1.default.createElement(core_1.Grid, { item: true, xs: 12 },
|
|
256
|
+
react_1.default.createElement(lab_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', renderTags: function (value, getTagProps) { return (value.map(function (option, index) { return (react_1.default.createElement(core_1.Chip, __assign({ variant: 'outlined', label: option[2] || option }, getTagProps({ index: index })))); })); }, renderInput: function (params) { return (react_1.default.createElement(core_1.TextField, __assign({ variant: 'outlined', margin: 'dense', label: 'Emails:', onChange: function (e) { return setStringEmail(e.target.value); }, placeholder: email.length === 0 ? 'Selecionar' : undefined, InputLabelProps: { shrink: true }, error: !!erro.email, helperText: erro.email }, params))); } })),
|
|
257
|
+
react_1.default.createElement(core_1.Grid, { item: true, xs: 12 },
|
|
258
|
+
react_1.default.createElement(core_1.TextField, { multiline: true, label: 'Mensagem:', rows: '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 })),
|
|
259
|
+
react_1.default.createElement(core_1.Grid, { container: true, style: { display: 'flex' }, direction: 'row-reverse' },
|
|
260
|
+
react_1.default.createElement(core_1.Grid, { item: true, xs: 2 },
|
|
261
|
+
react_1.default.createElement(core_1.Button, { color: 'primary', variant: 'contained', onClick: function () { return enviaCompartilhamento('E'); } }, "Enviar")),
|
|
262
|
+
react_1.default.createElement(core_1.Grid, { item: true, xs: 10 },
|
|
263
|
+
react_1.default.createElement(core_1.Collapse, { in: enviado },
|
|
264
|
+
react_1.default.createElement(core_1.Typography, { variant: 'body2', component: 'div', color: 'primary' }, "Link enviado com sucesso!"))))))))));
|
|
265
|
+
});
|
|
266
|
+
exports.default = Compartilhar;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.default = void 0;
|
|
7
|
+
var Compartilhar_1 = require("./Compartilhar");
|
|
8
|
+
Object.defineProperty(exports, "default", { enumerable: true, get: function () { return __importDefault(Compartilhar_1).default; } });
|