argous 1.2.246 → 1.2.247
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 +4 -0
- package/dist/api/WebSocket.js +17 -13
- package/dist/api/index.js +119 -108
- package/dist/api/ws.js +3 -3
- package/dist/components/Alert/Alert.js +6 -2
- package/dist/components/ArgousAction/ArgousAction.js +8 -4
- package/dist/components/ArgousAvatar/ArgousAvatar.js +14 -10
- package/dist/components/ArgousComplexPagination/ArgousComplexPagination.js +15 -9
- package/dist/components/ArgousComplexTable/ArgousComplexTable.js +79 -52
- package/dist/components/ArgousComplexTableBody/ArgousComplexTableBody.js +16 -12
- package/dist/components/ArgousComplexTableHead/ArgousComplexTableHead.js +13 -9
- package/dist/components/ArgousComplexTableToolbar/ArgousComplexTableToolBar.js +12 -8
- package/dist/components/ArgousInput/ArgousInput.js +8 -4
- package/dist/components/ArgousPagination/ArgousPagination.js +1 -1
- package/dist/components/ArgousProgressBar/ArgousProgressBar.js +18 -18
- package/dist/components/ArgousSimpleTable/ArgousSimpleTable.js +16 -12
- package/dist/components/AutoComplete/AutoComplete.js +16 -12
- package/dist/components/AutoCompleteFavorites/AutoCompleteFavorites.js +34 -30
- package/dist/components/BarChart/BarChart.js +5 -1
- package/dist/components/BarraFerramentas/BarraFerramentas.d.ts +30 -2
- package/dist/components/BarraFerramentas/BarraFerramentas.js +58 -40
- package/dist/components/Button/Button.js +8 -4
- package/dist/components/Cabecalho/Cabecalho.js +29 -25
- package/dist/components/Calendar/Calendar.js +12 -8
- package/dist/components/Cam/Cam.js +15 -11
- package/dist/components/Carousel/Carousel.js +21 -17
- package/dist/components/CartaoUsuario/CartaoUsuario.js +21 -17
- package/dist/components/Collapse/Collapse.js +18 -14
- package/dist/components/Compartilhar/Compartilhar.js +24 -20
- package/dist/components/ConfirmModal/ModalProvider.js +17 -13
- package/dist/components/ConfirmModal/index.js +5 -1
- package/dist/components/ContactValidationInput/ContactValidationInput.js +34 -31
- package/dist/components/Document/Icons.js +14 -10
- package/dist/components/Document/ModalVisualizacaoDocumentos.js +11 -7
- package/dist/components/Document/Visualizacao.js +15 -11
- package/dist/components/Document/index.js +5 -1
- package/dist/components/DropArea/DropArea.js +16 -12
- package/dist/components/DropArea/Html5FileSelector.js +2 -2
- package/dist/components/Editor/Events.d.ts +2 -2
- package/dist/components/Editor/ScriptLoader2.d.ts +1 -1
- package/dist/components/Editor/ScriptLoader2.js +1 -1
- package/dist/components/Editor/Utils.d.ts +1 -1
- package/dist/components/Editor/Utils.js +1 -1
- package/dist/components/Editor/components/Editor.d.ts +1 -1
- package/dist/components/Editor/components/Editor.js +23 -18
- package/dist/components/Editor/components/EditorPropTypes.d.ts +2 -2
- package/dist/components/Editor/components/EditorPropTypes.js +5 -1
- package/dist/components/FilePreparer/FilePreparer.js +34 -26
- package/dist/components/FileUploader/FileUploader.js +22 -18
- package/dist/components/FormVisualizer/FormVisualizer.js +34 -26
- package/dist/components/HalfGauge/HalfGauge.js +30 -26
- package/dist/components/Highlight/Highlight.js +7 -3
- package/dist/components/ImageResize/ImageResize.js +61 -57
- package/dist/components/ImageResizeButton/ImageResizeButton.js +9 -5
- package/dist/components/Input/Input.js +8 -4
- package/dist/components/InputTags/InputTags.js +16 -8
- package/dist/components/ListSelect/ListSelect.js +11 -7
- package/dist/components/MaterialButton/MaterialButton.js +18 -18
- package/dist/components/MenuBar/MenuBar.js +11 -7
- package/dist/components/MonthPicker/MonthPicker.js +33 -25
- package/dist/components/MultipleSelect/MultipleSelect.js +20 -12
- package/dist/components/OtpInput/OtpInput.js +11 -7
- package/dist/components/OutputText/OutputText.js +8 -4
- package/dist/components/Pagination/Pagination.js +5 -1
- package/dist/components/PercentageDisplay/PercentageDisplay.js +11 -7
- package/dist/components/Programa/PageCodeEasterEgg.d.ts +1 -1
- package/dist/components/Programa/PageCodeEasterEgg.js +11 -7
- package/dist/components/Programa/Programa.d.ts +16 -1
- package/dist/components/Programa/Programa.js +41 -13
- package/dist/components/Programa/Tab.d.ts +7 -0
- package/dist/components/Programa/Tab.js +2 -0
- package/dist/components/Programa/TabNavigationRail.d.ts +12 -0
- package/dist/components/Programa/TabNavigationRail.js +118 -0
- package/dist/components/ProgressBar/ProgressBar.js +8 -4
- package/dist/components/Select/Select.js +11 -7
- package/dist/components/SimpleTable/SimpleTable.js +30 -26
- package/dist/components/Stepper/Stepper.js +18 -14
- package/dist/components/TablePicker/TablePicker.js +40 -32
- package/dist/components/Tabs/Tabs.js +8 -4
- package/dist/components/TextArea/TextArea.js +8 -4
- package/dist/components/TextToHtml/Cursor.js +9 -5
- package/dist/components/TextToHtml/TextStyles.js +10 -6
- package/dist/components/TextToHtml/TextToHtml.js +44 -44
- package/dist/components/ThreadLog/ThreadLog.js +15 -11
- package/dist/components/UserCard/UserCard.js +18 -14
- package/dist/components/UtilAutoComplete/UtilAutoComplete.js +22 -18
- package/dist/components/UtilTextField/UtilTextField.js +10 -6
- package/dist/components/Zoom/Zoom.js +11 -7
- package/dist/components/index.js +5 -1
- package/dist/fieldsRedux/createField.js +22 -18
- package/dist/fieldsRedux/fieldsRedux.js +44 -40
- package/dist/fieldsRedux/passFields.js +16 -12
- package/dist/reducers/index.js +1 -1
- package/dist/utils/api.d.ts +2 -2
- package/dist/utils/api.js +18 -18
- package/dist/utils/date.js +4 -4
- package/dist/utils/index.js +44 -112
- package/dist/utils/xmlToJson.js +1 -1
- package/lib/components/BarraFerramentas/BarraFerramentas.d.ts +30 -2
- package/lib/components/BarraFerramentas/BarraFerramentas.js +63 -19
- package/lib/components/Programa/Programa.d.ts +16 -1
- package/lib/components/Programa/Programa.js +40 -3
- package/lib/components/Programa/Tab.ts +6 -0
- package/lib/components/Programa/TabNavigationRail.js +118 -0
- package/lib/utils/index.ts +0 -88
- package/package.json +2 -2
- package/lib/components/Editor/tinymce/README.md +0 -73
- package/lib/components/Editor/tinymce/langs/README.md +0 -3
|
@@ -16,7 +16,11 @@ var __extends = (this && this.__extends) || (function () {
|
|
|
16
16
|
})();
|
|
17
17
|
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
18
18
|
if (k2 === undefined) k2 = k;
|
|
19
|
-
Object.
|
|
19
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
20
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
21
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
22
|
+
}
|
|
23
|
+
Object.defineProperty(o, k2, desc);
|
|
20
24
|
}) : (function(o, m, k, k2) {
|
|
21
25
|
if (k2 === undefined) k2 = k;
|
|
22
26
|
o[k2] = m[k];
|
|
@@ -55,9 +59,9 @@ var Tabs = /** @class */ (function (_super) {
|
|
|
55
59
|
var _this = this;
|
|
56
60
|
var _a = this.props, _b = _a.tabs, tabs = _b === void 0 ? [] : _b, children = _a.children, _c = _a.classContainer, classContainer = _c === void 0 ? '' : _c, _d = _a.classContainerIndex, classContainerIndex = _d === void 0 ? [] : _d, _e = _a.classTabs, classTabs = _e === void 0 ? '' : _e, _f = _a.classTabsIndex, classTabsIndex = _f === void 0 ? [] : _f, _g = _a.classSelected, classSelected = _g === void 0 ? '' : _g, _h = _a.classSelectedIndex, classSelectedIndex = _h === void 0 ? [] : _h, _j = _a.classActive, classActive = _j === void 0 ? '' : _j, _k = _a.classActiveIndex, classActiveIndex = _k === void 0 ? [] : _k;
|
|
57
61
|
var active = this.state.active;
|
|
58
|
-
return (react_1.default.createElement("div", { className: classContainer
|
|
59
|
-
react_1.default.createElement("ul", { className: classTabs
|
|
60
|
-
react_1.default.createElement("div", { className: classSelected
|
|
62
|
+
return (react_1.default.createElement("div", { className: "".concat(classContainer, " ").concat(classContainerIndex[active] ? classContainerIndex[active] : '') },
|
|
63
|
+
react_1.default.createElement("ul", { className: "".concat(classTabs, " ").concat(classTabsIndex[active] ? classTabsIndex[active] : '') }, tabs.map(function (tab, index) { return (react_1.default.createElement("li", { key: index, className: "".concat(index === active ? classActive : '', " ").concat(index === active ? classActiveIndex[active] ? classActiveIndex[active] : '' : ''), onClick: function () { return _this.setState({ active: index }); } }, tab)); })),
|
|
64
|
+
react_1.default.createElement("div", { className: "".concat(classSelected, " ").concat(classSelectedIndex[active] ? classSelectedIndex[active] : '') }, children && children[active])));
|
|
61
65
|
};
|
|
62
66
|
return Tabs;
|
|
63
67
|
}(react_1.Component));
|
|
@@ -27,7 +27,11 @@ var __assign = (this && this.__assign) || function () {
|
|
|
27
27
|
};
|
|
28
28
|
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
29
29
|
if (k2 === undefined) k2 = k;
|
|
30
|
-
Object.
|
|
30
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
31
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
32
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
33
|
+
}
|
|
34
|
+
Object.defineProperty(o, k2, desc);
|
|
31
35
|
}) : (function(o, m, k, k2) {
|
|
32
36
|
if (k2 === undefined) k2 = k;
|
|
33
37
|
o[k2] = m[k];
|
|
@@ -78,9 +82,9 @@ var TextArea = /** @class */ (function (_super) {
|
|
|
78
82
|
};
|
|
79
83
|
_this.checkTextAreaProps = function () {
|
|
80
84
|
var _a = _this.props, field = _a.field, autoComplete = _a.autoComplete, autoFocus = _a.autoFocus, cols = _a.cols, rows = _a.rows, disabled = _a.disabled, form = _a.form, maxLength = _a.maxLength, minLength = _a.minLength, name = _a.name, placeholder = _a.placeholder, spellCheck = _a.spellCheck, wrap = _a.wrap, style = _a.style;
|
|
81
|
-
var className = ""
|
|
85
|
+
var className = "".concat(_this.props.className ? _this.props.className : 'form-control');
|
|
82
86
|
var onChange = _this.onChange;
|
|
83
|
-
var value = fieldsRedux_1.getField(field, 'value');
|
|
87
|
+
var value = (0, fieldsRedux_1.getField)(field, 'value');
|
|
84
88
|
return {
|
|
85
89
|
className: className,
|
|
86
90
|
onChange: onChange,
|
|
@@ -145,4 +149,4 @@ TextArea.propTypes = {
|
|
|
145
149
|
stopWriting: prop_types_1.default.func,
|
|
146
150
|
stopWritingTime: prop_types_1.default.number
|
|
147
151
|
};
|
|
148
|
-
exports.default = fieldsRedux_1.createField(TextArea);
|
|
152
|
+
exports.default = (0, fieldsRedux_1.createField)(TextArea);
|
|
@@ -1,7 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
3
|
if (k2 === undefined) k2 = k;
|
|
4
|
-
Object.
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
5
9
|
}) : (function(o, m, k, k2) {
|
|
6
10
|
if (k2 === undefined) k2 = k;
|
|
7
11
|
o[k2] = m[k];
|
|
@@ -22,9 +26,9 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
22
26
|
var react_1 = __importStar(require("react"));
|
|
23
27
|
var Cursor = function (_a) {
|
|
24
28
|
var id = _a.id, _b = _a.speed, speed = _b === void 0 ? 500 : _b, className = _a.className;
|
|
25
|
-
var cursorId = id
|
|
26
|
-
var intervalIdRef = react_1.useRef(null);
|
|
27
|
-
react_1.useEffect(function () {
|
|
29
|
+
var cursorId = "".concat(id, "-cursor-component");
|
|
30
|
+
var intervalIdRef = (0, react_1.useRef)(null);
|
|
31
|
+
(0, react_1.useEffect)(function () {
|
|
28
32
|
var cursorElement = document.getElementById(cursorId);
|
|
29
33
|
if (cursorElement)
|
|
30
34
|
cursorElement.style.opacity = '1';
|
|
@@ -34,6 +38,6 @@ var Cursor = function (_a) {
|
|
|
34
38
|
}, speed);
|
|
35
39
|
return function () { return clearInterval(intervalIdRef.current); };
|
|
36
40
|
});
|
|
37
|
-
return react_1.default.createElement("span", { id: cursorId, className: ""
|
|
41
|
+
return react_1.default.createElement("span", { id: cursorId, className: "".concat(className) }, "|");
|
|
38
42
|
};
|
|
39
43
|
exports.default = Cursor;
|
|
@@ -12,7 +12,11 @@ var __assign = (this && this.__assign) || function () {
|
|
|
12
12
|
};
|
|
13
13
|
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
14
14
|
if (k2 === undefined) k2 = k;
|
|
15
|
-
Object.
|
|
15
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
16
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
17
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
18
|
+
}
|
|
19
|
+
Object.defineProperty(o, k2, desc);
|
|
16
20
|
}) : (function(o, m, k, k2) {
|
|
17
21
|
if (k2 === undefined) k2 = k;
|
|
18
22
|
o[k2] = m[k];
|
|
@@ -36,7 +40,7 @@ var react_colorful_1 = require("react-colorful");
|
|
|
36
40
|
var ri_1 = require("react-icons/ri");
|
|
37
41
|
var ICON_SIZE = '2.5rem';
|
|
38
42
|
var BOX_SHADOW = 'rgba(0, 0, 0, 0.3) 0px 1px 12px -2px';
|
|
39
|
-
var useStyles = core_1.makeStyles(function (theme) { return ({
|
|
43
|
+
var useStyles = (0, core_1.makeStyles)(function (theme) { return ({
|
|
40
44
|
container: {
|
|
41
45
|
zIndex: 1,
|
|
42
46
|
position: 'absolute',
|
|
@@ -55,10 +59,10 @@ var useStyles = core_1.makeStyles(function (theme) { return ({
|
|
|
55
59
|
var defaultSpacing = _a.defaultSpacing;
|
|
56
60
|
return (defaultSpacing) ? (defaultSpacing / 2) : '';
|
|
57
61
|
},
|
|
58
|
-
color: "rgba("
|
|
59
|
-
backgroundColor: "rgba("
|
|
62
|
+
color: "rgba(".concat((theme.palette.type === 'light') ? '0, 0, 0' : '255, 255, 255', ", .7)"),
|
|
63
|
+
backgroundColor: "rgba(".concat((theme.palette.type === 'light') ? '255, 255, 255' : '0, 0, 0', ", .5)"),
|
|
60
64
|
'&:hover': {
|
|
61
|
-
backgroundColor: "rgba("
|
|
65
|
+
backgroundColor: "rgba(".concat((theme.palette.type === 'light') ? '255, 255, 255' : '0, 0, 0', ", .7)")
|
|
62
66
|
}
|
|
63
67
|
},
|
|
64
68
|
colorPickerContainer: {
|
|
@@ -82,7 +86,7 @@ var initialState = {
|
|
|
82
86
|
var TextStyles = function (_a) {
|
|
83
87
|
var color = _a.color, setColor = _a.setColor, defaultSpacing = _a.defaultSpacing, toggleClickAway = _a.toggleClickAway, handleFontSizeChange = _a.handleFontSizeChange, textAlign = _a.textAlign, handleTextAlignChange = _a.handleTextAlignChange;
|
|
84
88
|
var classes = useStyles({ defaultSpacing: defaultSpacing });
|
|
85
|
-
var _b = react_1.useState(initialState), state = _b[0], setState = _b[1];
|
|
89
|
+
var _b = (0, react_1.useState)(initialState), state = _b[0], setState = _b[1];
|
|
86
90
|
var open = state.open;
|
|
87
91
|
var logicSetState = function (type, field, value) { return setState(function (values) {
|
|
88
92
|
var _a, _b;
|
|
@@ -12,7 +12,11 @@ var __assign = (this && this.__assign) || function () {
|
|
|
12
12
|
};
|
|
13
13
|
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
14
14
|
if (k2 === undefined) k2 = k;
|
|
15
|
-
Object.
|
|
15
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
16
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
17
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
18
|
+
}
|
|
19
|
+
Object.defineProperty(o, k2, desc);
|
|
16
20
|
}) : (function(o, m, k, k2) {
|
|
17
21
|
if (k2 === undefined) k2 = k;
|
|
18
22
|
o[k2] = m[k];
|
|
@@ -44,7 +48,7 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
|
44
48
|
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
45
49
|
function step(op) {
|
|
46
50
|
if (f) throw new TypeError("Generator is already executing.");
|
|
47
|
-
while (_) try {
|
|
51
|
+
while (g && (g = 0, op[0] && (_ = 0)), _) try {
|
|
48
52
|
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
53
|
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
50
54
|
switch (op[0]) {
|
|
@@ -65,10 +69,14 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
|
65
69
|
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
66
70
|
}
|
|
67
71
|
};
|
|
68
|
-
var __spreadArray = (this && this.__spreadArray) || function (to, from) {
|
|
69
|
-
for (var i = 0,
|
|
70
|
-
|
|
71
|
-
|
|
72
|
+
var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
|
|
73
|
+
if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
|
|
74
|
+
if (ar || !(i in from)) {
|
|
75
|
+
if (!ar) ar = Array.prototype.slice.call(from, 0, i);
|
|
76
|
+
ar[i] = from[i];
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
return to.concat(ar || Array.prototype.slice.call(from));
|
|
72
80
|
};
|
|
73
81
|
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
74
82
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
@@ -123,11 +131,11 @@ var initialState = {
|
|
|
123
131
|
};
|
|
124
132
|
var TextToHtml = function (_a, ref) {
|
|
125
133
|
var _b = _a.initialValue, initialValue = _b === void 0 ? exports.textToHtmlInitialValue : _b, onChange = _a.onChange, onDelete = _a.onDelete, defaultSpacing = _a.defaultSpacing, setExternalValues = _a.setExternalValues;
|
|
126
|
-
var keyboardRef = react_1.useRef(initialStateKeyboardRef);
|
|
127
|
-
var _c = react_1.useState(initialState), state = _c[0], setState = _c[1];
|
|
134
|
+
var keyboardRef = (0, react_1.useRef)(initialStateKeyboardRef);
|
|
135
|
+
var _c = (0, react_1.useState)(initialState), state = _c[0], setState = _c[1];
|
|
128
136
|
var createCursorClick = state.createCursorClick, characters = state.characters, move = state.move, resize = state.resize, tap = state.tap, textStyle = state.textStyle;
|
|
129
137
|
var color = textStyle.color, fontSize = textStyle.fontSize, fontFamily = textStyle.fontFamily, textAlign = textStyle.textAlign, letterSpacing = textStyle.letterSpacing;
|
|
130
|
-
var propsRef = react_1.useRef({
|
|
138
|
+
var propsRef = (0, react_1.useRef)({
|
|
131
139
|
onChange: onChange
|
|
132
140
|
});
|
|
133
141
|
var cursor = characters.findIndex(function (_a) {
|
|
@@ -142,7 +150,7 @@ var TextToHtml = function (_a, ref) {
|
|
|
142
150
|
return (__assign(__assign({}, values), (_a = {}, _a[type] = (type && field) ? __assign(__assign({}, values[type]), (_b = {}, _b[field] = value, _b)) : value, _a)));
|
|
143
151
|
});
|
|
144
152
|
};
|
|
145
|
-
var setCharacters = react_1.useCallback(function (value) { return logicSetState({ type: 'characters', value: value }); }, []);
|
|
153
|
+
var setCharacters = (0, react_1.useCallback)(function (value) { return logicSetState({ type: 'characters', value: value }); }, []);
|
|
146
154
|
var focusToWrite = function () {
|
|
147
155
|
var element = document.getElementById(exports.TEXT_TO_HTML_ID);
|
|
148
156
|
if (element)
|
|
@@ -150,19 +158,19 @@ var TextToHtml = function (_a, ref) {
|
|
|
150
158
|
};
|
|
151
159
|
var toggleResize = function () { return logicSetState({ type: 'resize', value: !resize }); };
|
|
152
160
|
var toggleClickAway = function () { return logicSetState({ type: 'clickAway', value: (state.clickAway === undefined) ? false : undefined }); };
|
|
153
|
-
var disableResize = react_1.useCallback(function () { return logicSetState({ type: 'resize', value: false }); }, []);
|
|
154
|
-
var handleCreateCursorClick = react_1.useCallback(function (boolean) { return logicSetState({ type: 'createCursorClick', value: boolean }); }, []);
|
|
155
|
-
var deleteCursor = react_1.useCallback(function () { return logicSetState({ type: 'characters', value: characters.filter(function (_a) {
|
|
161
|
+
var disableResize = (0, react_1.useCallback)(function () { return logicSetState({ type: 'resize', value: false }); }, []);
|
|
162
|
+
var handleCreateCursorClick = (0, react_1.useCallback)(function (boolean) { return logicSetState({ type: 'createCursorClick', value: boolean }); }, []);
|
|
163
|
+
var deleteCursor = (0, react_1.useCallback)(function () { return logicSetState({ type: 'characters', value: characters.filter(function (_a) {
|
|
156
164
|
var string = _a.string;
|
|
157
165
|
return string !== 'cursor';
|
|
158
166
|
}) }); }, [characters]);
|
|
159
|
-
var createCursor = react_1.useCallback(function (e) {
|
|
160
|
-
var newCharacters = __spreadArray([], characters);
|
|
167
|
+
var createCursor = (0, react_1.useCallback)(function (e) {
|
|
168
|
+
var newCharacters = __spreadArray([], characters, true);
|
|
161
169
|
newCharacters.push(exports.initialStateCursor);
|
|
162
170
|
focusToWrite();
|
|
163
171
|
logicSetState({ type: 'characters', value: newCharacters });
|
|
164
172
|
}, [characters]);
|
|
165
|
-
var clickAway = react_1.useCallback(function (e) {
|
|
173
|
+
var clickAway = (0, react_1.useCallback)(function (e) {
|
|
166
174
|
if (createCursorClick) {
|
|
167
175
|
handleCreateCursorClick(false);
|
|
168
176
|
return;
|
|
@@ -200,7 +208,7 @@ var TextToHtml = function (_a, ref) {
|
|
|
200
208
|
case 1:
|
|
201
209
|
text = _b.sent();
|
|
202
210
|
if (text === null || text === void 0 ? void 0 : text.length) {
|
|
203
|
-
newCharacters = __spreadArray([], characters);
|
|
211
|
+
newCharacters = __spreadArray([], characters, true);
|
|
204
212
|
for (index = 0; (index < text.length); index++) {
|
|
205
213
|
string = text[index];
|
|
206
214
|
newCharacter = __assign(__assign({}, exports.initialStateCharacter), { string: string });
|
|
@@ -214,7 +222,7 @@ var TextToHtml = function (_a, ref) {
|
|
|
214
222
|
cursor_1 = newCharacters.splice(cursorIndex, 1)[0];
|
|
215
223
|
(cursor_1) && newCharacters.push(cursor_1);
|
|
216
224
|
}
|
|
217
|
-
(!lodash_1.isEqual(characters, newCharacters)) && setCharacters(newCharacters);
|
|
225
|
+
(!(0, lodash_1.isEqual)(characters, newCharacters)) && setCharacters(newCharacters);
|
|
218
226
|
}
|
|
219
227
|
return [2 /*return*/];
|
|
220
228
|
}
|
|
@@ -224,11 +232,11 @@ var TextToHtml = function (_a, ref) {
|
|
|
224
232
|
var element = document.getElementById(exports.TEXT_TO_HTML_ID);
|
|
225
233
|
(element) && (element.style.cssText = cssText);
|
|
226
234
|
};
|
|
227
|
-
var loadInitialValue = react_1.useCallback(function (initialValue) {
|
|
235
|
+
var loadInitialValue = (0, react_1.useCallback)(function (initialValue) {
|
|
228
236
|
(initialValue.cssText) && setStyleFromInitialValue(initialValue.cssText);
|
|
229
237
|
(initialValue.characters) && setCharacters(initialValue.characters);
|
|
230
238
|
}, [setCharacters]);
|
|
231
|
-
react_1.useEffect(function () { return loadInitialValue(initialValue); }, [initialValue, loadInitialValue]);
|
|
239
|
+
(0, react_1.useEffect)(function () { return loadInitialValue(initialValue); }, [initialValue, loadInitialValue]);
|
|
232
240
|
var handleKeyDown = function (e) {
|
|
233
241
|
e.preventDefault();
|
|
234
242
|
e.stopPropagation();
|
|
@@ -243,7 +251,7 @@ var TextToHtml = function (_a, ref) {
|
|
|
243
251
|
var capsLock = e.getModifierState('CapsLock');
|
|
244
252
|
var deleted = undefined;
|
|
245
253
|
var newCharacter = { string: null };
|
|
246
|
-
var newCharacters = __spreadArray([], characters);
|
|
254
|
+
var newCharacters = __spreadArray([], characters, true);
|
|
247
255
|
var paste = (((key === 'v') || (key === 'V')) && (keyCode === 86) && (code === 'KeyV') && ctrlKey && !shiftKey);
|
|
248
256
|
var characterBeforeCursorIndex = (cursor - 1);
|
|
249
257
|
var characterBeforeCursor = newCharacters[characterBeforeCursorIndex];
|
|
@@ -286,12 +294,9 @@ var TextToHtml = function (_a, ref) {
|
|
|
286
294
|
else if (key === 'Delete')
|
|
287
295
|
deleteText('right');
|
|
288
296
|
else {
|
|
289
|
-
var _a = utils_1.translateKey({ key: key, keyCode: keyCode, code: code, shift: shift, altGraph: keyboardRef.current.altGraph, capsLock: capsLock, before: characterBeforeCursor }), string = _a.string, before = _a.before;
|
|
297
|
+
var _a = (0, utils_1.translateKey)({ key: key, keyCode: keyCode, code: code, shift: shift, altGraph: keyboardRef.current.altGraph, capsLock: capsLock, before: characterBeforeCursor }), string = _a.string, before = _a.before;
|
|
290
298
|
if (string) {
|
|
291
|
-
newCharacter = __assign(__assign({}, exports.initialStateCharacter), { key: key,
|
|
292
|
-
keyCode: keyCode,
|
|
293
|
-
code: code,
|
|
294
|
-
string: string, dead: before.dead, shift: shift });
|
|
299
|
+
newCharacter = __assign(__assign({}, exports.initialStateCharacter), { key: key, keyCode: keyCode, code: code, string: string, dead: before.dead, shift: shift });
|
|
295
300
|
newCharacters.splice(cursor, 0, newCharacter);
|
|
296
301
|
if (characterBeforeCursor) {
|
|
297
302
|
if (before.delete)
|
|
@@ -303,7 +308,7 @@ var TextToHtml = function (_a, ref) {
|
|
|
303
308
|
}
|
|
304
309
|
}
|
|
305
310
|
}
|
|
306
|
-
(!lodash_1.isEqual(newCharacters, characters)) && setCharacters(newCharacters);
|
|
311
|
+
(!(0, lodash_1.isEqual)(newCharacters, characters)) && setCharacters(newCharacters);
|
|
307
312
|
if (deleted)
|
|
308
313
|
onDelete && onDelete(e, deleted, newCharacters);
|
|
309
314
|
};
|
|
@@ -400,7 +405,7 @@ var TextToHtml = function (_a, ref) {
|
|
|
400
405
|
focusToWrite();
|
|
401
406
|
setTimeout(function () { return logicSetState({ type: 'clickAway', value: undefined }); }, 0);
|
|
402
407
|
};
|
|
403
|
-
var changeStyles = react_1.useCallback(function (_a) {
|
|
408
|
+
var changeStyles = (0, react_1.useCallback)(function (_a) {
|
|
404
409
|
var resize = _a.resize;
|
|
405
410
|
var element = document.getElementById(exports.TEXT_TO_HTML_ID);
|
|
406
411
|
if (element) {
|
|
@@ -414,8 +419,8 @@ var TextToHtml = function (_a, ref) {
|
|
|
414
419
|
}
|
|
415
420
|
}
|
|
416
421
|
}, []);
|
|
417
|
-
react_1.useEffect(function () { return changeStyles({ resize: resize }); }, [resize, changeStyles]);
|
|
418
|
-
var createHtmlString = react_1.useCallback(function () {
|
|
422
|
+
(0, react_1.useEffect)(function () { return changeStyles({ resize: resize }); }, [resize, changeStyles]);
|
|
423
|
+
var createHtmlString = (0, react_1.useCallback)(function () {
|
|
419
424
|
var _a;
|
|
420
425
|
var element = document.getElementById(exports.TEXT_TO_HTML_ID);
|
|
421
426
|
if (element) {
|
|
@@ -426,7 +431,7 @@ var TextToHtml = function (_a, ref) {
|
|
|
426
431
|
});
|
|
427
432
|
element.setAttribute('data-string', htmlDataString_1);
|
|
428
433
|
var newElement = element.cloneNode(true);
|
|
429
|
-
newElement.id = Math.floor(Math.random() * 1000001)
|
|
434
|
+
newElement.id = "".concat(Math.floor(Math.random() * 1000001), "-").concat(element.id);
|
|
430
435
|
newElement.style.cursor = 'inherit';
|
|
431
436
|
var htmlString = newElement.outerHTML;
|
|
432
437
|
((_a = propsRef.current) === null || _a === void 0 ? void 0 : _a.onChange) && propsRef.current.onChange(htmlString);
|
|
@@ -435,26 +440,21 @@ var TextToHtml = function (_a, ref) {
|
|
|
435
440
|
return { htmlString: htmlString };
|
|
436
441
|
}
|
|
437
442
|
}, [characters, ref]);
|
|
438
|
-
react_1.useEffect(function () { return createHtmlString(); }, [characters, createHtmlString]);
|
|
439
|
-
react_1.useEffect(function () { return ref.current = __assign(__assign(__assign({}, ref.current), state), { clickAway: clickAway,
|
|
440
|
-
focusToWrite: focusToWrite,
|
|
441
|
-
createCursor: createCursor,
|
|
442
|
-
setCharacters: setCharacters,
|
|
443
|
-
createHtmlString: createHtmlString,
|
|
444
|
-
setExternalValues: setExternalValues }); }, [ref, state, setCharacters, createCursor, createHtmlString, clickAway, setExternalValues]);
|
|
443
|
+
(0, react_1.useEffect)(function () { return createHtmlString(); }, [characters, createHtmlString]);
|
|
444
|
+
(0, react_1.useEffect)(function () { return ref.current = __assign(__assign(__assign({}, ref.current), state), { clickAway: clickAway, focusToWrite: focusToWrite, createCursor: createCursor, setCharacters: setCharacters, createHtmlString: createHtmlString, setExternalValues: setExternalValues }); }, [ref, state, setCharacters, createCursor, createHtmlString, clickAway, setExternalValues]);
|
|
445
445
|
var updateExternalValues = function (_a) {
|
|
446
446
|
var state = _a.state, setExternalValues = _a.setExternalValues;
|
|
447
447
|
setExternalValues && setExternalValues(state);
|
|
448
448
|
};
|
|
449
|
-
react_1.useEffect(function () { return updateExternalValues({ state: state, setExternalValues: setExternalValues }); }, [state, setExternalValues]);
|
|
449
|
+
(0, react_1.useEffect)(function () { return updateExternalValues({ state: state, setExternalValues: setExternalValues }); }, [state, setExternalValues]);
|
|
450
450
|
return react_1.default.createElement("div", { className: 'text-to-html-container' },
|
|
451
451
|
(canWrite) && (react_1.default.createElement(TextStyles_1.default, __assign({ setColor: function (value) { return logicSetState({ type: 'textStyle', field: 'color', value: value }); } }, { color: color, defaultSpacing: defaultSpacing, toggleClickAway: toggleClickAway, handleFontSizeChange: handleFontSizeChange, textAlign: textAlign, handleTextAlignChange: handleTextAlignChange }))),
|
|
452
452
|
react_1.default.createElement("div", { id: TEXT_TO_HTML_TEXT_CONTAINER_ID, onClick: handleContainerClick, className: 'text-to-html-text-container' },
|
|
453
453
|
react_1.default.createElement(core_1.ClickAwayListener, { mouseEvent: state.clickAway, touchEvent: state.clickAway, disableReactTree: true, onClickAway: handleClickAway },
|
|
454
454
|
react_1.default.createElement("div", { id: exports.TEXT_TO_HTML_ID, tabIndex: 0, onKeyDown: handleKeyDown, onKeyUp: handleKeyUp, onMouseDown: handleMouseDownTouchStart, onMouseUp: handleMouseUpTouchEnd, onMouseMove: handleMouseTouchMove, onTouchStart: handleMouseDownTouchStart, onTouchEnd: handleMouseUpTouchEnd, onTouchMove: handleMouseTouchMove, onClick: handleClick, onDoubleClick: handleDoubleClick, style: {
|
|
455
|
-
color: (color) ? "rgba("
|
|
455
|
+
color: (color) ? "rgba(".concat(color.r, ", ").concat(color.g, ", ").concat(color.b, ", ").concat(color.a, ")") : 'inherit',
|
|
456
456
|
textAlign: (textAlign) ? textAlign : 'inherit',
|
|
457
|
-
fontSize: (fontSize) ? fontSize
|
|
457
|
+
fontSize: (fontSize) ? "".concat(fontSize, "rem") : '1rem',
|
|
458
458
|
fontFamily: (fontFamily) ? fontFamily : 'inherit',
|
|
459
459
|
letterSpacing: (letterSpacing) ? letterSpacing : 'inherit'
|
|
460
460
|
}, className: 'text-to-html' },
|
|
@@ -462,12 +462,12 @@ var TextToHtml = function (_a, ref) {
|
|
|
462
462
|
var code = _a.code, string = _a.string, dead = _a.dead, mark = _a.mark;
|
|
463
463
|
switch (string) {
|
|
464
464
|
case 'cursor':
|
|
465
|
-
return react_1.default.createElement(Cursor_1.default, { key: stringIndex
|
|
465
|
+
return react_1.default.createElement(Cursor_1.default, { key: "".concat(stringIndex, "-").concat(string), id: TEXT_TO_HTML_CURSOR_ID, className: 'text-to-html-cursor' });
|
|
466
466
|
default:
|
|
467
|
-
return (string) ? (react_1.default.createElement("span", { key: stringIndex
|
|
467
|
+
return (string) ? (react_1.default.createElement("span", { key: "".concat(stringIndex, "-").concat(string), style: {
|
|
468
468
|
textDecoration: (dead || (mark === null || mark === void 0 ? void 0 : mark.length)) ? 'underline' : ''
|
|
469
469
|
} }, string)) : null;
|
|
470
470
|
}
|
|
471
471
|
}))))));
|
|
472
472
|
};
|
|
473
|
-
exports.default = react_1.forwardRef(TextToHtml);
|
|
473
|
+
exports.default = (0, react_1.forwardRef)(TextToHtml);
|
|
@@ -16,7 +16,11 @@ var __extends = (this && this.__extends) || (function () {
|
|
|
16
16
|
})();
|
|
17
17
|
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
18
18
|
if (k2 === undefined) k2 = k;
|
|
19
|
-
Object.
|
|
19
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
20
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
21
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
22
|
+
}
|
|
23
|
+
Object.defineProperty(o, k2, desc);
|
|
20
24
|
}) : (function(o, m, k, k2) {
|
|
21
25
|
if (k2 === undefined) k2 = k;
|
|
22
26
|
o[k2] = m[k];
|
|
@@ -80,7 +84,7 @@ var ThreadLog = /** @class */ (function (_super) {
|
|
|
80
84
|
_this.setState({ loading: true });
|
|
81
85
|
if (infoProcesso.open)
|
|
82
86
|
_this.buscaInfoProcesso(infoProcesso.info[0]);
|
|
83
|
-
api_1.recebeThread({ cdThread: thread.thread, qt: qt, nrPg: nrPg }).then(function (res) {
|
|
87
|
+
(0, api_1.recebeThread)({ cdThread: thread.thread, qt: qt, nrPg: nrPg }).then(function (res) {
|
|
84
88
|
var processos = res.processos.map(function (item) {
|
|
85
89
|
switch (item[3]) {
|
|
86
90
|
case 'P':
|
|
@@ -103,14 +107,14 @@ var ThreadLog = /** @class */ (function (_super) {
|
|
|
103
107
|
break;
|
|
104
108
|
default: item[4] = '';
|
|
105
109
|
}
|
|
106
|
-
var inicio = date_1.sqlDateToReadableDate(item[6]);
|
|
107
|
-
var fim = date_1.sqlDateToReadableDate(item[7]);
|
|
108
|
-
item[6] = inicio.hour
|
|
109
|
-
item[7] = fim.hour
|
|
110
|
+
var inicio = (0, date_1.sqlDateToReadableDate)(item[6]);
|
|
111
|
+
var fim = (0, date_1.sqlDateToReadableDate)(item[7]);
|
|
112
|
+
item[6] = "".concat(inicio.hour, " - ").concat(inicio.date);
|
|
113
|
+
item[7] = "".concat(fim.hour, " - ").concat(fim.date);
|
|
110
114
|
return item;
|
|
111
115
|
});
|
|
112
116
|
_this.setState({ loading: false });
|
|
113
|
-
fieldsRedux_1.setField(_this.props.currentProgram
|
|
117
|
+
(0, fieldsRedux_1.setField)("".concat(_this.props.currentProgram, "-threads"), 'value', processos);
|
|
114
118
|
});
|
|
115
119
|
}
|
|
116
120
|
};
|
|
@@ -119,7 +123,7 @@ var ThreadLog = /** @class */ (function (_super) {
|
|
|
119
123
|
_this.buscaInfoProcesso(processo[0]);
|
|
120
124
|
};
|
|
121
125
|
_this.buscaInfoProcesso = function (idProcesso) {
|
|
122
|
-
api_1.recebeInfoThread({ idProcesso: idProcesso }).then(function (res) {
|
|
126
|
+
(0, api_1.recebeInfoThread)({ idProcesso: idProcesso }).then(function (res) {
|
|
123
127
|
var confs = JSON.parse(res.infoProcesso[6]);
|
|
124
128
|
var arr = [];
|
|
125
129
|
for (var _i = 0, _a = Object.keys(confs); _i < _a.length; _i++) {
|
|
@@ -198,12 +202,12 @@ var ThreadLog = /** @class */ (function (_super) {
|
|
|
198
202
|
react_1.default.createElement("span", { className: 'color999' }, "Tempo estimado:"),
|
|
199
203
|
" ",
|
|
200
204
|
infoProcesso.current[3]))),
|
|
201
|
-
react_1.default.createElement(SimpleTable_1.default, { field: currentProgram
|
|
205
|
+
react_1.default.createElement(SimpleTable_1.default, { field: "".concat(currentProgram, "-thread-info"), className: 'reset-margin-bottom', defaultValue: infoProcesso.confs, destroyOnUnmount: true }),
|
|
202
206
|
infoProcesso.info[9].relatorios.length > 0 &&
|
|
203
207
|
react_1.default.createElement("div", null,
|
|
204
208
|
react_1.default.createElement("hr", { className: 'reset-margin' }),
|
|
205
209
|
react_1.default.createElement("div", { className: 'text-right padding-sm' }, infoProcesso.info[9].relatorios.map(function (item, index) {
|
|
206
|
-
return react_1.default.createElement("a", { key: index, className: 'ag-threadlog-print', href: ""
|
|
210
|
+
return react_1.default.createElement("a", { key: index, className: 'ag-threadlog-print', href: "".concat((0, config_1.getConfig)().ssl ? 'https' : 'http').concat((0, api_1.server)(), "}r").concat(infoProcesso.info[0], "s").concat(item[0], ".agrel"), target: '_blank', rel: 'noreferrer' },
|
|
207
211
|
item[1],
|
|
208
212
|
item[2] > 0 && react_1.default.createElement("span", { className: 'agtl-size' },
|
|
209
213
|
"- ",
|
|
@@ -212,7 +216,7 @@ var ThreadLog = /** @class */ (function (_super) {
|
|
|
212
216
|
react_1.default.createElement("span", { className: 'agtl-print bg-blue-alt' },
|
|
213
217
|
react_1.default.createElement(fa_1.FaPrint, null)));
|
|
214
218
|
}))))),
|
|
215
|
-
!infoProcesso.open && (react_1.default.createElement(SimpleTable_1.default, { field: currentProgram
|
|
219
|
+
!infoProcesso.open && (react_1.default.createElement(SimpleTable_1.default, { field: "".concat(currentProgram, "-threads"), rows: 5, className: 'process-threads reset-margin-bottom', onClick: this.visualizaProcesso, head: ['Descrição', 'Status', 'Finalização', 'Início', 'Fim'], alias: [2, 3, 4, 6, 7] }))))))));
|
|
216
220
|
};
|
|
217
221
|
return ThreadLog;
|
|
218
222
|
}(react_1.Component));
|
|
@@ -12,7 +12,11 @@ var __assign = (this && this.__assign) || function () {
|
|
|
12
12
|
};
|
|
13
13
|
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
14
14
|
if (k2 === undefined) k2 = k;
|
|
15
|
-
Object.
|
|
15
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
16
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
17
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
18
|
+
}
|
|
19
|
+
Object.defineProperty(o, k2, desc);
|
|
16
20
|
}) : (function(o, m, k, k2) {
|
|
17
21
|
if (k2 === undefined) k2 = k;
|
|
18
22
|
o[k2] = m[k];
|
|
@@ -44,7 +48,7 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
|
44
48
|
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
45
49
|
function step(op) {
|
|
46
50
|
if (f) throw new TypeError("Generator is already executing.");
|
|
47
|
-
while (_) try {
|
|
51
|
+
while (g && (g = 0, op[0] && (_ = 0)), _) try {
|
|
48
52
|
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
53
|
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
50
54
|
switch (op[0]) {
|
|
@@ -85,11 +89,11 @@ var initialState = {
|
|
|
85
89
|
function UserCard(_a) {
|
|
86
90
|
var _this = this;
|
|
87
91
|
var anchor = _a.anchor, userId = _a.userId;
|
|
88
|
-
var time = react_1.useRef();
|
|
89
|
-
var clear = react_1.useRef(true);
|
|
90
|
-
var allowShow = react_1.useRef(false);
|
|
91
|
-
var loggedUserId = utils_1.useStore().usuarioLogado.idUsuario;
|
|
92
|
-
var _b = react_1.useState(__assign(__assign({}, initialState), { local: {
|
|
92
|
+
var time = (0, react_1.useRef)();
|
|
93
|
+
var clear = (0, react_1.useRef)(true);
|
|
94
|
+
var allowShow = (0, react_1.useRef)(false);
|
|
95
|
+
var loggedUserId = (0, utils_1.useStore)().usuarioLogado.idUsuario;
|
|
96
|
+
var _b = (0, react_1.useState)(__assign(__assign({}, initialState), { local: {
|
|
93
97
|
anchor: (anchor || null),
|
|
94
98
|
userId: (userId || null)
|
|
95
99
|
} })), state = _b[0], setState = _b[1];
|
|
@@ -101,7 +105,7 @@ function UserCard(_a) {
|
|
|
101
105
|
return (__assign(__assign({}, states), (_a = {}, _a[type] = type && field ? __assign(__assign({}, states[type]), (_b = {}, _b[field] = value, _b)) : value, _a)));
|
|
102
106
|
});
|
|
103
107
|
};
|
|
104
|
-
react_1.useEffect(function () {
|
|
108
|
+
(0, react_1.useEffect)(function () {
|
|
105
109
|
if (anchor && userId) {
|
|
106
110
|
logicSetState({ type: 'local', value: { anchor: anchor, userId: userId } });
|
|
107
111
|
allowShow.current = true;
|
|
@@ -116,7 +120,7 @@ function UserCard(_a) {
|
|
|
116
120
|
}, 200);
|
|
117
121
|
}
|
|
118
122
|
}, [anchor, userId, show]);
|
|
119
|
-
var search = react_1.useCallback(function () { return __awaiter(_this, void 0, void 0, function () {
|
|
123
|
+
var search = (0, react_1.useCallback)(function () { return __awaiter(_this, void 0, void 0, function () {
|
|
120
124
|
var response;
|
|
121
125
|
return __generator(this, function (_a) {
|
|
122
126
|
switch (_a.label) {
|
|
@@ -126,7 +130,7 @@ function UserCard(_a) {
|
|
|
126
130
|
clearTimeout(time.current);
|
|
127
131
|
return [2 /*return*/];
|
|
128
132
|
}
|
|
129
|
-
return [4 /*yield*/, api_1.serverAction('getInfoUsuario', { idUsuario: local.userId }, 'Argous.MntUsuarios', true)];
|
|
133
|
+
return [4 /*yield*/, (0, api_1.serverAction)('getInfoUsuario', { idUsuario: local.userId }, 'Argous.MntUsuarios', true)];
|
|
130
134
|
case 1:
|
|
131
135
|
response = _a.sent();
|
|
132
136
|
time.current = setTimeout(function () {
|
|
@@ -138,7 +142,7 @@ function UserCard(_a) {
|
|
|
138
142
|
}
|
|
139
143
|
});
|
|
140
144
|
}); }, [local]);
|
|
141
|
-
react_1.useEffect(function () { return void (search()); }, [search]);
|
|
145
|
+
(0, react_1.useEffect)(function () { return void (search()); }, [search]);
|
|
142
146
|
var returnUser = function () {
|
|
143
147
|
return { idUsuario: userId, titulo: data.dsNomeUsuario, subTitulo: data.dsFuncaoUsuario, msgsNaoLidas: 0, online: false };
|
|
144
148
|
};
|
|
@@ -166,16 +170,16 @@ function UserCard(_a) {
|
|
|
166
170
|
"Usu\u00E1rio excluido em ",
|
|
167
171
|
data.dtExclusaoUsuario) : (((userId && (loggedUserId !== userId)) || (local.userId && (loggedUserId !== local.userId))) && (react_1.default.createElement(react_1.default.Fragment, null,
|
|
168
172
|
(data.nrRamalUsuario) && (react_1.default.createElement(core_1.Grid, { item: true, xs: true },
|
|
169
|
-
react_1.default.createElement(core_1.Button, { fullWidth: true, variant: 'contained', href: "tel: "
|
|
173
|
+
react_1.default.createElement(core_1.Button, { fullWidth: true, variant: 'contained', href: "tel: ".concat(data.nrRamalUsuario), title: "Ramal: ".concat(data.nrRamalUsuario) },
|
|
170
174
|
react_1.default.createElement(io_1.IoIosCall, null),
|
|
171
175
|
"\u00A0",
|
|
172
176
|
data.nrRamalUsuario))),
|
|
173
177
|
react_1.default.createElement(core_1.Grid, { item: true, xs: true },
|
|
174
|
-
react_1.default.createElement(core_1.Button, { fullWidth: true, variant: 'contained', href: "mailto: "
|
|
178
|
+
react_1.default.createElement(core_1.Button, { fullWidth: true, variant: 'contained', href: "mailto: ".concat(data.dsEmailUsuario), title: data.dsEmailUsuario },
|
|
175
179
|
react_1.default.createElement(md_1.MdMail, null),
|
|
176
180
|
"\u00A0Email")),
|
|
177
181
|
react_1.default.createElement(core_1.Grid, { item: true, xs: true },
|
|
178
|
-
react_1.default.createElement(core_1.Button, { fullWidth: true, variant: 'contained', onClick: function () { return fieldsRedux_1.setAnotherProgramField('janelaChatOpen', returnUser(), 'argousSystem'); }, title: 'Abrir chat de conversa' },
|
|
182
|
+
react_1.default.createElement(core_1.Button, { fullWidth: true, variant: 'contained', onClick: function () { return (0, fieldsRedux_1.setAnotherProgramField)('janelaChatOpen', returnUser(), 'argousSystem'); }, title: 'Abrir chat de conversa' },
|
|
179
183
|
react_1.default.createElement(md_1.MdMessage, null),
|
|
180
184
|
"\u00A0Mensagem"))))))))));
|
|
181
185
|
return null;
|