argous 1.2.134 → 1.2.138
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/AutoCompleteFavorites/AutoCompleteFavorites.d.ts +20 -0
- package/dist/components/AutoCompleteFavorites/AutoCompleteFavorites.js +331 -0
- package/dist/components/AutoCompleteFavorites/index.d.ts +1 -0
- package/dist/components/AutoCompleteFavorites/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 +165 -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/lib/components/AutoCompleteFavorites/AutoCompleteFavorites.js +298 -0
- package/lib/components/AutoCompleteFavorites/index.js +1 -0
- package/lib/components/index.js +4 -1
- package/package.json +1 -1
|
@@ -0,0 +1,171 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __extends = (this && this.__extends) || (function () {
|
|
3
|
+
var extendStatics = function (d, b) {
|
|
4
|
+
extendStatics = Object.setPrototypeOf ||
|
|
5
|
+
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
6
|
+
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
|
7
|
+
return extendStatics(d, b);
|
|
8
|
+
};
|
|
9
|
+
return function (d, b) {
|
|
10
|
+
if (typeof b !== "function" && b !== null)
|
|
11
|
+
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
|
12
|
+
extendStatics(d, b);
|
|
13
|
+
function __() { this.constructor = d; }
|
|
14
|
+
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
15
|
+
};
|
|
16
|
+
})();
|
|
17
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
18
|
+
if (k2 === undefined) k2 = k;
|
|
19
|
+
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
|
|
20
|
+
}) : (function(o, m, k, k2) {
|
|
21
|
+
if (k2 === undefined) k2 = k;
|
|
22
|
+
o[k2] = m[k];
|
|
23
|
+
}));
|
|
24
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
25
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
26
|
+
}) : function(o, v) {
|
|
27
|
+
o["default"] = v;
|
|
28
|
+
});
|
|
29
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
30
|
+
if (mod && mod.__esModule) return mod;
|
|
31
|
+
var result = {};
|
|
32
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
33
|
+
__setModuleDefault(result, mod);
|
|
34
|
+
return result;
|
|
35
|
+
};
|
|
36
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
37
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
38
|
+
};
|
|
39
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
40
|
+
var fieldsRedux_1 = require("../../fieldsRedux");
|
|
41
|
+
var utils_1 = require("../../utils");
|
|
42
|
+
var date_1 = require("../../utils/date");
|
|
43
|
+
var prop_types_1 = __importDefault(require("prop-types"));
|
|
44
|
+
var react_1 = __importStar(require("react"));
|
|
45
|
+
var react_date_range_1 = require("react-date-range");
|
|
46
|
+
/**
|
|
47
|
+
* @deprecated
|
|
48
|
+
*/
|
|
49
|
+
var Calendar = /** @class */ (function (_super) {
|
|
50
|
+
__extends(Calendar, _super);
|
|
51
|
+
function Calendar() {
|
|
52
|
+
var _this = _super !== null && _super.apply(this, arguments) || this;
|
|
53
|
+
_this.state = {
|
|
54
|
+
open: false,
|
|
55
|
+
month: 0
|
|
56
|
+
};
|
|
57
|
+
_this.openCalendar = function (e) {
|
|
58
|
+
e.stopPropagation();
|
|
59
|
+
_this.setState({ open: true });
|
|
60
|
+
setTimeout(function () { return document.addEventListener('click', _this.handleClickCalendar); }, 0);
|
|
61
|
+
};
|
|
62
|
+
_this.handleClickCalendar = function (e) {
|
|
63
|
+
var eCls = e.target.className;
|
|
64
|
+
var eClsP = e.target.parentNode.className;
|
|
65
|
+
var prev = eCls !== 'rdr-MonthAndYear-button next' && eClsP !== 'rdr-MonthAndYear-button next';
|
|
66
|
+
var next = eCls !== 'rdr-MonthAndYear-button prev' && eClsP !== 'rdr-MonthAndYear-button prev';
|
|
67
|
+
if (next && prev) {
|
|
68
|
+
_this.setState({ open: false });
|
|
69
|
+
document.removeEventListener('click', _this.handleClickCalendar);
|
|
70
|
+
}
|
|
71
|
+
else {
|
|
72
|
+
var month = _this.state.month;
|
|
73
|
+
var newMonth = next
|
|
74
|
+
? month + 1
|
|
75
|
+
: month - 1;
|
|
76
|
+
newMonth = newMonth < 0
|
|
77
|
+
? 11
|
|
78
|
+
: newMonth > 11
|
|
79
|
+
? 0
|
|
80
|
+
: newMonth;
|
|
81
|
+
_this.setState({ month: newMonth });
|
|
82
|
+
_this.setMonthName(null, newMonth);
|
|
83
|
+
}
|
|
84
|
+
};
|
|
85
|
+
_this.checkDefaultValue = function (defaultValue) {
|
|
86
|
+
if (defaultValue && defaultValue.length === 10) {
|
|
87
|
+
if (!defaultValue.indexOf('-')) {
|
|
88
|
+
var newDefVal = defaultValue.substring(8, 10) + "/" + defaultValue.substring(5, 7) + "/" + defaultValue.substring(0, 4);
|
|
89
|
+
return newDefVal;
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
return defaultValue;
|
|
93
|
+
};
|
|
94
|
+
_this.setMonthState = function (value) {
|
|
95
|
+
var month;
|
|
96
|
+
if (value) {
|
|
97
|
+
if (value.length === 10) {
|
|
98
|
+
month = value.substring(3, 5);
|
|
99
|
+
}
|
|
100
|
+
else {
|
|
101
|
+
var field = _this.props.field;
|
|
102
|
+
console.error("Valor da data inv\u00E1lido no campo " + field + ". Formatos aceitos s\u00E3o 'dd/mm/aaaa' ou 'aaaa-mm-dd'");
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
else {
|
|
106
|
+
month = new Date().getMonth();
|
|
107
|
+
}
|
|
108
|
+
_this.setState({ month: month });
|
|
109
|
+
};
|
|
110
|
+
_this.handleSelect = function (date) {
|
|
111
|
+
var onChange = _this.props.onChange;
|
|
112
|
+
var day = date._d.getDate();
|
|
113
|
+
var month = (date._d.getMonth() + 1);
|
|
114
|
+
var year = date._d.getFullYear();
|
|
115
|
+
var formattedDate = utils_1.addExtraZero(day) + "/" + utils_1.addExtraZero(month) + "/" + year;
|
|
116
|
+
if (onChange) {
|
|
117
|
+
onChange(year, month, day);
|
|
118
|
+
}
|
|
119
|
+
_this.props.handleUpdates(formattedDate);
|
|
120
|
+
_this.setState({ open: false });
|
|
121
|
+
};
|
|
122
|
+
_this.setMonthName = function (date, month) {
|
|
123
|
+
if (date) {
|
|
124
|
+
_this.setState({ month: date._d.getMonth() });
|
|
125
|
+
}
|
|
126
|
+
var name = date_1.getMonthName(typeof month !== 'undefined'
|
|
127
|
+
? month
|
|
128
|
+
: date._d.getMonth());
|
|
129
|
+
var monthDescription = document.getElementsByClassName('rdr-MonthAndYear-month')[0];
|
|
130
|
+
monthDescription.innerHTML = name;
|
|
131
|
+
};
|
|
132
|
+
return _this;
|
|
133
|
+
}
|
|
134
|
+
Calendar.prototype.componentDidMount = function () {
|
|
135
|
+
var _this = this;
|
|
136
|
+
var _a = this.props, field = _a.field, defaultValue = _a.defaultValue;
|
|
137
|
+
var defValHandled = this.checkDefaultValue(defaultValue);
|
|
138
|
+
fieldsRedux_1.initField(field, defValHandled).then(function (value) {
|
|
139
|
+
_this.setMonthState(value);
|
|
140
|
+
});
|
|
141
|
+
};
|
|
142
|
+
Calendar.prototype.componentWillUnmount = function () {
|
|
143
|
+
document.removeEventListener('click', this.handleClickCalendar);
|
|
144
|
+
};
|
|
145
|
+
Calendar.prototype.render = function () {
|
|
146
|
+
var _a = this, openCalendar = _a.openCalendar, handleSelect = _a.handleSelect, setMonthName = _a.setMonthName;
|
|
147
|
+
var open = this.state.open;
|
|
148
|
+
var field = this.props.field;
|
|
149
|
+
var date = fieldsRedux_1.getField(field, 'value');
|
|
150
|
+
return (react_1.default.createElement("div", { className: 'argous-calendar' },
|
|
151
|
+
react_1.default.createElement("span", { onMouseUp: openCalendar }, date ? date : 'dd/mm/aaaa'),
|
|
152
|
+
open && (react_1.default.createElement(react_date_range_1.Calendar, { date: date, onChange: handleSelect, onInit: setMonthName }))));
|
|
153
|
+
};
|
|
154
|
+
return Calendar;
|
|
155
|
+
}(react_1.Component));
|
|
156
|
+
Calendar.propTypes = {
|
|
157
|
+
field: prop_types_1.default.string.isRequired,
|
|
158
|
+
defaultValue: prop_types_1.default.oneOfType([prop_types_1.default.number, prop_types_1.default.string, prop_types_1.default.object, prop_types_1.default.array]),
|
|
159
|
+
ajax: prop_types_1.default.bool,
|
|
160
|
+
action: prop_types_1.default.string,
|
|
161
|
+
dados: prop_types_1.default.object,
|
|
162
|
+
sendUpdates: prop_types_1.default.array,
|
|
163
|
+
receiveUpdates: prop_types_1.default.array,
|
|
164
|
+
onFieldSuccess: prop_types_1.default.func,
|
|
165
|
+
onActionSuccess: prop_types_1.default.func,
|
|
166
|
+
onChange: prop_types_1.default.func,
|
|
167
|
+
onAllUpdated: prop_types_1.default.func,
|
|
168
|
+
fieldListener: prop_types_1.default.func,
|
|
169
|
+
destroyOnUnmount: prop_types_1.default.bool
|
|
170
|
+
};
|
|
171
|
+
exports.default = fieldsRedux_1.createField(Calendar, { disableInitField: true });
|
|
@@ -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 Calendar_1 = require("./Calendar");
|
|
8
|
+
Object.defineProperty(exports, "default", { enumerable: true, get: function () { return __importDefault(Calendar_1).default; } });
|
|
@@ -0,0 +1,165 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
|
|
5
|
+
}) : (function(o, m, k, k2) {
|
|
6
|
+
if (k2 === undefined) k2 = k;
|
|
7
|
+
o[k2] = m[k];
|
|
8
|
+
}));
|
|
9
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
10
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
11
|
+
}) : function(o, v) {
|
|
12
|
+
o["default"] = v;
|
|
13
|
+
});
|
|
14
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
15
|
+
if (mod && mod.__esModule) return mod;
|
|
16
|
+
var result = {};
|
|
17
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
18
|
+
__setModuleDefault(result, mod);
|
|
19
|
+
return result;
|
|
20
|
+
};
|
|
21
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
22
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
23
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
24
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
25
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
26
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
27
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
28
|
+
});
|
|
29
|
+
};
|
|
30
|
+
var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
31
|
+
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
|
32
|
+
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
33
|
+
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
34
|
+
function step(op) {
|
|
35
|
+
if (f) throw new TypeError("Generator is already executing.");
|
|
36
|
+
while (_) try {
|
|
37
|
+
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;
|
|
38
|
+
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
39
|
+
switch (op[0]) {
|
|
40
|
+
case 0: case 1: t = op; break;
|
|
41
|
+
case 4: _.label++; return { value: op[1], done: false };
|
|
42
|
+
case 5: _.label++; y = op[1]; op = [0]; continue;
|
|
43
|
+
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
|
44
|
+
default:
|
|
45
|
+
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
|
46
|
+
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
|
47
|
+
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
|
48
|
+
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
|
49
|
+
if (t[2]) _.ops.pop();
|
|
50
|
+
_.trys.pop(); continue;
|
|
51
|
+
}
|
|
52
|
+
op = body.call(thisArg, _);
|
|
53
|
+
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
|
54
|
+
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
55
|
+
}
|
|
56
|
+
};
|
|
57
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
58
|
+
var __1 = require("../");
|
|
59
|
+
var fieldsRedux_1 = require("../../fieldsRedux");
|
|
60
|
+
var utils_1 = require("../../utils");
|
|
61
|
+
var api_1 = require("../../utils/api");
|
|
62
|
+
var core_1 = require("@material-ui/core");
|
|
63
|
+
var react_1 = __importStar(require("react"));
|
|
64
|
+
var io_1 = require("react-icons/io");
|
|
65
|
+
var md_1 = require("react-icons/md");
|
|
66
|
+
function CartaoUsuario(_a) {
|
|
67
|
+
var _this = this;
|
|
68
|
+
var anchor = _a.anchor, idUsuario = _a.idUsuario;
|
|
69
|
+
var tempo = react_1.useRef();
|
|
70
|
+
var deixaMostrar = react_1.useRef(false);
|
|
71
|
+
var limpar = react_1.useRef(true);
|
|
72
|
+
var idUsuarioLogado = utils_1.useStore().usuarioLogado.idUsuario;
|
|
73
|
+
var _b = react_1.useState(anchor), localAnchor = _b[0], setLocalAnchor = _b[1];
|
|
74
|
+
var _c = react_1.useState(idUsuario), localIdUsuario = _c[0], setLocalIdUsuario = _c[1];
|
|
75
|
+
var _d = react_1.useState({}), dados = _d[0], setDados = _d[1];
|
|
76
|
+
var _e = react_1.useState(false), mostrar = _e[0], setMostrar = _e[1];
|
|
77
|
+
react_1.useEffect(function () {
|
|
78
|
+
if (anchor && idUsuario) {
|
|
79
|
+
setLocalAnchor(anchor);
|
|
80
|
+
setLocalIdUsuario(idUsuario);
|
|
81
|
+
deixaMostrar.current = true;
|
|
82
|
+
}
|
|
83
|
+
else {
|
|
84
|
+
clearTimeout(tempo.current);
|
|
85
|
+
deixaMostrar.current = false;
|
|
86
|
+
setTimeout(function () {
|
|
87
|
+
if (!limpar.current)
|
|
88
|
+
return;
|
|
89
|
+
setDados({});
|
|
90
|
+
setMostrar(false);
|
|
91
|
+
}, 200);
|
|
92
|
+
}
|
|
93
|
+
}, [anchor, idUsuario, mostrar]);
|
|
94
|
+
var busca = react_1.useCallback(function () { return __awaiter(_this, void 0, void 0, function () {
|
|
95
|
+
var res;
|
|
96
|
+
return __generator(this, function (_a) {
|
|
97
|
+
switch (_a.label) {
|
|
98
|
+
case 0:
|
|
99
|
+
if (!localIdUsuario || !localAnchor) {
|
|
100
|
+
setMostrar(false);
|
|
101
|
+
clearTimeout(tempo.current);
|
|
102
|
+
return [2 /*return*/];
|
|
103
|
+
}
|
|
104
|
+
return [4 /*yield*/, api_1.serverAction('getInfoUsuario', { idUsuario: localIdUsuario }, 'Argous.MntUsuarios', true)];
|
|
105
|
+
case 1:
|
|
106
|
+
res = _a.sent();
|
|
107
|
+
tempo.current = setTimeout(function () {
|
|
108
|
+
if (deixaMostrar.current) {
|
|
109
|
+
setDados(res);
|
|
110
|
+
setMostrar(true);
|
|
111
|
+
}
|
|
112
|
+
}, 500);
|
|
113
|
+
return [2 /*return*/];
|
|
114
|
+
}
|
|
115
|
+
});
|
|
116
|
+
}); }, [localAnchor, localIdUsuario]);
|
|
117
|
+
react_1.useEffect(function () { return void (busca()); }, [busca]);
|
|
118
|
+
var retornaUser = function () {
|
|
119
|
+
return { idUsuario: idUsuario, titulo: dados.dsNomeUsuario, subTitulo: dados.dsFuncaoUsuario, msgsNaoLidas: 0, online: false };
|
|
120
|
+
};
|
|
121
|
+
function mouseLeave() {
|
|
122
|
+
setLocalAnchor(null);
|
|
123
|
+
setLocalIdUsuario(null);
|
|
124
|
+
clearTimeout(tempo.current);
|
|
125
|
+
limpar.current = true;
|
|
126
|
+
}
|
|
127
|
+
function mouseEnter() {
|
|
128
|
+
clearTimeout(limpar.current);
|
|
129
|
+
limpar.current = false;
|
|
130
|
+
}
|
|
131
|
+
if (localIdUsuario && mostrar)
|
|
132
|
+
return (react_1.default.createElement(core_1.Portal, null,
|
|
133
|
+
react_1.default.createElement(core_1.Popper, { onClick: function (e) { return e.stopPropagation(); }, style: { zIndex: 5 }, onMouseLeave: mouseLeave, onMouseEnter: mouseEnter, open: (!!anchor || !!localAnchor) && !!dados.dsNomeUsuario, anchorEl: anchor || localAnchor },
|
|
134
|
+
react_1.default.createElement(core_1.Card, { variant: 'outlined', style: { padding: '10px', maxWidth: '350px' } },
|
|
135
|
+
react_1.default.createElement(core_1.Grid, { container: true, spacing: 1 },
|
|
136
|
+
react_1.default.createElement(core_1.Grid, { item: true, xs: 'auto' },
|
|
137
|
+
react_1.default.createElement(__1.ArgousAvatar, { style: { width: '50px', height: '50px', margin: '10px' }, nome: dados.dsNomeUsuario, idUsuario: idUsuario || localIdUsuario })),
|
|
138
|
+
react_1.default.createElement(core_1.Grid, { item: true, xs: 'auto' },
|
|
139
|
+
react_1.default.createElement(core_1.Typography, { variant: 'h6', style: { overflow: 'hidden', width: '250px', textOverflow: 'ellipsis', whiteSpace: 'nowrap' } }, dados.dsNomeUsuario),
|
|
140
|
+
react_1.default.createElement(core_1.Typography, { variant: 'body2', style: { width: '250px' } }, dados.dsFuncaoUsuario),
|
|
141
|
+
react_1.default.createElement(core_1.Typography, { variant: 'caption', style: { width: '250px' } }, dados.dsSetor)),
|
|
142
|
+
dados.dtExclusaoUsuario ?
|
|
143
|
+
react_1.default.createElement(core_1.Typography, { variant: 'h6' },
|
|
144
|
+
"Usu\u00E1rio excluido em ",
|
|
145
|
+
dados.dtExclusaoUsuario)
|
|
146
|
+
:
|
|
147
|
+
((idUsuario && (idUsuarioLogado !== idUsuario)) || (localIdUsuario && (idUsuarioLogado !== localIdUsuario))) &&
|
|
148
|
+
react_1.default.createElement(react_1.default.Fragment, null,
|
|
149
|
+
dados.nrRamalUsuario &&
|
|
150
|
+
react_1.default.createElement(core_1.Grid, { item: true, xs: true },
|
|
151
|
+
react_1.default.createElement(core_1.Button, { fullWidth: true, variant: 'contained', href: "tel: " + dados.nrRamalUsuario, title: "Ramal: " + dados.nrRamalUsuario },
|
|
152
|
+
react_1.default.createElement(io_1.IoIosCall, null),
|
|
153
|
+
"\u00A0",
|
|
154
|
+
dados.nrRamalUsuario)),
|
|
155
|
+
react_1.default.createElement(core_1.Grid, { item: true, xs: true },
|
|
156
|
+
react_1.default.createElement(core_1.Button, { fullWidth: true, variant: 'contained', href: "mailto: " + dados.dsEmailUsuario, title: dados.dsEmailUsuario },
|
|
157
|
+
react_1.default.createElement(md_1.MdMail, null),
|
|
158
|
+
"\u00A0Email")),
|
|
159
|
+
react_1.default.createElement(core_1.Grid, { item: true, xs: true },
|
|
160
|
+
react_1.default.createElement(core_1.Button, { fullWidth: true, variant: 'contained', onClick: function () { return fieldsRedux_1.setAnotherProgramField('janelaChatOpen', retornaUser(), 'argousSystem'); }, title: 'Abrir chat de conversa' },
|
|
161
|
+
react_1.default.createElement(md_1.MdMessage, null),
|
|
162
|
+
"\u00A0Mensagem"))))))));
|
|
163
|
+
return null;
|
|
164
|
+
}
|
|
165
|
+
exports.default = CartaoUsuario;
|
|
@@ -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 CartaoUsuario_1 = require("./CartaoUsuario");
|
|
8
|
+
Object.defineProperty(exports, "default", { enumerable: true, get: function () { return __importDefault(CartaoUsuario_1).default; } });
|
|
@@ -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;
|