argous 1.2.247 → 1.3.2

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 (439) hide show
  1. package/dist/api/WebSocket.d.ts +18 -10
  2. package/dist/api/WebSocket.js +26 -18
  3. package/dist/api/index.js +54 -43
  4. package/dist/api/ws.d.ts +1 -1
  5. package/dist/api/ws.js +44 -3
  6. package/dist/components/Alert/Alert.d.ts +19 -5
  7. package/dist/components/Alert/Alert.js +17 -7
  8. package/dist/components/Alert/index.d.ts +1 -2
  9. package/dist/components/ArgousAction/ArgousAction.d.ts +26 -5
  10. package/dist/components/ArgousAction/ArgousAction.js +17 -7
  11. package/dist/components/ArgousAction/index.d.ts +1 -2
  12. package/dist/components/ArgousAvatar/ArgousAvatar.d.ts +3 -14
  13. package/dist/components/ArgousAvatar/ArgousAvatar.js +44 -60
  14. package/dist/components/ArgousAvatar/index.d.ts +1 -2
  15. package/dist/components/ArgousComplexPagination/ArgousComplexPagination.d.ts +3 -76
  16. package/dist/components/ArgousComplexPagination/ArgousComplexPagination.js +107 -81
  17. package/dist/components/ArgousComplexPagination/index.d.ts +1 -2
  18. package/dist/components/ArgousComplexTable/ArgousComplexTable.d.ts +3 -158
  19. package/dist/components/ArgousComplexTable/ArgousComplexTable.js +39 -52
  20. package/dist/components/ArgousComplexTable/index.d.ts +1 -2
  21. package/dist/components/ArgousComplexTableBody/ArgousComplexTableBody.d.ts +7 -177
  22. package/dist/components/ArgousComplexTableBody/ArgousComplexTableBody.js +119 -97
  23. package/dist/components/ArgousComplexTableBody/DragAndDrop.d.ts +37 -0
  24. package/dist/components/ArgousComplexTableBody/DragAndDrop.js +156 -0
  25. package/dist/components/ArgousComplexTableBody/index.d.ts +1 -2
  26. package/dist/components/ArgousComplexTableHead/ArgousComplexTableHead.d.ts +3 -73
  27. package/dist/components/ArgousComplexTableHead/ArgousComplexTableHead.js +64 -47
  28. package/dist/components/ArgousComplexTableHead/index.d.ts +1 -2
  29. package/dist/components/ArgousComplexTableToolbar/ArgousComplexTableToolBar.d.ts +3 -58
  30. package/dist/components/ArgousComplexTableToolbar/ArgousComplexTableToolBar.js +55 -37
  31. package/dist/components/ArgousComplexTableToolbar/index.d.ts +1 -2
  32. package/dist/components/ArgousInput/ArgousInput.d.ts +2 -8
  33. package/dist/components/ArgousInput/ArgousInput.js +19 -9
  34. package/dist/components/ArgousInput/index.d.ts +1 -2
  35. package/dist/components/ArgousPagination/ArgousPagination.d.ts +3 -5
  36. package/dist/components/ArgousPagination/ArgousPagination.js +18 -11
  37. package/dist/components/ArgousPagination/index.d.ts +1 -2
  38. package/dist/components/ArgousProgressBar/ArgousProgressBar.d.ts +31 -21
  39. package/dist/components/ArgousProgressBar/ArgousProgressBar.js +64 -74
  40. package/dist/components/ArgousProgressBar/index.d.ts +1 -2
  41. package/dist/components/ArgousSimpleTable/ArgousSimpleTable.d.ts +3 -5
  42. package/dist/components/ArgousSimpleTable/ArgousSimpleTable.js +28 -22
  43. package/dist/components/ArgousSimpleTable/index.d.ts +1 -2
  44. package/dist/components/AutoComplete/AutoComplete.d.ts +2 -8
  45. package/dist/components/AutoComplete/AutoComplete.js +18 -9
  46. package/dist/components/AutoComplete/index.d.ts +1 -2
  47. package/dist/components/AutoCompleteFavorites/AutoCompleteFavorites.d.ts +28 -101
  48. package/dist/components/AutoCompleteFavorites/AutoCompleteFavorites.js +226 -174
  49. package/dist/components/AutoCompleteFavorites/index.d.ts +1 -2
  50. package/dist/components/BarChart/BarChart.d.ts +29 -5
  51. package/dist/components/BarChart/BarChart.js +17 -7
  52. package/dist/components/BarChart/index.d.ts +1 -2
  53. package/dist/components/BarraFerramentas/BarraFerramentas.d.ts +54 -53
  54. package/dist/components/BarraFerramentas/BarraFerramentas.js +119 -105
  55. package/dist/components/BarraFerramentas/index.d.ts +1 -2
  56. package/dist/components/Button/Button.d.ts +54 -5
  57. package/dist/components/Button/Button.js +17 -7
  58. package/dist/components/Button/index.d.ts +1 -2
  59. package/dist/components/Cabecalho/Cabecalho.d.ts +2 -8
  60. package/dist/components/Cabecalho/Cabecalho.js +17 -7
  61. package/dist/components/Cabecalho/index.d.ts +1 -2
  62. package/dist/components/Calendar/Calendar.d.ts +2 -8
  63. package/dist/components/Calendar/Calendar.js +24 -41
  64. package/dist/components/Calendar/index.d.ts +1 -2
  65. package/dist/components/Cam/Cam.d.ts +24 -24
  66. package/dist/components/Cam/Cam.js +19 -9
  67. package/dist/components/Cam/index.d.ts +1 -2
  68. package/dist/components/Carousel/Carousel.d.ts +21 -71
  69. package/dist/components/Carousel/Carousel.js +113 -103
  70. package/dist/components/Carousel/index.d.ts +1 -2
  71. package/dist/components/CartaoUsuario/CartaoUsuario.d.ts +6 -9
  72. package/dist/components/CartaoUsuario/CartaoUsuario.js +36 -26
  73. package/dist/components/CartaoUsuario/index.d.ts +1 -2
  74. package/dist/components/Collapse/Collapse.d.ts +55 -56
  75. package/dist/components/Collapse/Collapse.js +121 -71
  76. package/dist/components/Collapse/index.d.ts +1 -3
  77. package/dist/components/Compartilhar/Compartilhar.d.ts +3 -7
  78. package/dist/components/Compartilhar/Compartilhar.js +70 -65
  79. package/dist/components/Compartilhar/index.d.ts +1 -2
  80. package/dist/components/ConfirmModal/BasicModal.d.ts +1 -1
  81. package/dist/components/ConfirmModal/BasicModal.js +8 -8
  82. package/dist/components/ConfirmModal/ModalProvider.d.ts +12 -1
  83. package/dist/components/ConfirmModal/ModalProvider.js +17 -7
  84. package/dist/components/ConfirmModal/WrapperModal.d.ts +2 -2
  85. package/dist/components/ConfirmModal/WrapperModal.js +5 -5
  86. package/dist/components/ConfirmModal/index.d.ts +6 -20
  87. package/dist/components/ContactValidationInput/ContactValidationInput.d.ts +17 -62
  88. package/dist/components/ContactValidationInput/ContactValidationInput.js +105 -80
  89. package/dist/components/ContactValidationInput/SealModal.d.ts +1 -1
  90. package/dist/components/ContactValidationInput/SealModal.js +13 -20
  91. package/dist/components/ContactValidationInput/index.d.ts +1 -2
  92. package/dist/components/Document/Icons.d.ts +2 -2
  93. package/dist/components/Document/Icons.js +33 -16
  94. package/dist/components/Document/ModalVisualizacaoDocumentos.d.ts +1 -1
  95. package/dist/components/Document/ModalVisualizacaoDocumentos.js +33 -17
  96. package/dist/components/Document/Visualizacao.d.ts +1 -1
  97. package/dist/components/Document/Visualizacao.js +48 -34
  98. package/dist/components/Document/index.d.ts +3 -3
  99. package/dist/components/DropArea/DropArea.d.ts +8 -21
  100. package/dist/components/DropArea/DropArea.js +27 -12
  101. package/dist/components/DropArea/Html5FileSelector.js +6 -7
  102. package/dist/components/DropArea/index.d.ts +1 -2
  103. package/dist/components/Editor/ScriptLoader2.d.ts +1 -1
  104. package/dist/components/Editor/ScriptLoader2.js +2 -2
  105. package/dist/components/Editor/Utils.d.ts +3 -3
  106. package/dist/components/Editor/Utils.js +2 -2
  107. package/dist/components/Editor/components/Editor.d.ts +1 -1
  108. package/dist/components/Editor/components/Editor.js +18 -9
  109. package/dist/components/Editor/components/EditorPropTypes.js +17 -7
  110. package/dist/components/FilePreparer/FilePreparer.d.ts +16 -26
  111. package/dist/components/FilePreparer/FilePreparer.js +105 -88
  112. package/dist/components/FilePreparer/index.d.ts +1 -2
  113. package/dist/components/FileUploader/FileUploader.d.ts +21 -8
  114. package/dist/components/FileUploader/FileUploader.js +33 -22
  115. package/dist/components/FileUploader/index.d.ts +1 -2
  116. package/dist/components/FormVisualizer/FormVisualizer.d.ts +8 -92
  117. package/dist/components/FormVisualizer/FormVisualizer.js +92 -61
  118. package/dist/components/FormVisualizer/index.d.ts +1 -2
  119. package/dist/components/HalfGauge/HalfGauge.d.ts +23 -82
  120. package/dist/components/HalfGauge/HalfGauge.js +87 -135
  121. package/dist/components/HalfGauge/index.d.ts +1 -2
  122. package/dist/components/Highlight/Highlight.d.ts +20 -7
  123. package/dist/components/Highlight/Highlight.js +23 -12
  124. package/dist/components/Highlight/index.d.ts +1 -2
  125. package/dist/components/ImageResize/ImageResize.d.ts +8 -28
  126. package/dist/components/ImageResize/ImageResize.js +79 -85
  127. package/dist/components/ImageResize/index.d.ts +1 -2
  128. package/dist/components/ImageResizeButton/ImageResizeButton.d.ts +2 -25
  129. package/dist/components/ImageResizeButton/ImageResizeButton.js +19 -9
  130. package/dist/components/ImageResizeButton/index.d.ts +1 -2
  131. package/dist/components/Input/Input.d.ts +2 -8
  132. package/dist/components/Input/Input.js +19 -9
  133. package/dist/components/Input/index.d.ts +1 -2
  134. package/dist/components/InputTags/InputTags.d.ts +2 -8
  135. package/dist/components/InputTags/InputTags.js +22 -13
  136. package/dist/components/InputTags/index.d.ts +1 -2
  137. package/dist/components/ListSelect/ListSelect.d.ts +2 -8
  138. package/dist/components/ListSelect/ListSelect.js +17 -7
  139. package/dist/components/ListSelect/index.d.ts +1 -2
  140. package/dist/components/MaterialButton/MaterialButton.d.ts +30 -12
  141. package/dist/components/MaterialButton/MaterialButton.js +56 -125
  142. package/dist/components/MaterialButton/index.d.ts +1 -2
  143. package/dist/components/MenuBar/MenuBar.d.ts +2 -8
  144. package/dist/components/MenuBar/MenuBar.js +17 -7
  145. package/dist/components/MenuBar/index.d.ts +1 -2
  146. package/dist/components/MonthPicker/MonthPicker.d.ts +2 -8
  147. package/dist/components/MonthPicker/MonthPicker.js +20 -10
  148. package/dist/components/MonthPicker/index.d.ts +1 -2
  149. package/dist/components/MultipleSelect/MultipleSelect.d.ts +2 -8
  150. package/dist/components/MultipleSelect/MultipleSelect.js +17 -7
  151. package/dist/components/MultipleSelect/index.d.ts +1 -2
  152. package/dist/components/OtpInput/OtpInput.d.ts +1 -1
  153. package/dist/components/OtpInput/OtpInput.js +71 -58
  154. package/dist/components/OtpInput/index.d.ts +1 -2
  155. package/dist/components/OutputText/OutputText.d.ts +2 -8
  156. package/dist/components/OutputText/OutputText.js +17 -7
  157. package/dist/components/OutputText/index.d.ts +1 -2
  158. package/dist/components/Pagination/Pagination.d.ts +16 -5
  159. package/dist/components/Pagination/Pagination.js +17 -7
  160. package/dist/components/Pagination/index.d.ts +1 -2
  161. package/dist/components/PercentageDisplay/PercentageDisplay.d.ts +14 -51
  162. package/dist/components/PercentageDisplay/PercentageDisplay.js +24 -92
  163. package/dist/components/PercentageDisplay/index.d.ts +1 -2
  164. package/dist/components/Programa/PageCodeEasterEgg.d.ts +5 -4
  165. package/dist/components/Programa/PageCodeEasterEgg.js +41 -32
  166. package/dist/components/Programa/Programa.d.ts +72 -47
  167. package/dist/components/Programa/Programa.js +50 -28
  168. package/dist/components/Programa/Tab.d.ts +2 -2
  169. package/dist/components/Programa/TabNavigationRail.d.ts +3 -3
  170. package/dist/components/Programa/TabNavigationRail.js +13 -55
  171. package/dist/components/Programa/index.d.ts +1 -2
  172. package/dist/components/ProgressBar/ProgressBar.d.ts +20 -5
  173. package/dist/components/ProgressBar/ProgressBar.js +17 -7
  174. package/dist/components/ProgressBar/index.d.ts +1 -2
  175. package/dist/components/Select/Select.d.ts +2 -8
  176. package/dist/components/Select/Select.js +17 -7
  177. package/dist/components/Select/index.d.ts +1 -2
  178. package/dist/components/SimpleTable/SimpleTable.d.ts +27 -10
  179. package/dist/components/SimpleTable/SimpleTable.js +17 -7
  180. package/dist/components/SimpleTable/index.d.ts +1 -2
  181. package/dist/components/Stepper/Stepper.d.ts +25 -68
  182. package/dist/components/Stepper/Stepper.js +194 -179
  183. package/dist/components/Stepper/index.d.ts +1 -2
  184. package/dist/components/TablePicker/TablePicker.d.ts +3 -8
  185. package/dist/components/TablePicker/TablePicker.js +37 -12
  186. package/dist/components/TablePicker/index.d.ts +1 -2
  187. package/dist/components/Tabs/Tabs.d.ts +25 -5
  188. package/dist/components/Tabs/Tabs.js +17 -7
  189. package/dist/components/Tabs/index.d.ts +1 -2
  190. package/dist/components/TextArea/TextArea.d.ts +2 -8
  191. package/dist/components/TextArea/TextArea.js +17 -7
  192. package/dist/components/TextArea/index.d.ts +1 -2
  193. package/dist/components/TextToHtml/Cursor.d.ts +1 -1
  194. package/dist/components/TextToHtml/Cursor.js +17 -7
  195. package/dist/components/TextToHtml/TextStyles.d.ts +1 -1
  196. package/dist/components/TextToHtml/TextStyles.js +51 -44
  197. package/dist/components/TextToHtml/TextToHtml.d.ts +32 -36
  198. package/dist/components/TextToHtml/TextToHtml.js +37 -17
  199. package/dist/components/TextToHtml/index.d.ts +1 -2
  200. package/dist/components/ThreadLog/ThreadLog.d.ts +36 -5
  201. package/dist/components/ThreadLog/ThreadLog.js +19 -9
  202. package/dist/components/ThreadLog/index.d.ts +1 -2
  203. package/dist/components/UserCard/UserCard.d.ts +6 -15
  204. package/dist/components/UserCard/UserCard.js +36 -26
  205. package/dist/components/UserCard/index.d.ts +1 -2
  206. package/dist/components/UtilAutoComplete/UtilAutoComplete.d.ts +32 -97
  207. package/dist/components/UtilAutoComplete/UtilAutoComplete.js +26 -16
  208. package/dist/components/UtilAutoComplete/index.d.ts +1 -2
  209. package/dist/components/UtilTextField/UtilTextField.d.ts +7 -23
  210. package/dist/components/UtilTextField/UtilTextField.js +26 -14
  211. package/dist/components/UtilTextField/index.d.ts +1 -2
  212. package/dist/components/Zoom/Zoom.d.ts +7 -15
  213. package/dist/components/Zoom/Zoom.js +23 -24
  214. package/dist/components/Zoom/index.d.ts +1 -2
  215. package/dist/components/index.d.ts +118 -180
  216. package/dist/fieldsRedux/createField.d.ts +6 -6
  217. package/dist/fieldsRedux/createField.js +17 -7
  218. package/dist/fieldsRedux/fieldsRedux.d.ts +3 -58
  219. package/dist/fieldsRedux/fieldsRedux.js +19 -9
  220. package/dist/fieldsRedux/index.d.ts +17 -2
  221. package/dist/fieldsRedux/passFields.d.ts +2 -0
  222. package/dist/fieldsRedux/passFields.js +17 -7
  223. package/dist/reducers/index.d.ts +98 -2
  224. package/dist/utils/api.js +32 -15
  225. package/dist/utils/config.js +2 -3
  226. package/dist/utils/index.d.ts +3 -3
  227. package/dist/utils/index.js +68 -54
  228. package/dist/utils/store.js +2 -3
  229. package/lib/api/WebSocket.js +11 -12
  230. package/lib/api/index.js +14 -14
  231. package/lib/api/ws.js +48 -4
  232. package/lib/components/ArgousAvatar/ArgousAvatar.d.ts +1 -1
  233. package/lib/components/ArgousAvatar/ArgousAvatar.js +20 -54
  234. package/lib/components/ArgousComplexPagination/ArgousComplexPagination.d.ts +1 -1
  235. package/lib/components/ArgousComplexPagination/ArgousComplexPagination.js +50 -25
  236. package/lib/components/ArgousComplexTable/ArgousComplexTable.d.ts +1 -1
  237. package/lib/components/ArgousComplexTable/ArgousComplexTable.js +15 -15
  238. package/lib/components/ArgousComplexTableBody/ArgousComplexTableBody.d.ts +1 -1
  239. package/lib/components/ArgousComplexTableBody/ArgousComplexTableBody.js +121 -106
  240. package/lib/components/ArgousComplexTableBody/DragAndDrop.js +85 -0
  241. package/lib/components/ArgousComplexTableHead/ArgousComplexTableHead.js +60 -51
  242. package/lib/components/ArgousComplexTableToolbar/ArgousComplexTableToolBar.js +21 -12
  243. package/lib/components/ArgousInput/ArgousInput.js +2 -2
  244. package/lib/components/ArgousPagination/ArgousPagination.js +12 -4
  245. package/lib/components/ArgousProgressBar/ArgousProgressBar.js +67 -78
  246. package/lib/components/ArgousSimpleTable/ArgousSimpleTable.js +12 -18
  247. package/lib/components/AutoComplete/AutoComplete.js +2 -3
  248. package/lib/components/AutoCompleteFavorites/AutoCompleteFavorites.d.ts +3 -4
  249. package/lib/components/AutoCompleteFavorites/AutoCompleteFavorites.js +174 -108
  250. package/lib/components/BarraFerramentas/BarraFerramentas.js +32 -21
  251. package/lib/components/Calendar/Calendar.js +7 -42
  252. package/lib/components/Carousel/Carousel.js +42 -27
  253. package/lib/components/CartaoUsuario/CartaoUsuario.js +6 -6
  254. package/lib/components/Collapse/Collapse.d.ts +3 -3
  255. package/lib/components/Collapse/Collapse.js +92 -57
  256. package/lib/components/Compartilhar/Compartilhar.js +47 -46
  257. package/lib/components/ConfirmModal/BasicModal.tsx +1 -1
  258. package/lib/components/ConfirmModal/WrapperModal.tsx +2 -2
  259. package/lib/components/ContactValidationInput/ContactValidationInput.d.ts +1 -1
  260. package/lib/components/ContactValidationInput/ContactValidationInput.js +248 -213
  261. package/lib/components/ContactValidationInput/SealModal.js +38 -32
  262. package/lib/components/Document/Icons.js +14 -6
  263. package/lib/components/Document/ModalVisualizacaoDocumentos.js +9 -2
  264. package/lib/components/Document/Visualizacao.js +31 -25
  265. package/lib/components/DropArea/DropArea.js +9 -3
  266. package/lib/components/Editor/ScriptLoader2.ts +3 -3
  267. package/lib/components/Editor/Utils.ts +3 -3
  268. package/lib/components/Editor/components/Editor.tsx +1 -1
  269. package/lib/components/Editor/tinymce/README.md +73 -0
  270. package/lib/components/Editor/tinymce/langs/README.md +3 -0
  271. package/lib/components/Editor/tinymce/models/dom/model.min.js +1 -1
  272. package/lib/components/Editor/tinymce/plugins/accordion/plugin.min.js +1 -1
  273. package/lib/components/Editor/tinymce/plugins/autolink/plugin.min.js +1 -1
  274. package/lib/components/Editor/tinymce/plugins/autosave/plugin.min.js +1 -1
  275. package/lib/components/Editor/tinymce/plugins/charmap/plugin.min.js +1 -1
  276. package/lib/components/Editor/tinymce/plugins/codesample/plugin.min.js +1 -1
  277. package/lib/components/Editor/tinymce/plugins/directionality/plugin.min.js +1 -1
  278. package/lib/components/Editor/tinymce/plugins/fullscreen/plugin.min.js +1 -1
  279. package/lib/components/Editor/tinymce/plugins/help/plugin.min.js +1 -1
  280. package/lib/components/Editor/tinymce/plugins/image/plugin.min.js +1 -1
  281. package/lib/components/Editor/tinymce/plugins/link/plugin.min.js +1 -1
  282. package/lib/components/Editor/tinymce/plugins/lists/plugin.min.js +1 -1
  283. package/lib/components/Editor/tinymce/plugins/media/plugin.min.js +1 -1
  284. package/lib/components/Editor/tinymce/plugins/searchreplace/plugin.min.js +1 -1
  285. package/lib/components/Editor/tinymce/plugins/table/plugin.js +3 -3
  286. package/lib/components/Editor/tinymce/plugins/table/plugin.min.js +1 -1
  287. package/lib/components/Editor/tinymce/plugins/visualchars/plugin.min.js +1 -1
  288. package/lib/components/Editor/tinymce/themes/silver/theme.js +38 -38
  289. package/lib/components/Editor/tinymce/themes/silver/theme.min.js +1 -1
  290. package/lib/components/Editor/tinymce/tinymce.js +12 -12
  291. package/lib/components/Editor/tinymce/tinymce.min.js +1 -1
  292. package/lib/components/FilePreparer/FilePreparer.d.ts +1 -1
  293. package/lib/components/FilePreparer/FilePreparer.js +112 -108
  294. package/lib/components/FileUploader/FileUploader.js +8 -7
  295. package/lib/components/FormVisualizer/FormVisualizer.d.ts +5 -7
  296. package/lib/components/FormVisualizer/FormVisualizer.js +59 -46
  297. package/lib/components/HalfGauge/HalfGauge.js +87 -85
  298. package/lib/components/Highlight/Highlight.js +4 -4
  299. package/lib/components/ImageResize/ImageResize.d.ts +1 -1
  300. package/lib/components/ImageResize/ImageResize.js +123 -118
  301. package/lib/components/ImageResizeButton/ImageResizeButton.d.ts +1 -1
  302. package/lib/components/ImageResizeButton/ImageResizeButton.js +1 -1
  303. package/lib/components/Input/Input.js +2 -2
  304. package/lib/components/InputTags/InputTags.js +6 -7
  305. package/lib/components/MaterialButton/MaterialButton.d.ts +2 -4
  306. package/lib/components/MaterialButton/MaterialButton.js +50 -125
  307. package/lib/components/MonthPicker/MonthPicker.js +2 -2
  308. package/lib/components/OtpInput/OtpInput.tsx +77 -69
  309. package/lib/components/PercentageDisplay/PercentageDisplay.d.ts +1 -1
  310. package/lib/components/PercentageDisplay/PercentageDisplay.js +29 -54
  311. package/lib/components/Programa/PageCodeEasterEgg.js +41 -40
  312. package/lib/components/Programa/Programa.d.ts +2 -2
  313. package/lib/components/Programa/Programa.js +21 -5
  314. package/lib/components/Programa/Tab.ts +4 -2
  315. package/lib/components/Programa/TabNavigationRail.js +9 -31
  316. package/lib/components/Stepper/Stepper.d.ts +1 -1
  317. package/lib/components/Stepper/Stepper.js +222 -190
  318. package/lib/components/TablePicker/TablePicker.js +11 -6
  319. package/lib/components/TextToHtml/TextStyles.js +42 -42
  320. package/lib/components/TextToHtml/TextToHtml.js +102 -92
  321. package/lib/components/ThreadLog/ThreadLog.js +1 -1
  322. package/lib/components/UserCard/UserCard.js +6 -6
  323. package/lib/components/UtilAutoComplete/UtilAutoComplete.d.ts +3 -4
  324. package/lib/components/UtilAutoComplete/UtilAutoComplete.js +67 -9
  325. package/lib/components/UtilTextField/UtilTextField.d.ts +1 -1
  326. package/lib/components/UtilTextField/UtilTextField.js +18 -16
  327. package/lib/components/Zoom/Zoom.js +6 -3
  328. package/lib/utils/api.ts +1 -1
  329. package/lib/utils/index.ts +10 -8
  330. package/package.json +56 -56
  331. package/.gitlab-ci.yml +0 -21
  332. package/dist/components/Cam/cam.css +0 -8
  333. package/dist/components/ContactValidationInput/style.css +0 -10
  334. package/dist/components/Document/icons/ai.svg +0 -20
  335. package/dist/components/Document/icons/audio.svg +0 -16
  336. package/dist/components/Document/icons/avi.svg +0 -15
  337. package/dist/components/Document/icons/css.svg +0 -47
  338. package/dist/components/Document/icons/csv.svg +0 -37
  339. package/dist/components/Document/icons/dbf.svg +0 -30
  340. package/dist/components/Document/icons/doc.svg +0 -47
  341. package/dist/components/Document/icons/dwg.svg +0 -32
  342. package/dist/components/Document/icons/exe.svg +0 -20
  343. package/dist/components/Document/icons/file.svg +0 -11
  344. package/dist/components/Document/icons/fla.svg +0 -23
  345. package/dist/components/Document/icons/html.svg +0 -23
  346. package/dist/components/Document/icons/image.svg +0 -16
  347. package/dist/components/Document/icons/iso.svg +0 -40
  348. package/dist/components/Document/icons/jpg.svg +0 -33
  349. package/dist/components/Document/icons/js.svg +0 -40
  350. package/dist/components/Document/icons/json.svg +0 -45
  351. package/dist/components/Document/icons/mod.svg +0 -41
  352. package/dist/components/Document/icons/mp3.svg +0 -36
  353. package/dist/components/Document/icons/mp4.svg +0 -25
  354. package/dist/components/Document/icons/pdf.svg +0 -35
  355. package/dist/components/Document/icons/png.svg +0 -30
  356. package/dist/components/Document/icons/ppt.svg +0 -31
  357. package/dist/components/Document/icons/psd.svg +0 -50
  358. package/dist/components/Document/icons/rtf.svg +0 -35
  359. package/dist/components/Document/icons/search.svg +0 -20
  360. package/dist/components/Document/icons/svg.svg +0 -34
  361. package/dist/components/Document/icons/txt.svg +0 -29
  362. package/dist/components/Document/icons/video.svg +0 -17
  363. package/dist/components/Document/icons/xls.svg +0 -31
  364. package/dist/components/Document/icons/xml.svg +0 -25
  365. package/dist/components/Document/icons/zip.svg +0 -24
  366. package/dist/components/Document/icons/zip1.svg +0 -18
  367. package/dist/components/Editor/skins/content/dark/content.min.css +0 -1
  368. package/dist/components/Editor/skins/content/default/content.min.css +0 -1
  369. package/dist/components/Editor/skins/content/document/content.min.css +0 -1
  370. package/dist/components/Editor/skins/content/tinymce-5/content.min.css +0 -1
  371. package/dist/components/Editor/skins/content/tinymce-5-dark/content.min.css +0 -1
  372. package/dist/components/Editor/skins/content/writer/content.min.css +0 -1
  373. package/dist/components/Editor/skins/ui/oxide/content.inline.min.css +0 -1
  374. package/dist/components/Editor/skins/ui/oxide/content.min.css +0 -1
  375. package/dist/components/Editor/skins/ui/oxide/skin.min.css +0 -1
  376. package/dist/components/Editor/skins/ui/oxide/skin.shadowdom.min.css +0 -1
  377. package/dist/components/Editor/skins/ui/oxide-dark/content.inline.min.css +0 -1
  378. package/dist/components/Editor/skins/ui/oxide-dark/content.min.css +0 -1
  379. package/dist/components/Editor/skins/ui/oxide-dark/skin.min.css +0 -1
  380. package/dist/components/Editor/skins/ui/oxide-dark/skin.shadowdom.min.css +0 -1
  381. package/dist/components/Editor/skins/ui/tinymce-5/content.inline.min.css +0 -1
  382. package/dist/components/Editor/skins/ui/tinymce-5/content.min.css +0 -1
  383. package/dist/components/Editor/skins/ui/tinymce-5/skin.min.css +0 -1
  384. package/dist/components/Editor/skins/ui/tinymce-5/skin.shadowdom.min.css +0 -1
  385. package/dist/components/Editor/skins/ui/tinymce-5-dark/content.inline.min.css +0 -1
  386. package/dist/components/Editor/skins/ui/tinymce-5-dark/content.min.css +0 -1
  387. package/dist/components/Editor/skins/ui/tinymce-5-dark/skin.min.css +0 -1
  388. package/dist/components/Editor/skins/ui/tinymce-5-dark/skin.shadowdom.min.css +0 -1
  389. package/dist/components/Editor/tinymce/icons/default/icons.js +0 -194
  390. package/dist/components/Editor/tinymce/icons/default/icons.min.js +0 -1
  391. package/dist/components/Editor/tinymce/skins/content/dark/content.css +0 -66
  392. package/dist/components/Editor/tinymce/skins/content/dark/content.min.css +0 -2
  393. package/dist/components/Editor/tinymce/skins/content/default/content.css +0 -61
  394. package/dist/components/Editor/tinymce/skins/content/default/content.min.css +0 -2
  395. package/dist/components/Editor/tinymce/skins/content/document/content.css +0 -66
  396. package/dist/components/Editor/tinymce/skins/content/document/content.min.css +0 -2
  397. package/dist/components/Editor/tinymce/skins/content/tinymce-5/content.css +0 -61
  398. package/dist/components/Editor/tinymce/skins/content/tinymce-5/content.min.css +0 -2
  399. package/dist/components/Editor/tinymce/skins/content/tinymce-5-dark/content.css +0 -66
  400. package/dist/components/Editor/tinymce/skins/content/tinymce-5-dark/content.min.css +0 -2
  401. package/dist/components/Editor/tinymce/skins/content/writer/content.css +0 -62
  402. package/dist/components/Editor/tinymce/skins/content/writer/content.min.css +0 -2
  403. package/dist/components/Editor/tinymce/skins/ui/oxide/content.css +0 -785
  404. package/dist/components/Editor/tinymce/skins/ui/oxide/content.inline.css +0 -779
  405. package/dist/components/Editor/tinymce/skins/ui/oxide/content.inline.min.css +0 -2
  406. package/dist/components/Editor/tinymce/skins/ui/oxide/content.min.css +0 -2
  407. package/dist/components/Editor/tinymce/skins/ui/oxide/skin.css +0 -3763
  408. package/dist/components/Editor/tinymce/skins/ui/oxide/skin.min.css +0 -2
  409. package/dist/components/Editor/tinymce/skins/ui/oxide/skin.shadowdom.css +0 -30
  410. package/dist/components/Editor/tinymce/skins/ui/oxide/skin.shadowdom.min.css +0 -2
  411. package/dist/components/Editor/tinymce/skins/ui/oxide-dark/content.css +0 -766
  412. package/dist/components/Editor/tinymce/skins/ui/oxide-dark/content.inline.css +0 -779
  413. package/dist/components/Editor/tinymce/skins/ui/oxide-dark/content.inline.min.css +0 -2
  414. package/dist/components/Editor/tinymce/skins/ui/oxide-dark/content.min.css +0 -2
  415. package/dist/components/Editor/tinymce/skins/ui/oxide-dark/skin.css +0 -3766
  416. package/dist/components/Editor/tinymce/skins/ui/oxide-dark/skin.min.css +0 -2
  417. package/dist/components/Editor/tinymce/skins/ui/oxide-dark/skin.shadowdom.css +0 -30
  418. package/dist/components/Editor/tinymce/skins/ui/oxide-dark/skin.shadowdom.min.css +0 -2
  419. package/dist/components/Editor/tinymce/skins/ui/tinymce-5/content.css +0 -785
  420. package/dist/components/Editor/tinymce/skins/ui/tinymce-5/content.inline.css +0 -779
  421. package/dist/components/Editor/tinymce/skins/ui/tinymce-5/content.inline.min.css +0 -2
  422. package/dist/components/Editor/tinymce/skins/ui/tinymce-5/content.min.css +0 -2
  423. package/dist/components/Editor/tinymce/skins/ui/tinymce-5/skin.css +0 -3857
  424. package/dist/components/Editor/tinymce/skins/ui/tinymce-5/skin.min.css +0 -2
  425. package/dist/components/Editor/tinymce/skins/ui/tinymce-5/skin.shadowdom.css +0 -30
  426. package/dist/components/Editor/tinymce/skins/ui/tinymce-5/skin.shadowdom.min.css +0 -2
  427. package/dist/components/Editor/tinymce/skins/ui/tinymce-5-dark/content.css +0 -766
  428. package/dist/components/Editor/tinymce/skins/ui/tinymce-5-dark/content.inline.css +0 -779
  429. package/dist/components/Editor/tinymce/skins/ui/tinymce-5-dark/content.inline.min.css +0 -2
  430. package/dist/components/Editor/tinymce/skins/ui/tinymce-5-dark/content.min.css +0 -2
  431. package/dist/components/Editor/tinymce/skins/ui/tinymce-5-dark/skin.css +0 -3857
  432. package/dist/components/Editor/tinymce/skins/ui/tinymce-5-dark/skin.min.css +0 -2
  433. package/dist/components/Editor/tinymce/skins/ui/tinymce-5-dark/skin.shadowdom.css +0 -30
  434. package/dist/components/Editor/tinymce/skins/ui/tinymce-5-dark/skin.shadowdom.min.css +0 -2
  435. package/dist/components/Editor/tinymce/tinymce.d.ts +0 -3238
  436. package/dist/components/TextToHtml/icons/resize_area.svg +0 -2
  437. package/dist/components/TextToHtml/style.css +0 -40
  438. package/dist/components/Zoom/style.css +0 -25
  439. package/dist/types.d.ts +0 -164
