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.
Files changed (263) hide show
  1. package/dist/actions/index.d.ts +58 -0
  2. package/dist/actions/index.js +59 -0
  3. package/dist/api/WebSocket.d.ts +25 -0
  4. package/dist/api/WebSocket.js +170 -0
  5. package/dist/api/index.d.ts +63 -0
  6. package/dist/api/index.js +762 -0
  7. package/dist/api/ws.d.ts +4 -0
  8. package/dist/api/ws.js +36 -0
  9. package/dist/components/Alert/Alert.d.ts +8 -0
  10. package/dist/components/Alert/Alert.js +68 -0
  11. package/dist/components/Alert/index.d.ts +2 -0
  12. package/dist/components/Alert/index.js +8 -0
  13. package/dist/components/ArgousAction/ArgousAction.d.ts +8 -0
  14. package/dist/components/ArgousAction/ArgousAction.js +87 -0
  15. package/dist/components/ArgousAction/index.d.ts +2 -0
  16. package/dist/components/ArgousAction/index.js +8 -0
  17. package/dist/components/ArgousAvatar/ArgousAvatar.d.ts +14 -0
  18. package/dist/components/ArgousAvatar/ArgousAvatar.js +124 -0
  19. package/dist/components/ArgousAvatar/index.d.ts +2 -0
  20. package/dist/components/ArgousAvatar/index.js +8 -0
  21. package/dist/components/ArgousComplexPagination/ArgousComplexPagination.d.ts +76 -0
  22. package/dist/components/ArgousComplexPagination/ArgousComplexPagination.js +156 -0
  23. package/dist/components/ArgousComplexPagination/index.d.ts +2 -0
  24. package/dist/components/ArgousComplexPagination/index.js +8 -0
  25. package/dist/components/ArgousComplexTable/ArgousComplexTable.d.ts +131 -0
  26. package/dist/components/ArgousComplexTable/ArgousComplexTable.js +333 -0
  27. package/dist/components/ArgousComplexTable/index.d.ts +2 -0
  28. package/dist/components/ArgousComplexTable/index.js +8 -0
  29. package/dist/components/ArgousComplexTableBody/ArgousComplexTableBody.d.ts +177 -0
  30. package/dist/components/ArgousComplexTableBody/ArgousComplexTableBody.js +155 -0
  31. package/dist/components/ArgousComplexTableBody/index.d.ts +2 -0
  32. package/dist/components/ArgousComplexTableBody/index.js +8 -0
  33. package/dist/components/ArgousComplexTableHead/ArgousComplexTableHead.d.ts +73 -0
  34. package/dist/components/ArgousComplexTableHead/ArgousComplexTableHead.js +88 -0
  35. package/dist/components/ArgousComplexTableHead/index.d.ts +2 -0
  36. package/dist/components/ArgousComplexTableHead/index.js +8 -0
  37. package/dist/components/ArgousComplexTableToolbar/ArgousComplexTableToolBar.d.ts +58 -0
  38. package/dist/components/ArgousComplexTableToolbar/ArgousComplexTableToolBar.js +70 -0
  39. package/dist/components/ArgousComplexTableToolbar/index.d.ts +2 -0
  40. package/dist/components/ArgousComplexTableToolbar/index.js +8 -0
  41. package/dist/components/ArgousInput/ArgousInput.d.ts +8 -0
  42. package/dist/components/ArgousInput/ArgousInput.js +578 -0
  43. package/dist/components/ArgousInput/index.d.ts +2 -0
  44. package/dist/components/ArgousInput/index.js +8 -0
  45. package/dist/components/ArgousPagination/ArgousPagination.d.ts +8 -0
  46. package/dist/components/ArgousPagination/ArgousPagination.js +29 -0
  47. package/dist/components/ArgousPagination/index.d.ts +2 -0
  48. package/dist/components/ArgousPagination/index.js +8 -0
  49. package/dist/components/ArgousProgressBar/ArgousProgressBar.d.ts +22 -0
  50. package/dist/components/ArgousProgressBar/ArgousProgressBar.js +162 -0
  51. package/dist/components/ArgousProgressBar/index.d.ts +2 -0
  52. package/dist/components/ArgousProgressBar/index.js +8 -0
  53. package/dist/components/ArgousSimpleTable/ArgousSimpleTable.d.ts +8 -0
  54. package/dist/components/ArgousSimpleTable/ArgousSimpleTable.js +201 -0
  55. package/dist/components/ArgousSimpleTable/index.d.ts +2 -0
  56. package/dist/components/ArgousSimpleTable/index.js +8 -0
  57. package/dist/components/AutoComplete/AutoComplete.d.ts +8 -0
  58. package/dist/components/AutoComplete/AutoComplete.js +185 -0
  59. package/dist/components/AutoComplete/index.d.ts +2 -0
  60. package/dist/components/AutoComplete/index.js +8 -0
  61. package/dist/components/AutoCompleteFavorites/AutoCompleteFavorites.d.ts +20 -0
  62. package/dist/components/AutoCompleteFavorites/AutoCompleteFavorites.js +331 -0
  63. package/dist/components/AutoCompleteFavorites/index.d.ts +1 -0
  64. package/dist/components/AutoCompleteFavorites/index.js +8 -0
  65. package/dist/components/BarChart/BarChart.d.ts +8 -0
  66. package/dist/components/BarChart/BarChart.js +125 -0
  67. package/dist/components/BarChart/index.d.ts +2 -0
  68. package/dist/components/BarChart/index.js +8 -0
  69. package/dist/components/BarraFerramentas/BarraFerramentas.d.ts +21 -0
  70. package/dist/components/BarraFerramentas/BarraFerramentas.js +228 -0
  71. package/dist/components/BarraFerramentas/index.d.ts +2 -0
  72. package/dist/components/BarraFerramentas/index.js +8 -0
  73. package/dist/components/Button/Button.d.ts +8 -0
  74. package/dist/components/Button/Button.js +144 -0
  75. package/dist/components/Button/index.d.ts +2 -0
  76. package/dist/components/Button/index.js +8 -0
  77. package/dist/components/Cabecalho/Cabecalho.d.ts +8 -0
  78. package/dist/components/Cabecalho/Cabecalho.js +231 -0
  79. package/dist/components/Cabecalho/index.d.ts +2 -0
  80. package/dist/components/Cabecalho/index.js +8 -0
  81. package/dist/components/Calendar/Calendar.d.ts +8 -0
  82. package/dist/components/Calendar/Calendar.js +171 -0
  83. package/dist/components/Calendar/index.d.ts +2 -0
  84. package/dist/components/Calendar/index.js +8 -0
  85. package/dist/components/CartaoUsuario/CartaoUsuario.d.ts +9 -0
  86. package/dist/components/CartaoUsuario/CartaoUsuario.js +165 -0
  87. package/dist/components/CartaoUsuario/index.d.ts +2 -0
  88. package/dist/components/CartaoUsuario/index.js +8 -0
  89. package/dist/components/Collapse/Collapse.d.ts +60 -0
  90. package/dist/components/Collapse/Collapse.js +290 -0
  91. package/dist/components/Collapse/index.d.ts +3 -0
  92. package/dist/components/Collapse/index.js +8 -0
  93. package/dist/components/Compartilhar/Compartilhar.d.ts +7 -0
  94. package/dist/components/Compartilhar/Compartilhar.js +266 -0
  95. package/dist/components/Compartilhar/index.d.ts +2 -0
  96. package/dist/components/Compartilhar/index.js +8 -0
  97. package/dist/components/ConfirmModal/BasicModal.d.ts +38 -0
  98. package/dist/components/ConfirmModal/BasicModal.js +29 -0
  99. package/dist/components/ConfirmModal/ModalProvider.d.ts +5 -0
  100. package/dist/components/ConfirmModal/ModalProvider.js +108 -0
  101. package/dist/components/ConfirmModal/WrapperModal.d.ts +18 -0
  102. package/dist/components/ConfirmModal/WrapperModal.js +41 -0
  103. package/dist/components/ConfirmModal/index.d.ts +20 -0
  104. package/dist/components/ConfirmModal/index.js +25 -0
  105. package/dist/components/DropArea/DropArea.d.ts +21 -0
  106. package/dist/components/DropArea/DropArea.js +149 -0
  107. package/dist/components/DropArea/Html5FileSelector.d.ts +16 -0
  108. package/dist/components/DropArea/Html5FileSelector.js +229 -0
  109. package/dist/components/DropArea/index.d.ts +2 -0
  110. package/dist/components/DropArea/index.js +8 -0
  111. package/dist/components/Editor/Events.d.ts +79 -0
  112. package/dist/components/Editor/Events.js +9 -0
  113. package/dist/components/Editor/ScriptLoader.d.ts +20 -0
  114. package/dist/components/Editor/ScriptLoader.js +70 -0
  115. package/dist/components/Editor/TinyMCE.d.ts +10 -0
  116. package/dist/components/Editor/TinyMCE.js +16 -0
  117. package/dist/components/Editor/Utils.d.ts +19 -0
  118. package/dist/components/Editor/Utils.js +62 -0
  119. package/dist/components/Editor/components/Editor.d.ts +67 -0
  120. package/dist/components/Editor/components/Editor.js +351 -0
  121. package/dist/components/Editor/components/EditorPropTypes.d.ts +18 -0
  122. package/dist/components/Editor/components/EditorPropTypes.js +110 -0
  123. package/dist/components/Editor/index.d.ts +9 -0
  124. package/dist/components/Editor/index.js +12 -0
  125. package/dist/components/Editor/tinymce/tinymce.d.ts +2963 -0
  126. package/dist/components/FilePreparer/FilePreparer.d.ts +26 -0
  127. package/dist/components/FilePreparer/FilePreparer.js +279 -0
  128. package/dist/components/FilePreparer/index.d.ts +2 -0
  129. package/dist/components/FilePreparer/index.js +8 -0
  130. package/dist/components/FileUploader/FileUploader.d.ts +9 -0
  131. package/dist/components/FileUploader/FileUploader.js +445 -0
  132. package/dist/components/FileUploader/index.d.ts +2 -0
  133. package/dist/components/FileUploader/index.js +8 -0
  134. package/dist/components/FormVisualizer/FormVisualizer.d.ts +92 -0
  135. package/dist/components/FormVisualizer/FormVisualizer.js +264 -0
  136. package/dist/components/FormVisualizer/index.d.ts +2 -0
  137. package/dist/components/FormVisualizer/index.js +8 -0
  138. package/dist/components/Highlight/Highlight.d.ts +7 -0
  139. package/dist/components/Highlight/Highlight.js +75 -0
  140. package/dist/components/Highlight/index.d.ts +2 -0
  141. package/dist/components/Highlight/index.js +8 -0
  142. package/dist/components/ImageResize/ImageResize.d.ts +28 -0
  143. package/dist/components/ImageResize/ImageResize.js +472 -0
  144. package/dist/components/ImageResize/index.d.ts +2 -0
  145. package/dist/components/ImageResize/index.js +8 -0
  146. package/dist/components/ImageResizeButton/ImageResizeButton.d.ts +26 -0
  147. package/dist/components/ImageResizeButton/ImageResizeButton.js +89 -0
  148. package/dist/components/ImageResizeButton/index.d.ts +2 -0
  149. package/dist/components/ImageResizeButton/index.js +8 -0
  150. package/dist/components/Input/Input.d.ts +8 -0
  151. package/dist/components/Input/Input.js +328 -0
  152. package/dist/components/Input/index.d.ts +2 -0
  153. package/dist/components/Input/index.js +8 -0
  154. package/dist/components/InputTags/InputTags.d.ts +8 -0
  155. package/dist/components/InputTags/InputTags.js +129 -0
  156. package/dist/components/InputTags/index.d.ts +2 -0
  157. package/dist/components/InputTags/index.js +8 -0
  158. package/dist/components/ListSelect/ListSelect.d.ts +8 -0
  159. package/dist/components/ListSelect/ListSelect.js +126 -0
  160. package/dist/components/ListSelect/index.d.ts +2 -0
  161. package/dist/components/ListSelect/index.js +8 -0
  162. package/dist/components/MaterialButton/MaterialButton.d.ts +13 -0
  163. package/dist/components/MaterialButton/MaterialButton.js +192 -0
  164. package/dist/components/MaterialButton/index.d.ts +2 -0
  165. package/dist/components/MaterialButton/index.js +8 -0
  166. package/dist/components/MenuBar/MenuBar.d.ts +8 -0
  167. package/dist/components/MenuBar/MenuBar.js +157 -0
  168. package/dist/components/MenuBar/index.d.ts +2 -0
  169. package/dist/components/MenuBar/index.js +8 -0
  170. package/dist/components/MonthPicker/MonthPicker.d.ts +8 -0
  171. package/dist/components/MonthPicker/MonthPicker.js +288 -0
  172. package/dist/components/MonthPicker/index.d.ts +2 -0
  173. package/dist/components/MonthPicker/index.js +8 -0
  174. package/dist/components/MultipleSelect/MultipleSelect.d.ts +8 -0
  175. package/dist/components/MultipleSelect/MultipleSelect.js +139 -0
  176. package/dist/components/MultipleSelect/index.d.ts +2 -0
  177. package/dist/components/MultipleSelect/index.js +8 -0
  178. package/dist/components/OtpInput/OtpInput.d.ts +18 -0
  179. package/dist/components/OtpInput/OtpInput.js +207 -0
  180. package/dist/components/OtpInput/index.d.ts +2 -0
  181. package/dist/components/OtpInput/index.js +8 -0
  182. package/dist/components/OutputText/OutputText.d.ts +8 -0
  183. package/dist/components/OutputText/OutputText.js +89 -0
  184. package/dist/components/OutputText/index.d.ts +2 -0
  185. package/dist/components/OutputText/index.js +8 -0
  186. package/dist/components/Pagination/Pagination.d.ts +8 -0
  187. package/dist/components/Pagination/Pagination.js +64 -0
  188. package/dist/components/Pagination/index.d.ts +2 -0
  189. package/dist/components/Pagination/index.js +8 -0
  190. package/dist/components/Programa/Programa.d.ts +31 -0
  191. package/dist/components/Programa/Programa.js +201 -0
  192. package/dist/components/Programa/index.d.ts +2 -0
  193. package/dist/components/Programa/index.js +8 -0
  194. package/dist/components/ProgressBar/ProgressBar.d.ts +8 -0
  195. package/dist/components/ProgressBar/ProgressBar.js +98 -0
  196. package/dist/components/ProgressBar/index.d.ts +2 -0
  197. package/dist/components/ProgressBar/index.js +8 -0
  198. package/dist/components/Select/Select.d.ts +8 -0
  199. package/dist/components/Select/Select.js +142 -0
  200. package/dist/components/Select/index.d.ts +2 -0
  201. package/dist/components/Select/index.js +8 -0
  202. package/dist/components/SimpleTable/SimpleTable.d.ts +13 -0
  203. package/dist/components/SimpleTable/SimpleTable.js +390 -0
  204. package/dist/components/SimpleTable/index.d.ts +2 -0
  205. package/dist/components/SimpleTable/index.js +10 -0
  206. package/dist/components/Stepper/Stepper.d.ts +54 -0
  207. package/dist/components/Stepper/Stepper.js +157 -0
  208. package/dist/components/Stepper/index.d.ts +2 -0
  209. package/dist/components/Stepper/index.js +8 -0
  210. package/dist/components/TablePicker/TablePicker.d.ts +8 -0
  211. package/dist/components/TablePicker/TablePicker.js +222 -0
  212. package/dist/components/TablePicker/index.d.ts +2 -0
  213. package/dist/components/TablePicker/index.js +8 -0
  214. package/dist/components/Tabs/Tabs.d.ts +8 -0
  215. package/dist/components/Tabs/Tabs.js +76 -0
  216. package/dist/components/Tabs/index.d.ts +2 -0
  217. package/dist/components/Tabs/index.js +8 -0
  218. package/dist/components/TextArea/TextArea.d.ts +8 -0
  219. package/dist/components/TextArea/TextArea.js +148 -0
  220. package/dist/components/TextArea/index.d.ts +2 -0
  221. package/dist/components/TextArea/index.js +8 -0
  222. package/dist/components/ThreadLog/ThreadLog.d.ts +8 -0
  223. package/dist/components/ThreadLog/ThreadLog.js +225 -0
  224. package/dist/components/ThreadLog/index.d.ts +2 -0
  225. package/dist/components/ThreadLog/index.js +8 -0
  226. package/dist/components/UtilAutoComplete/UtilAutoComplete.d.ts +93 -0
  227. package/dist/components/UtilAutoComplete/UtilAutoComplete.js +188 -0
  228. package/dist/components/UtilAutoComplete/index.d.ts +2 -0
  229. package/dist/components/UtilAutoComplete/index.js +8 -0
  230. package/dist/components/index.d.ts +148 -0
  231. package/dist/components/index.js +165 -0
  232. package/dist/fieldsRedux/createField.d.ts +8 -0
  233. package/dist/fieldsRedux/createField.js +149 -0
  234. package/dist/fieldsRedux/fieldsRedux.d.ts +71 -0
  235. package/dist/fieldsRedux/fieldsRedux.js +436 -0
  236. package/dist/fieldsRedux/index.d.ts +4 -0
  237. package/dist/fieldsRedux/index.js +27 -0
  238. package/dist/fieldsRedux/passFields.d.ts +5 -0
  239. package/dist/fieldsRedux/passFields.js +107 -0
  240. package/dist/reducers/argous.d.ts +76 -0
  241. package/dist/reducers/argous.js +63 -0
  242. package/dist/reducers/index.d.ts +4 -0
  243. package/dist/reducers/index.js +9 -0
  244. package/dist/types.d.ts +144 -0
  245. package/dist/utils/api.d.ts +29 -0
  246. package/dist/utils/api.js +255 -0
  247. package/dist/utils/config.d.ts +3 -0
  248. package/dist/utils/config.js +13 -0
  249. package/dist/utils/date.d.ts +8 -0
  250. package/dist/utils/date.js +60 -0
  251. package/dist/utils/index.d.ts +61 -0
  252. package/dist/utils/index.js +383 -0
  253. package/dist/utils/rippleEffect.d.ts +2 -0
  254. package/dist/utils/rippleEffect.js +173 -0
  255. package/dist/utils/store.d.ts +3 -0
  256. package/dist/utils/store.js +12 -0
  257. package/dist/utils/xmlToJson.d.ts +2 -0
  258. package/dist/utils/xmlToJson.js +158 -0
  259. package/lib/api/index.js +16 -0
  260. package/lib/components/AutoCompleteFavorites/AutoCompleteFavorites.js +298 -0
  261. package/lib/components/AutoCompleteFavorites/index.js +1 -0
  262. package/lib/components/index.js +4 -1
  263. package/package.json +1 -1