package/dist/utils/api.js CHANGED
@@ -9,8 +9,8 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
9
9
  });
10
10
  };
11
11
  var __generator = (this && this.__generator) || function (thisArg, body) {
12
- var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
13
- return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
12
+ var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype);
13
+ return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
14
14
  function verb(n) { return function (v) { return step([n, v]); }; }
15
15
  function step(op) {
16
16
  if (f) throw new TypeError("Generator is already executing.");
@@ -35,16 +35,35 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
35
35
  if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
36
36
  }
37
37
  };
38
+ var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
39
+ if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
40
+ if (ar || !(i in from)) {
41
+ if (!ar) ar = Array.prototype.slice.call(from, 0, i);
42
+ ar[i] = from[i];
43
+ }
44
+ }
45
+ return to.concat(ar || Array.prototype.slice.call(from));
46
+ };
38
47
  Object.defineProperty(exports, "__esModule", { value: true });
39
- exports.getUrlParameters = exports.sendNotification = exports.setWarning = exports.setInfo = exports.setSuccess = exports.setError = exports.setAlert = exports.serverAction = exports.enableDebugger = exports.setServerValue = exports.getServerValue = void 0;
48
+ exports.getUrlParameters = exports.serverAction = exports.enableDebugger = exports.setServerValue = exports.getServerValue = void 0;
49
+ exports.setAlert = setAlert;
50
+ exports.setError = setError;
51
+ exports.setSuccess = setSuccess;
52
+ exports.setInfo = setInfo;
53
+ exports.setWarning = setWarning;
54
+ exports.sendNotification = sendNotification;
40
55
  var config_1 = require("./config");