@@ -0,0 +1,225 @@
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 api_1 = require("../../api");
41
+ var ProgressBar_1 = __importDefault(require("../../components/ProgressBar"));
42
+ var SimpleTable_1 = __importDefault(require("../../components/SimpleTable"));
43
+ var fieldsRedux_1 = require("../../fieldsRedux");
44
+ var config_1 = require("../../utils/config");
45
+ var date_1 = require("../../utils/date");
46
+ var core_1 = require("@material-ui/core");
47
+ var prop_types_1 = __importDefault(require("prop-types"));
48
+ var react_1 = __importStar(require("react"));
49
+ var fa_1 = require("react-icons/fa");
50
+ var ti_1 = require("react-icons/ti");
51
+ var react_spinkit_1 = __importDefault(require("react-spinkit"));
52
+ /**
53
+ * @deprecated
54
+ */
55
+ var ThreadLog = /** @class */ (function (_super) {
56
+ __extends(ThreadLog, _super);
57
+ function ThreadLog() {
58
+ var _this = _super !== null && _super.apply(this, arguments) || this;
59
+ _this.state = {
60
+ mouseOver: false,
61
+ open: false,
62
+ loading: false,
63
+ selectPanelClicks: 0,
64
+ infoProcesso: {
65
+ open: false,
66
+ info: {},
67
+ confs: {},
68
+ current: {}
69
+ }
70
+ };
71
+ _this.mouseOver = function (boolean) {
72
+ _this.setState({ mouseOver: boolean });
73
+ };
74
+ _this.openDetails = function () {
75
+ var _a = _this.state, open = _a.open, infoProcesso = _a.infoProcesso;
76
+ _this.setState({ open: !open, selectPanelClicks: 0 });
77
+ window.addEventListener('click', _this.closePanel);
78
+ if (!open) {
79
+ var _b = _this.props, thread = _b.thread, _c = _b.qt, qt = _c === void 0 ? 15 : _c, _d = _b.nrPg, nrPg = _d === void 0 ? 0 : _d;
80
+ _this.setState({ loading: true });
81
+ if (infoProcesso.open)
82
+ _this.buscaInfoProcesso(infoProcesso.info[0]);
83
+ api_1.recebeThread({ cdThread: thread.thread, qt: qt, nrPg: nrPg }).then(function (res) {
84
+ var processos = res.processos.map(function (item) {
85
+ switch (item[3]) {
86
+ case 'P':
87
+ item[3] = 'Pronto';
88
+ break;
89
+ case 'R':
90
+ item[3] = 'Executando';
91
+ break;
92
+ default: item[3] = 'Finalizado';
93
+ }
94
+ switch (item[4]) {
95
+ case 'N':
96
+ item[4] = 'Normal';
97
+ break;
98
+ case 'C':
99
+ item[4] = 'Cancelado';
100
+ break;
101
+ case 'E':
102
+ item[4] = 'Erro';
103
+ break;
104
+ default: item[4] = '';
105
+ }
106
+ var inicio = date_1.sqlDateToReadableDate(item[6]);
107
+ var fim = date_1.sqlDateToReadableDate(item[7]);
108
+ item[6] = inicio.hour + " - " + inicio.date;
109
+ item[7] = fim.hour + " - " + fim.date;
110
+ return item;
111
+ });
112
+ _this.setState({ loading: false });
113
+ fieldsRedux_1.setField(_this.props.currentProgram + "-threads", 'value', processos);
114
+ });
115
+ }
116
+ };
117
+ _this.visualizaProcesso = function (processo) {
118
+ _this.setState({ loading: true });
119
+ _this.buscaInfoProcesso(processo[0]);
120
+ };
121
+ _this.buscaInfoProcesso = function (idProcesso) {
122
+ api_1.recebeInfoThread({ idProcesso: idProcesso }).then(function (res) {
123
+ var confs = JSON.parse(res.infoProcesso[6]);
124
+ var arr = [];
125
+ for (var _i = 0, _a = Object.keys(confs); _i < _a.length; _i++) {
126
+ var key = _a[_i];
127
+ arr.push([key, confs[key].toString()]);
128
+ }
129
+ if (res.currentStatus) {
130
+ _this.timeoutInfoProcesso = setTimeout(function () {
131
+ _this.buscaInfoProcesso(idProcesso);
132
+ }, 3000);
133
+ }
134
+ _this.setState({
135
+ infoProcesso: {
136
+ open: true,
137
+ info: res.infoProcesso,
138
+ confs: arr,
139
+ current: res.currentStatus
140
+ },
141
+ loading: false
142
+ });
143
+ });
144
+ };
145
+ _this.closeInfoProcesso = function () {
146
+ clearTimeout(_this.timeoutInfoProcesso);
147
+ _this.setState({
148
+ infoProcesso: {
149
+ open: false,
150
+ info: {},
151
+ confs: {},
152
+ current: {}
153
+ }
154
+ });
155
+ };
156
+ _this.closePanel = function () {
157
+ var selectPanelClicks = _this.state.selectPanelClicks;
158
+ if (selectPanelClicks > 0) {
159
+ _this.setState({ open: false });
160
+ window.removeEventListener('click', _this.closePanel);
161
+ }
162
+ _this.setState({ selectPanelClicks: selectPanelClicks + 1 });
163
+ };
164
+ return _this;
165
+ }
166
+ ThreadLog.prototype.componentWillUnmount = function () {
167
+ window.removeEventListener('click', this.closePanel);
168
+ clearTimeout(this.timeoutInfoProcesso);
169
+ };
170
+ ThreadLog.prototype.render = function () {
171
+ var _a = this.state, open = _a.open, loading = _a.loading, infoProcesso = _a.infoProcesso;
172
+ var _b = this.props, currentProgram = _b.currentProgram, thread = _b.thread;
173
+ return (react_1.default.createElement(react_1.default.Fragment, null,
174
+ react_1.default.createElement(core_1.IconButton, { title: thread.nome, onClick: this.openDetails },
175
+ react_1.default.createElement(ti_1.TiCog, { key: 'leave' })),
176
+ open && (react_1.default.createElement("div", { onClick: function (e) { return e.stopPropagation(); } },
177
+ react_1.default.createElement("h3", { className: 'reset-margin-top bg-blue-alt' },
178
+ infoProcesso.open && react_1.default.createElement("span", { className: 'pointer', onClick: this.closeInfoProcesso },
179
+ react_1.default.createElement(fa_1.FaAngleLeft, null)),
180
+ infoProcesso.open ? infoProcesso.info[2] : thread.nome),
181
+ loading && (react_1.default.createElement("div", { className: 'loading-default margin-top-md margin-bottom-md' },
182
+ react_1.default.createElement(react_spinkit_1.default, { name: 'ball-scale-multiple', fadeIn: 'half' }))),
183
+ !loading && (react_1.default.createElement("div", null,
184
+ infoProcesso.open && (react_1.default.createElement("div", null,
185
+ infoProcesso.current &&
186
+ react_1.default.createElement("div", { className: 'padding-sm' },
187
+ react_1.default.createElement("span", null, infoProcesso.current[7]),
188
+ react_1.default.createElement("span", { className: 'color999' },
189
+ " - ",
190
+ infoProcesso.current[6]),
191
+ react_1.default.createElement(ProgressBar_1.default, { value: parseInt(((infoProcesso.current[5] * 100) / infoProcesso.current[4]).toFixed(2), 10) }),
192
+ react_1.default.createElement("div", { className: 'over-hidden' },
193
+ react_1.default.createElement("h6", { className: 'pull-left' },
194
+ react_1.default.createElement("span", { className: 'color999' }, "Executando h\u00E1:"),
195
+ " ",
196
+ infoProcesso.current[1]),
197
+ react_1.default.createElement("h6", { className: 'pull-right' },
198
+ react_1.default.createElement("span", { className: 'color999' }, "Tempo estimado:"),
199
+ " ",
200
+ infoProcesso.current[3]))),
201
+ react_1.default.createElement(SimpleTable_1.default, { field: currentProgram + "-thread-info", className: 'reset-margin-bottom', defaultValue: infoProcesso.confs, destroyOnUnmount: true }),
202
+ infoProcesso.info[9].relatorios.length > 0 &&
203
+ react_1.default.createElement("div", null,
204
+ react_1.default.createElement("hr", { className: 'reset-margin' }),
205
+ 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: "" + (config_1.getConfig().ssl ? 'https' : 'http') + api_1.server() + "}r" + infoProcesso.info[0] + "s" + item[0] + ".agrel", target: '_blank', rel: 'noreferrer' },
207
+ item[1],
208
+ item[2] > 0 && react_1.default.createElement("span", { className: 'agtl-size' },
209
+ "- ",
210
+ item[2],
211
+ " kb"),
212
+ react_1.default.createElement("span", { className: 'agtl-print bg-blue-alt' },
213
+ react_1.default.createElement(fa_1.FaPrint, null)));
214
+ }))))),
215
+ !infoProcesso.open && (react_1.default.createElement(SimpleTable_1.default, { field: 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
+ };
217
+ return ThreadLog;
218
+ }(react_1.Component));
219
+ ThreadLog.propTypes = {
220
+ thread: prop_types_1.default.object,
221
+ currentProgram: prop_types_1.default.string,
222
+ qt: prop_types_1.default.number,
223
+ nrPg: prop_types_1.default.number
224
+ };
225
+ exports.default = ThreadLog;
@@ -0,0 +1,2 @@
1
+ export { default } from './ThreadLog';
2
+ export * from './ThreadLog';
@@ -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 ThreadLog_1 = require("./ThreadLog");
8
+ Object.defineProperty(exports, "default", { enumerable: true, get: function () { return __importDefault(ThreadLog_1).default; } });
@@ -0,0 +1,93 @@
1
+ import { TextFieldProps } from '@material-ui/core';
2
+ import { AutocompleteProps, AutocompleteChangeDetails } from '@material-ui/lab';
3
+ import * as React from 'react';
4
+
5
+ export interface UtilAutoCompleteProps extends Omit<AutocompleteProps<any, false, false, false>, 'getOptionLabel'>{
6
+ /**
7
+ * Tipo de autocomplete
8
+ */
9
+ type: 'beneficiarios' | 'empresas' | 'gruposUnimed' |'estados' | 'cidades' | 'unimeds' | 'prestadores',
10
+ /**
11
+ * Valor do campo
12
+ */
13
+ value?: Array<number|string> | object,
14
+ /**
15
+ * Props repassados ao componente Textfield
16
+ */
17
+ textFieldProps?: TextFieldProps,
18
+ /**
19
+ * Callback fired when the value changes.
20
+ *
21
+ * @param event — The event source of the callback.
22
+ *
23
+ * @param value — The new value of the component.
24
+ *
25
+ * @param reason — One of "create-option", "select-option", "remove-option", "blur", "clear" ou "only-one-left".
26
+ */
27
+ onChange?: ((event: React.ChangeEvent<{}>, value: any, reason: 'create-option' | 'select-option' | 'remove-option' | 'blur' | 'clear' | 'only-one-left', details?: AutocompleteChangeDetails<any> | undefined) => void) | undefined,
28
+ /**
29
+ * Trazer itens excluidos
30
+ */
31
+ excluidos?: boolean,
32
+ /**
33
+ * Filtra por id empresa
34
+ */
35
+ idEmpresa?: number,
36
+ /**
37
+ * Filtra por cd estado
38
+ */
39
+ cdEstado?: number,
40
+ /**
41
+ * Filtra cd unimed
42
+ */
43
+ cdUnimed?:number,
44
+ /**
45
+ * Formata o valor que aparece na listagem
46
+ *
47
+ * @param option - Opção sendo testada ou selecionada
48
+ *
49
+ * @param lista - Lista com todas as opções
50
+ */
51
+ getOptionLabel?: ((option: Array<any>, lista: Array<Array<any>>) => string),
52
+ /**
53
+ * Utiliza um pgCode diferente do padrão
54
+ */
55
+ pgCode?: string,
56
+ /**
57
+ * Objeto de busca personalizado
58
+ */
59
+ busca?: string,
60
+ /**
61
+ * Objeto de resposta personalizado
62
+ */
63
+ resposta?: string,
64
+ /**
65
+ * Action personalizada
66
+ */
67
+ action?: string,
68
+ /**
69
+ * Label do campo
70
+ */
71
+ label?: string,
72
+ /**
73
+ * Parametros utilizados no metodo de busca
74
+ */
75
+ searchParams?: object,
76
+ /**
77
+ * Função para filtrar a lista de opções
78
+ *
79
+ * @param valor - Valor setado no componente
80
+ * @param item - Item a ser testado contra o valor
81
+ *
82
+ * @returns {boolean} Retorna true se item de ser removido da lista
83
+ */
84
+ filterFunction?: (valor: any, item: any) => boolean,
85
+ /**
86
+ * Força o componente a atualizar quando o valor dele é alterado por fora
87
+ */
88
+ forceUpdate?: boolean
89
+ }
90
+
91
+ declare function UtilAutoComplete(props: UtilAutoCompleteProps): JSX.Element
92
+
93
+ export default UtilAutoComplete;
@@ -0,0 +1,188 @@
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
+ var __rest = (this && this.__rest) || function (s, e) {
69
+ var t = {};
70
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
71
+ t[p] = s[p];
72
+ if (s != null && typeof Object.getOwnPropertySymbols === "function")
73
+ for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
74
+ if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
75
+ t[p[i]] = s[p[i]];
76
+ }
77
+ return t;
78
+ };
79
+ Object.defineProperty(exports, "__esModule", { value: true });
80
+ var utils_1 = require("../../utils");
81
+ var api_1 = require("../../utils/api");
82
+ var core_1 = require("@material-ui/core");
83
+ var lab_1 = require("@material-ui/lab");
84
+ var lodash_1 = require("lodash");
85
+ var react_1 = __importStar(require("react"));
86
+ // import PropTypes from 'prop-types';
87
+ var retornaType = function (type) {
88
+ switch (type) {
89
+ case 'beneficiarios':
90
+ return ({
91
+ label: 'Beneficiário',
92
+ action: 'getBeneficiarios',
93
+ busca: 'dsBusca',
94
+ res: 'Beneficiarios',
95
+ getLabel: function (option, lista) { return lodash_1.isArray(option) ? option.length ? utils_1.formataNome(option[1]) : '' : option ? lista.filter(function (i) { return i[0] === option[0]; })[0][1] : ''; }
96
+ });
97
+ case 'empresas':
98
+ return ({
99
+ label: 'Empresa',
100
+ action: 'getEmpresas',
101
+ busca: 'dsBusca',
102
+ res: 'Empresas',
103
+ getLabel: function (option, lista) { return lodash_1.isArray(option) ? option.length ? option[2] + " - " + option[3] : '' : option ? lista.filter(function (i) { return i[0] === option; })[0][1] : ''; }
104
+ });
105
+ case 'gruposUnimed':
106
+ return ({
107
+ label: 'Grupos Unimed',
108
+ action: 'getGruposUnimed',
109
+ busca: 'dsBusca',
110
+ res: 'Unimeds',
111
+ getLabel: function (option, lista) { return lodash_1.isArray(option) ? option.length ? option[1] : '' : option ? lista.filter(function (i) { return i[0] === option; })[0][1] : ''; }
112
+ });
113
+ case 'estados':
114
+ return ({
115
+ label: 'Estado',
116
+ action: 'getEstados',
117
+ busca: 'dsBusca',
118
+ res: 'Estados',
119
+ getLabel: function (option, lista) { return lodash_1.isArray(option) ? option.length ? option[0] + " - " + option[1] : '' : option ? lista.filter(function (i) { return i[0] === option; })[0][1] : ''; }
120
+ });
121
+ case 'cidades':
122
+ return ({
123
+ label: 'Cidade',
124
+ action: 'getCidades',
125
+ busca: 'dsCidade',
126
+ res: 'cidades',
127
+ getLabel: function (option, lista) { var _a, _b; return lodash_1.isArray(option) ? option.length ? utils_1.formataNome((_a = option[1]) === null || _a === void 0 ? void 0 : _a.trim()) + " - " + ((_b = option[2]) === null || _b === void 0 ? void 0 : _b.trim()) : '' : option ? lista.filter(function (i) { return i[0] === option; })[0][1] : ''; }
128
+ });
129
+ case 'unimeds':
130
+ return ({
131
+ label: 'Unimed',
132
+ action: 'getUnimeds',
133
+ busca: 'dsBusca',
134
+ res: 'Unimeds',
135
+ getLabel: function (option, lista) { return lodash_1.isArray(option) ? option.length ? option[0] + " - " + option[1] : '' : option ? lista.filter(function (i) { return i[0] === option; })[0][1] : ''; }
136
+ });
137
+ case 'prestadores':
138
+ return ({
139
+ label: 'Prestadores',
140
+ action: 'getPrestadores',
141
+ busca: 'dsBusca',
142
+ res: 'Prestadores',
143
+ getLabel: function (option, lista) { return lodash_1.isArray(option) ? option.length ? option[1] + " - " + utils_1.formataNome(option[2]) : '' : option ? lista.filter(function (i) { return i[0] === option; })[0][1] : ''; }
144
+ });
145
+ default:
146
+ return ({});
147
+ }
148
+ };
149
+ var UtilAutoComplete = function (_a) {
150
+ var _b = _a.type, type = _b === void 0 ? '' : _b, label = _a.label, value = _a.value, _c = _a.textFieldProps, textFieldProps = _c === void 0 ? {} : _c, _d = _a.onChange, onChange = _d === void 0 ? function (e) { return e; } : _d, excluidos = _a.excluidos, idEmpresa = _a.idEmpresa, cdEstado = _a.cdEstado, cdUnimed = _a.cdUnimed, getOptionLabel = _a.getOptionLabel, _e = _a.pgCode, pgCode = _e === void 0 ? 'BuscasHelper' : _e, action = _a.action, busca = _a.busca, resposta = _a.resposta, searchParams = _a.searchParams, filterFunction = _a.filterFunction, forceUpdate = _a.forceUpdate, props = __rest(_a, ["type", "label", "value", "textFieldProps", "onChange", "excluidos", "idEmpresa", "cdEstado", "cdUnimed", "getOptionLabel", "pgCode", "action", "busca", "resposta", "searchParams", "filterFunction", "forceUpdate"]);
151
+ var _f = react_1.useState([]), lista = _f[0], setLista = _f[1];
152
+ var _g = react_1.useState(''), inputValue = _g[0], setInputValue = _g[1];
153
+ var buscar = react_1.useCallback(function (valor) { return __awaiter(void 0, void 0, void 0, function () {
154
+ var res;
155
+ var _a;
156
+ var _b, _c;
157
+ return __generator(this, function (_d) {
158
+ switch (_d.label) {
159
+ case 0: return [4 /*yield*/, api_1.serverAction(action || retornaType(type).action, __assign((_a = {}, _a[busca || ((_b = retornaType(type)) === null || _b === void 0 ? void 0 : _b.busca) || 'value'] = valor || inputValue, _a.excluidos = excluidos, _a.idEmpresa = idEmpresa, _a.cdEstado = cdEstado, _a.cdUnimed = cdUnimed, _a), searchParams), true, pgCode)];
160
+ case 1:
161
+ res = _d.sent();
162
+ setLista(res[resposta || ((_c = retornaType(type)) === null || _c === void 0 ? void 0 : _c.res) || 'result'] || []);
163
+ return [2 /*return*/];
164
+ }
165
+ });
166
+ }); }, [inputValue, type, searchParams]);
167
+ react_1.useEffect(function () {
168
+ if (lodash_1.isString(value))
169
+ buscar(value);
170
+ }, []);
171
+ react_1.useEffect(function () {
172
+ // if (inputValue.length < 2) return;
173
+ buscar();
174
+ }, [inputValue, buscar]);
175
+ return (react_1.default.createElement(lab_1.Autocomplete, __assign({ options: lodash_1.isObject(value) ? lista.filter(function (v) { return filterFunction ? filterFunction(v, value) : true || v[0] !== value[0]; }) : lista, getOptionSelected: function (o, v) { return o[0] === v; }, getOptionLabel: getOptionLabel ? (function (option) { return getOptionLabel(option, lista); }) : (function (option) { return retornaType(type).getLabel(option, lista); }), noOptionsText: inputValue.length < 2 ? 'Digite para pesquisar' : 'Não Encontrado', clearText: 'Limpar', openText: 'Abrir', onInputChange: function (e) { var _a; return setInputValue(((_a = e === null || e === void 0 ? void 0 : e.target) === null || _a === void 0 ? void 0 : _a.value) || ''); }, filterSelectedOptions: true, autoComplete: true, autoHighlight: true }, { value: value, onChange: onChange }, props, { renderInput: function (params) { return (react_1.default.createElement(core_1.TextField, __assign({ margin: 'dense', variant: 'outlined', label: label || retornaType(type).label }, params, textFieldProps, { InputProps: __assign(__assign({}, textFieldProps.InputProps), params.InputProps) }))); } })));
176
+ };
177
+ // UtilAutoComplete.propTypes = {
178
+ // type: PropTypes.oneOf(['beneficiarios', 'empresas', 'gruposUnimed', 'estados', 'cidades', 'unimeds', 'prestadores']).isRequired,
179
+ // value: PropTypes.array,
180
+ // textFieldProps: PropTypes.object,
181
+ // onChange: PropTypes.func,
182
+ // excluidos: PropTypes.bool,
183
+ // idEmpresa: PropTypes.string,
184
+ // cdEstado: PropTypes.string,
185
+ // cdUnimed: PropTypes.string,
186
+ // getOptionLabel: PropTypes.func
187
+ // }
188
+ exports.default = UtilAutoComplete;
@@ -0,0 +1,2 @@
1
+ export { default } from './UtilAutoComplete';
2
+ export * from './UtilAutoComplete';
@@ -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 UtilAutoComplete_1 = require("./UtilAutoComplete");
8
+ Object.defineProperty(exports, "default", { enumerable: true, get: function () { return __importDefault(UtilAutoComplete_1).default; } });