41
56
  var store_1 = require("./store");
42
57
  var api_1 = require("../api");
43
58
  var fieldsRedux_1 = require("../fieldsRedux");
44
- var getCurrentProgram = function (n) {
45
- if (n === void 0) { n = 0; }
46
- return __awaiter(void 0, void 0, void 0, function () {
59
+ var getCurrentProgram = function () {
60
+ var args_1 = [];
61
+ for (var _i = 0; _i < arguments.length; _i++) {
62
+ args_1[_i] = arguments[_i];
63
+ }
64
+ return __awaiter(void 0, __spreadArray([], args_1, true), void 0, function (n) {
47
65
  var state, currentProgram;
66
+ if (n === void 0) { n = 0; }
48
67
  return __generator(this, function (_a) {
49
68
  state = (0, store_1.getStore)().getState();
50
69
  currentProgram = state.argous.currentProgram;
@@ -127,10 +146,14 @@ var enableDebugger = function () {
127
146
  debuging = true;
128
147
  };
129
148
  exports.enableDebugger = enableDebugger;
130
- var serverAction = function (metodo, dados, pgCode, tratarErro, token) {
131
- if (dados === void 0) { dados = {}; }
132
- return __awaiter(void 0, void 0, void 0, function () {
149
+ var serverAction = function (metodo_1) {
150
+ var args_1 = [];
151
+ for (var _i = 1; _i < arguments.length; _i++) {
152
+ args_1[_i - 1] = arguments[_i];
153
+ }
154
+ return __awaiter(void 0, __spreadArray([metodo_1], args_1, true), void 0, function (metodo, dados, pgCode, tratarErro, token) {
133
155
  var code, tErro, currentProgram, _a, data, res;
156
+ if (dados === void 0) { dados = {}; }
134
157
  return __generator(this, function (_b) {
135
158
  switch (_b.label) {
136
159
  case 0:
@@ -187,42 +210,36 @@ function setAlert(mensagem, type, title, time) {
187
210
  (0, fieldsRedux_1.setAnotherProgramField)('systemTopAlert', { mensagem: mensagem, type: type, title: title, time: time }, 'argousSystem');
188
211
  }, 0);
189
212
  }
190
- exports.setAlert = setAlert;
191
213
  function setError(mensagem, title) {
192
214
  if (title === void 0) { title = 'Erro'; }
193
215
  setTimeout(function () {
194
216
  (0, fieldsRedux_1.setAnotherProgramField)('systemTopAlert', { mensagem: mensagem, type: 'error', title: title }, 'argousSystem');
195
217
  }, 0);
196
218
  }
197
- exports.setError = setError;
198
219
  function setSuccess(mensagem, title, time) {
199
220
  if (time === void 0) { time = 5000; }
200
221
  setTimeout(function () {
201
222
  (0, fieldsRedux_1.setAnotherProgramField)('systemTopAlert', { mensagem: mensagem, type: 'success', title: title, time: time }, 'argousSystem');
202
223
  }, 0);
203
224
  }
204
- exports.setSuccess = setSuccess;
205
225
  function setInfo(mensagem, title, time) {
206
226
  if (time === void 0) { time = 5000; }
207
227
  setTimeout(function () {
208
228
  (0, fieldsRedux_1.setAnotherProgramField)('systemTopAlert', { mensagem: mensagem, type: 'info', title: title, time: time }, 'argousSystem');
209
229
  }, 0);
210
230
  }
211
- exports.setInfo = setInfo;
212
231
  function setWarning(mensagem, title, time) {
213
232
  if (time === void 0) { time = 5000; }
214
233
  setTimeout(function () {
215
234
  (0, fieldsRedux_1.setAnotherProgramField)('systemTopAlert', { mensagem: mensagem, type: 'warning', title: title, time: time }, 'argousSystem');
216
235
  }, 0);
217
236
  }
218
- exports.setWarning = setWarning;
219
237
  function sendNotification(_a) {
220
238
  var id = _a.id, mensagem = _a.mensagem, title = _a.title, type = _a.type, link = _a.link, dsLabel = _a.dsLabel;
221
239
  setTimeout(function () {
222
240
  (0, fieldsRedux_1.setAnotherProgramField)('systemTopAlert', { type: 'notification', id: id, mensagem: mensagem, title: title, link: link, dsLabel: dsLabel, icon: type }, 'argousSystem');
223
241
  }, 0);
224
242
  }
225
- exports.sendNotification = sendNotification;
226
243
  var getUrlVars = function () {
227
244
  var vars = {};
228
245
  window.location.href.replace(/[?&]+([^=&]+)=([^&]*)/gi, function (_, key, value) {
@@ -1,13 +1,12 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.getConfig = exports.setConfig = void 0;
3
+ exports.setConfig = setConfig;
4
+ exports.getConfig = getConfig;
4
5
  var config;
5
6
  function setConfig(providedConfig, callback) {
6
7
  config = providedConfig;
7
8
  callback && callback();
8
9
  }
9
- exports.setConfig = setConfig;
10
10
  function getConfig() {
11
11
  return config;
12
12
  }
13
- exports.getConfig = getConfig;
@@ -1,6 +1,6 @@
1
+ import { BasicModalProps } from '../components';
1
2
  import { ActionType, ArgousType } from '../types';
2
3
  import { ChartOptions } from 'chart.js';
3
- import { BasicModalProps } from 'lib/components';
4
4
  import React from 'react';
5
5
  export declare const widthToCenterVertically: (content: number) => number;
6
6
  export declare const getCookie: (cName: string) => string;
@@ -21,7 +21,7 @@ export declare const printPdf: (URL?: string) => Promise<void>;
21
21
  export declare const getRandomColor: () => string;
22
22
  export declare const getInitials: (nome?: string) => string;
23
23
  export declare const getNumeroFromInitials: (initials: string, length: number) => number;
24
- export declare const usePrevious: (value: any) => undefined;
24
+ export declare const usePrevious: (value: any) => any;
25
25
  /**
26
26
  * Igual o useEffect, mas não ativa quando o componente monta
27
27
  *
@@ -51,7 +51,7 @@ export declare const randomColor: () => string;
51
51
  * @returns {ChartOptions} - retorno com tema ajustado
52
52
  */
53
53
  export declare const useGraph: ({ title, legend: { labels, ...legend }, plugins: { datalabels, ...plugins }, scales: { yAxes: [{ ticks: yticks, gridLines: ygridLines, ...yAxes }, ...y], xAxes: [{ ticks: xticks, gridLines: xgridLines, ...xAxes }, ...x], ...scales }, ...props }?: ChartOptions) => ChartOptions;
54
- export declare const useModal: () => import("lib/components").ModalProviderContextProps;
54
+ export declare const useModal: () => import("../components").ModalProviderContextProps;
55
55
  export declare const useStore: () => ArgousType;
56
56
  export declare const reduxDispatch: (action: ActionType) => void;
57
57
  export declare const formataTelefone: (value: string) => string;
@@ -26,13 +26,23 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
26
26
  }) : function(o, v) {
27
27
  o["default"] = v;
28
28
  });
29
- var __importStar = (this && this.__importStar) || function (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
- };
29
+ var __importStar = (this && this.__importStar) || (function () {
30
+ var ownKeys = function(o) {
31
+ ownKeys = Object.getOwnPropertyNames || function (o) {
32
+ var ar = [];
33
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
34
+ return ar;
35
+ };
36
+ return ownKeys(o);
37
+ };
38
+ return function (mod) {
39
+ if (mod && mod.__esModule) return mod;
40
+ var result = {};
41
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
42
+ __setModuleDefault(result, mod);
43
+ return result;
44
+ };
45
+ })();
36
46
  var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
37
47
  function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
38
48
  return new (P || (P = Promise))(function (resolve, reject) {
@@ -43,8 +53,8 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
43
53
  });
44
54
  };
45
55
  var __generator = (this && this.__generator) || function (thisArg, body) {
46
- var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
47
- return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
56
+ var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype);
57
+ return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
48
58
  function verb(n) { return function (v) { return step([n, v]); }; }
49
59
  function step(op) {
50
60
  if (f) throw new TypeError("Generator is already executing.");
@@ -93,14 +103,21 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
93
103
  return (mod && mod.__esModule) ? mod : { "default": mod };
94
104
  };
95
105
  Object.defineProperty(exports, "__esModule", { value: true });
96
- exports.numbersLettersOnly = exports.lettersOnly = exports.numbersOnly = exports.stopPrntScr = exports.printUrl = exports.geraLog = exports.printScreen = exports.allCharactersSame = exports.dataUrlToBlob = exports.bytesTranslator = exports.storageMeasures = exports.confirm = exports.copyToClipboard = exports.toFloat = exports.currencyMask = exports.useWebSocket = exports.formataTelefone = exports.reduxDispatch = exports.useStore = exports.useModal = exports.useGraph = exports.randomColor = exports.humanFileSize = exports.sanitizaHTML = exports.formataDinheiro = exports.useUpdateEffect = exports.usePrevious = exports.getNumeroFromInitials = exports.getInitials = exports.getRandomColor = exports.printPdf = exports.downloadFromUrl = exports.downloadBase64 = exports.formataNome = exports.addExtraZero = exports.getCookie = exports.widthToCenterVertically = void 0;
106
+ exports.numbersLettersOnly = exports.lettersOnly = exports.numbersOnly = exports.printUrl = exports.geraLog = exports.printScreen = exports.bytesTranslator = exports.storageMeasures = exports.confirm = exports.copyToClipboard = exports.toFloat = exports.currencyMask = exports.useWebSocket = exports.formataTelefone = exports.reduxDispatch = exports.useStore = exports.useModal = exports.useGraph = exports.randomColor = exports.humanFileSize = exports.sanitizaHTML = exports.usePrevious = exports.getNumeroFromInitials = exports.getInitials = exports.getRandomColor = exports.printPdf = exports.formataNome = exports.addExtraZero = exports.getCookie = exports.widthToCenterVertically = void 0;
107
+ exports.downloadBase64 = downloadBase64;
108
+ exports.downloadFromUrl = downloadFromUrl;
109
+ exports.useUpdateEffect = useUpdateEffect;
110
+ exports.formataDinheiro = formataDinheiro;
111
+ exports.dataUrlToBlob = dataUrlToBlob;
112
+ exports.allCharactersSame = allCharactersSame;
113
+ exports.stopPrntScr = stopPrntScr;
97
114
  var api_1 = require("./api");
98
115
  var store_1 = require("./store");
99
116
  var api_2 = require("../api");
100
117
  var ModalProvider_1 = require("../components/ConfirmModal/ModalProvider");
101
118
  var fieldsRedux_1 = require("../fieldsRedux");
102
- var core_1 = require("@material-ui/core");
103
- var colors = __importStar(require("@material-ui/core/colors"));
119
+ var material_1 = require("@mui/material");
120
+ var colors = __importStar(require("@mui/material/colors"));
104
121
  var dom_to_image_1 = __importDefault(require("dom-to-image"));
105
122
  var lodash_1 = require("lodash");
106
123
  var moment_1 = __importDefault(require("moment"));
@@ -127,7 +144,7 @@ var getCookie = function (cName) {
127
144
  return '';
128
145
  };
129
146
  exports.getCookie = getCookie;
130
- var addExtraZero = function (vl) { return (vl < 10) ? "0".concat(typeof vl === 'string' ? parseInt(vl) : vl) : vl; };
147
+ var addExtraZero = function (vl) { return (Number(vl) < 10) ? "0".concat(typeof vl === 'string' ? parseInt(vl) : vl) : vl; };
131
148
  exports.addExtraZero = addExtraZero;
132
149
  var formataNome = function (value) {
133
150
  if (value) {
@@ -148,7 +165,6 @@ function downloadBase64(base64, fileName, fileExtension) {
148
165
  element.click();
149
166
  document.body.removeChild(element);
150
167
  }
151
- exports.downloadBase64 = downloadBase64;
152
168
  /**
153
169
  * Função faz o download de qualquer url
154
170
  *
@@ -180,11 +196,14 @@ function downloadFromUrl(url, fileName, fileExtension) {
180
196
  });
181
197
  });
182
198
  }
183
- exports.downloadFromUrl = downloadFromUrl;
184
- var printPdf = function (URL) {
185
- if (URL === void 0) { URL = ''; }
186
- return __awaiter(void 0, void 0, void 0, function () {
199
+ var printPdf = function () {
200
+ var args_1 = [];
201
+ for (var _i = 0; _i < arguments.length; _i++) {
202
+ args_1[_i] = arguments[_i];
203
+ }
204
+ return __awaiter(void 0, __spreadArray([], args_1, true), void 0, function (URL) {
187
205
  var url, iframe;
206
+ if (URL === void 0) { URL = ''; }
188
207
  return __generator(this, function (_a) {
189
208
  switch (_a.label) {
190
209
  case 0: return [4 /*yield*/, (0, api_2.getFileFromLink)({ URL: URL })];
@@ -244,7 +263,7 @@ exports.getInitials = getInitials;
244
263
  var getNumeroFromInitials = function (initials, length) { return Math.ceil(new RNG((initials.charCodeAt(0) + initials.charCodeAt(1) - 130) * length / 5).nextFloat() * 10) - 1; };
245
264
  exports.getNumeroFromInitials = getNumeroFromInitials;
246
265
  var usePrevious = function (value) {
247
- var ref = (0, react_1.useRef)();
266
+ var ref = (0, react_1.useRef)(undefined);
248
267
  (0, react_1.useEffect)(function () {
249
268
  ref.current = value;
250
269
  });
@@ -266,15 +285,15 @@ function useUpdateEffect(effect, dependencies) {
266
285
  isInitialMount.current = false;
267
286
  else
268
287
  effect();
288
+ // This compatibility hook deliberately forwards the caller's dependency list.
289
+ // eslint-disable-next-line react-hooks/exhaustive-deps
269
290
  }, dependencies);
270
291
  }
271
- exports.useUpdateEffect = useUpdateEffect;
272
292
  function formataDinheiro(n) {
273
293
  if (n >= 0)
274
294
  return new Intl.NumberFormat('pt-BR', { minimumFractionDigits: 2 }).format(n);
275
295
  return "(".concat(new Intl.NumberFormat('pt-BR', { minimumFractionDigits: 2 }).format(Math.abs(n)), ")");
276
296
  }
277
- exports.formataDinheiro = formataDinheiro;
278
297
  var sanitizaHTML = function (html) {
279
298
  if (html === void 0) { html = ''; }
280
299
  return (html === null || html === void 0 ? void 0 : html.replace(/(<script>)|(<\/script>)|(\bon[^ ]*=('|"))/gi, '')) || '';
@@ -323,7 +342,7 @@ exports.randomColor = randomColor;
323
342
  var useGraph = function (_a) {
324
343
  if (_a === void 0) { _a = {}; }
325
344
  var title = _a.title, _b = _a.legend, _c = _b === void 0 ? {} : _b, labels = _c.labels, legend = __rest(_c, ["labels"]), _d = _a.plugins, _e = _d === void 0 ? {} : _d, datalabels = _e.datalabels, plugins = __rest(_e, ["datalabels"]), _f = _a.scales, _g = _f === void 0 ? {} : _f, _h = _g.yAxes, _j = _h === void 0 ? [] : _h, _k = _j, _l = _k[0], y = _k.slice(1), _m = _l === void 0 ? {} : _l, _o = _m.ticks, yticks = _o === void 0 ? {} : _o, _p = _m.gridLines, ygridLines = _p === void 0 ? {} : _p, yAxes = __rest(_m, ["ticks", "gridLines"]), _q = _g.xAxes, _r = _q === void 0 ? [] : _q, _s = _r, _t = _s[0], x = _s.slice(1), _u = _t === void 0 ? {} : _t, _v = _u.ticks, xticks = _v === void 0 ? {} : _v, _w = _u.gridLines, xgridLines = _w === void 0 ? {} : _w, xAxes = __rest(_u, ["ticks", "gridLines"]), scales = __rest(_g, ["yAxes", "xAxes"]), props = __rest(_a, ["title", "legend", "plugins", "scales"]);
326
- var theme = (0, core_1.useTheme)();
345
+ var theme = (0, material_1.useTheme)();
327
346
  return __assign({ title: __assign({ fontColor: theme.palette.text.primary, fontSize: theme.typography.fontSize }, title), legend: __assign({ position: 'bottom', labels: __assign({ fontColor: theme.palette.text.primary }, labels) }, legend), plugins: __assign({ datalabels: __assign({ align: 'end', anchor: 'end', color: theme.palette.text.secondary, textShadowColor: theme.palette.background.default, textShadowBlur: 3 }, datalabels) }, plugins), scales: __assign({ yAxes: __spreadArray([__assign({ ticks: __assign({ fontColor: theme.palette.text.secondary }, yticks), gridLines: __assign({ color: theme.palette.divider, zeroLineColor: theme.palette.divider }, ygridLines) }, yAxes)], y, true), xAxes: __spreadArray([__assign({ ticks: __assign({ fontColor: theme.palette.text.secondary }, xticks), gridLines: __assign({ color: theme.palette.divider, zeroLineColor: theme.palette.divider }, xgridLines) }, xAxes)], x, true) }, scales) }, props);
328
347
  };
329
348
  exports.useGraph = useGraph;
@@ -439,7 +458,6 @@ function dataUrlToBlob(dataUrl) {
439
458
  var blob = new Blob([arrayBuffer], { type: mimeString });
440
459
  return blob;
441
460
  }
442
- exports.dataUrlToBlob = dataUrlToBlob;
443
461
  function allCharactersSame(s) {
444
462
  var n = s.length;
445
463
  for (var i = 1; i < n; i++)
@@ -447,37 +465,34 @@ function allCharactersSame(s) {
447
465
  return false;
448
466
  return true;
449
467
  }
450
- exports.allCharactersSame = allCharactersSame;
451
- var printScreen = function (_a) {
452
- var event = _a.event, _b = _a.id, id = _b === void 0 ? 'root' : _b, _c = _a.download, download = _c === void 0 ? false : _c;
453
- return __awaiter(void 0, void 0, void 0, function () {
454
- var status, file, linkElement, element, dataUrl, blob;
455
- return __generator(this, function (_d) {
456
- switch (_d.label) {
457
- case 0:
458
- status = false;
459
- element = document.getElementById(id);
460
- if (!element) return [3 /*break*/, 2];
461
- return [4 /*yield*/, dom_to_image_1.default.toPng(element)];
462
- case 1:
463
- dataUrl = _d.sent();
464
- if (dataUrl) {
465
- linkElement = document.createElement('a');
466
- linkElement.download = "print_screen_".concat((0, moment_1.default)(new Date()).format('DD-MM-YYYY_HH:mm:ss'), ".png");
467
- linkElement.href = dataUrl;
468
- blob = dataUrlToBlob(dataUrl);
469
- if (blob)
470
- file = new File([blob], linkElement.download, { type: blob.type });
471
- }
472
- _d.label = 2;
473
- case 2:
474
- (linkElement && file) && (status = true);
475
- (linkElement && download) && linkElement.click();
476
- return [2 /*return*/, { event: event, status: status, file: file, element: element, link: linkElement }];
477
- }
478
- });
468
+ var printScreen = function (_a) { return __awaiter(void 0, [_a], void 0, function (_b) {
469
+ var status, file, linkElement, element, dataUrl, blob;
470
+ var event = _b.event, _c = _b.id, id = _c === void 0 ? 'root' : _c, _d = _b.download, download = _d === void 0 ? false : _d;
471
+ return __generator(this, function (_e) {
472
+ switch (_e.label) {
473
+ case 0:
474
+ status = false;
475
+ element = document.getElementById(id);
476
+ if (!element) return [3 /*break*/, 2];
477
+ return [4 /*yield*/, dom_to_image_1.default.toPng(element)];
478
+ case 1:
479
+ dataUrl = _e.sent();
480
+ if (dataUrl) {
481
+ linkElement = document.createElement('a');
482
+ linkElement.download = "print_screen_".concat((0, moment_1.default)(new Date()).format('DD-MM-YYYY_HH:mm:ss'), ".png");
483
+ linkElement.href = dataUrl;
484
+ blob = dataUrlToBlob(dataUrl);
485
+ if (blob)
486
+ file = new File([blob], linkElement.download, { type: blob.type });
487
+ }
488
+ _e.label = 2;
489
+ case 2:
490
+ (linkElement && file) && (status = true);
491
+ (linkElement && download) && linkElement.click();
492
+ return [2 /*return*/, { event: event, status: status, file: file, element: element, link: linkElement }];
493
+ }
479
494
  });
480
- };
495
+ }); };
481
496
  exports.printScreen = printScreen;
482
497
  var geraLog = function (idDocumento, descricao, tpAcao, tokenSistema) { return __awaiter(void 0, void 0, void 0, function () {
483
498
  var _a, _b, _c, _d;
@@ -541,7 +556,6 @@ function stopPrntScr(e) {
541
556
  inpFld.remove();
542
557
  return false;
543
558
  }
544
- exports.stopPrntScr = stopPrntScr;
545
559
  var numbersOnly = function (value, type) { return value ? value.replace(type === 'float' ? /[^0-9/.,]/g : /[^0-9]/g, '') : ''; };
546
560
  exports.numbersOnly = numbersOnly;
547
561
  var lettersOnly = function (valor) { return valor ? valor.replace(/\W/g, '') : ''; };
@@ -1,12 +1,11 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.getStore = exports.setStore = void 0;
3
+ exports.setStore = setStore;
4
+ exports.getStore = getStore;
4
5
  var store;
5
6
  function setStore(providedStore) {
6
7
  store = providedStore;
7
8
  }
8
- exports.setStore = setStore;
9
9
  function getStore() {
10
10
  return store;
11
11
  }
12
- exports.getStore = getStore;
@@ -1,4 +1,4 @@
1
- import { connectArgousWS, getArgousWS, enviaMensagem, disconnect } from './ws';
1
+ import { connectArgousWS, enviaMensagem, disconnect } from './ws';
2
2
  import * as argous from '../actions';
3
3
  import { getField, getCurrentProgram } from '../fieldsRedux';
4
4
  import { sendNotification } from '../utils/api';
@@ -9,11 +9,7 @@ import { connect } from 'react-redux';
9
9
  class WebSocketComponent extends Component {
10
10
 
11
11
  componentDidMount() {
12
- window.addEventListener('focus', () => {
13
- if (this.props.usuarioLogado.nome) {
14
- this.connect();
15
- }
16
- });
12
+ window.addEventListener('focus', this.handleFocus);
17
13
  }
18
14
 
19
15
  componentDidUpdate(previousProps, previousState) {
@@ -27,17 +23,20 @@ class WebSocketComponent extends Component {
27
23
  }
28
24
 
29
25
  componentWillUnmount() {
26
+ window.removeEventListener('focus', this.handleFocus);
30
27
  disconnect();
31
28
  }
32
29
 
33
- connect = () => {
34
- connectArgousWS();
30
+ handleFocus = () => {
31
+ if (this.props.usuarioLogado.nome) {
32
+ this.connect();
33
+ }
34
+ }
35
35
 
36
- const argousWS = getArgousWS();
36
+ connect = () => {
37
+ const argousWS = connectArgousWS();
37
38
 
38
- argousWS.onopen = (event) => {
39
- enviaMensagem({ trn: 1 });
40
- };
39
+ enviaMensagem({ trn: 1 });
41
40
 
42
41
  argousWS.onmessage = (event) => {
43
42
  const res = JSON.parse(event.data);
package/lib/api/index.js CHANGED
@@ -9,10 +9,10 @@ export const headers = (token) => ({ lgTkn: (token) ? token : getCookie('lt') })
9
9
 
10
10
  /**
11
11
  * @deprecated
12
- *
13
- * @param {string} request - Metodo chamado
12
+ *
13
+ * @param {string} request - Metodo chamado
14
14
  * @param {*} data - Dados Enviados
15
- *
15
+ *
16
16
  * @returns {*} retorno
17
17
  */
18
18
  export const fetchToArgous = async (request, data) => {
@@ -103,10 +103,10 @@ export const getProgram = async (data) => {
103
103
 
104
104
  /**
105
105
  * @deprecated
106
- *
106
+ *
107
107
  * @param {*} data - Dados
108
- *
109
- * @returns {object} retorno
108
+ *
109
+ * @returns {object} retorno
110
110
  */
111
111
  export const agGet = async (data) => {
112
112
  const res = await fetch(`${api()}agget.rslvr`, {
@@ -119,10 +119,10 @@ export const agGet = async (data) => {
119
119
 
120
120
  /**
121
121
  * @deprecated
122
- *
122
+ *
123
123
  * @param {*} data - Dados
124
- *
125
- * @returns {object} retorno
124
+ *
125
+ * @returns {object} retorno
126
126
  */
127
127
  export const agSet = async (data) => {
128
128
  const res = await fetch(`${api()}agset.rslvr`, {
@@ -144,10 +144,10 @@ export const action = async (data, token) => {
144
144
 
145
145
  /**
146
146
  * @deprecated
147
- *
147
+ *
148
148
  * @param {*} data - Dados
149
- *
150
- * @returns {object} retorno
149
+ *
150
+ * @returns {object} retorno
151
151
  */
152
152
  export const method = async (data) => {
153
153
  const res = await fetch(`${api()}agmethod.rslvr`, {
@@ -317,7 +317,7 @@ export const sendFilePart = async (data) => { // Envia um pedaco do do arquivo,
317
317
  return await res.json();
318
318
  };
319
319
 
320
- export const endFileUpload = async (data) => { //Finaliza o processo de envio de arquivo
320
+ export const endFileUpload = async (data) => { //Finaliza o processo de envio de arquivo
321
321
  const res = await fetch(`${api()}setEndFileUpload.filepart`, {
322
322
  method: 'POST',
323
323
  body: JSON.stringify(data),
@@ -372,7 +372,7 @@ export const prepareFile = async (file) => {
372
372
  headers: headers(),
373
373
  body: formData
374
374
  });
375
- return { ...await res.json(),
375
+ return { ...(await res.json()),
376
376
  lastModified: file.lastModified,
377
377
  lastModifiedDate: file.lastModifiedDate,
378
378
  name: file.name,
package/lib/api/ws.js CHANGED
@@ -4,9 +4,38 @@ import { getConfig } from '../utils/config';
4
4
  const api = () => `${getConfig().ssl ? 'wss' : 'ws'}${ server() }ws`;
5
5
 
6
6
  let argousWS = null;
7
+ let filaMensagens = [];
8
+
9
+ const WS_CONNECTING = 0;
10
+ const WS_OPEN = 1;
11
+ const WS_CLOSING = 2;
12
+ const WS_CLOSED = 3;
13
+
14
+ const isSocketActive = (ws) => ws && [WS_CONNECTING, WS_OPEN].includes(ws.readyState);
15
+ const isSocketOpen = (ws) => ws && ws.readyState === WS_OPEN;
16
+
17
+ const flushMensagens = () => {
18
+ if (!isSocketOpen(argousWS) || !filaMensagens.length) {
19
+ return;
20
+ }
21
+
22
+ const mensagens = [...filaMensagens];
23
+ filaMensagens = [];
24
+
25
+ mensagens.forEach((mensagem) => {
26
+ argousWS.send(mensagem);
27
+ });
28
+ };
7
29
 
8
30
  export const connectArgousWS = (data) => {
31
+ if (isSocketActive(argousWS)) {
32
+ return argousWS;
33
+ }
34
+
9
35
  argousWS = new WebSocket(api());
36
+ argousWS.addEventListener('open', flushMensagens);
37
+
38
+ return argousWS;
10
39
  };
11
40
 
12
41
  export const getArgousWS = (data) => {
@@ -14,14 +43,29 @@ export const getArgousWS = (data) => {
14
43
  };
15
44
 
16
45
  export const disconnect = () => {
17
- if (argousWS)
46
+ filaMensagens = [];
47
+
48
+ if (argousWS && ![WS_CLOSING, WS_CLOSED].includes(argousWS.readyState)) {
18
49
  argousWS.close();
50
+ }
51
+
52
+ argousWS = null;
19
53
  };
20
54
 
21
55
  export const enviaMensagem = (data) => {
22
- const argousWS = getArgousWS();
23
- argousWS.send(JSON.stringify({
56
+ const mensagem = JSON.stringify({
24
57
  ...headers(),
25
58
  ...data
26
- }));
59
+ });
60
+
61
+ if (!isSocketActive(argousWS)) {
62
+ connectArgousWS();
63
+ }
64
+
65
+ if (isSocketOpen(argousWS)) {
66
+ argousWS.send(mensagem);
67
+ return;
68
+ }
69
+
70
+ filaMensagens.push(mensagem);
27
71
  };
@@ -1,4 +1,4 @@
1
- import { AvatarProps } from '@material-ui/core';
1
+ import { AvatarProps } from '@mui/material';
2
2
 
3
3
  export interface ArgousAvatarTypeMap extends AvatarProps{
4
4
  /**