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,155 @@
1
+ "use strict";
2
+ var __assign = (this && this.__assign) || function () {
3
+ __assign = Object.assign || function(t) {
4
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
5
+ s = arguments[i];
6
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
7
+ t[p] = s[p];
8
+ }
9
+ return t;
10
+ };
11
+ return __assign.apply(this, arguments);
12
+ };
13
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
14
+ if (k2 === undefined) k2 = k;
15
+ Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
16
+ }) : (function(o, m, k, k2) {
17
+ if (k2 === undefined) k2 = k;
18
+ o[k2] = m[k];
19
+ }));
20
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
21
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
22
+ }) : function(o, v) {
23
+ o["default"] = v;
24
+ });
25
+ var __importStar = (this && this.__importStar) || function (mod) {
26
+ if (mod && mod.__esModule) return mod;
27
+ var result = {};
28
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
29
+ __setModuleDefault(result, mod);
30
+ return result;
31
+ };
32
+ var __rest = (this && this.__rest) || function (s, e) {
33
+ var t = {};
34
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
35
+ t[p] = s[p];
36
+ if (s != null && typeof Object.getOwnPropertySymbols === "function")
37
+ for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
38
+ if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
39
+ t[p[i]] = s[p[i]];
40
+ }
41
+ return t;
42
+ };
43
+ var __importDefault = (this && this.__importDefault) || function (mod) {
44
+ return (mod && mod.__esModule) ? mod : { "default": mod };
45
+ };
46
+ Object.defineProperty(exports, "__esModule", { value: true });
47
+ exports.CustomTooltip = void 0;
48
+ var ArgousComplexTable_1 = require("../ArgousComplexTable/ArgousComplexTable");
49
+ var core_1 = require("@material-ui/core");
50
+ var clsx_1 = __importDefault(require("clsx"));
51
+ var lodash_1 = require("lodash");
52
+ var react_1 = __importStar(require("react"));
53
+ var md_1 = require("react-icons/md");
54
+ var dist_1 = require("react-trello/dist/");
55
+ var useStyles = core_1.makeStyles(function (theme) { return ({
56
+ dragHandle: {
57
+ cursor: 'n-resize'
58
+ },
59
+ hover: {
60
+ '&:hover': {
61
+ backgroundColor: core_1.alpha(theme.palette.secondary.main, theme.palette.action.selectedOpacity * 2)
62
+ }
63
+ },
64
+ open: {
65
+ backgroundColor: core_1.alpha(theme.palette.primary.main, theme.palette.action.selectedOpacity),
66
+ '&:hover': {
67
+ backgroundColor: core_1.alpha(theme.palette.primary.main, theme.palette.action.selectedOpacity * 2),
68
+ }
69
+ },
70
+ semDados: {
71
+ padding: theme.spacing(1),
72
+ paddingLeft: theme.spacing(2),
73
+ fontSize: '1rem',
74
+ },
75
+ group: {
76
+ '&>td': {
77
+ padding: '0px',
78
+ // '&:hover':{
79
+ // backgroundColor: theme.palette.action.selected
80
+ // }
81
+ }
82
+ },
83
+ loading: {
84
+ textAlign: 'center',
85
+ padding: '7px'
86
+ }
87
+ }); });
88
+ var ArgousComplexTableBody = react_1.memo(function (_a) {
89
+ var children = _a.children, line = _a.line, lineStyle = _a.lineStyle, handleOpenClose = _a.handleOpenClose, lineClass = _a.lineClass, enableCheck = _a.enableCheck, disableCheckIf = _a.disableCheckIf, columnStyles = _a.columnStyles, head = _a.head, onClick = _a.onClick, onDoubleClick = _a.onDoubleClick, indexToSelect = _a.indexToSelect, open = _a.open, dadosMostrados = _a.dadosMostrados, columnOptions = _a.columnOptions, lineTitle = _a.lineTitle, customKey = _a.customKey, columnProps = _a.columnProps, rowProps = _a.rowProps, enableDrag = _a.enableDrag, onDrop = _a.onDrop;
90
+ var classes = useStyles();
91
+ var _b = react_1.useContext(ArgousComplexTable_1.TableContext), lista = _b.lista, selected = _b.selected, dispatch = _b.dispatch, loading = _b.loading;
92
+ var handleClick = function (name) {
93
+ var selectedIndex = selected.indexOf(name);
94
+ var newSelected = [];
95
+ if (selectedIndex === -1)
96
+ newSelected = newSelected.concat(selected, name);
97
+ else if (selectedIndex === 0)
98
+ newSelected = newSelected.concat(selected.slice(1));
99
+ else if (selectedIndex === selected.length - 1)
100
+ newSelected = newSelected.concat(selected.slice(0, -1));
101
+ else if (selectedIndex > 0)
102
+ newSelected = newSelected.concat(selected.slice(0, selectedIndex), selected.slice(selectedIndex + 1));
103
+ dispatch({ type: 'setSelected', value: newSelected });
104
+ };
105
+ var isSelected = function (name) { return selected.indexOf(name) !== -1; };
106
+ var getCellContent = function (coluna, linha, index, i) {
107
+ if (columnOptions) {
108
+ var item = columnOptions.filter(function (item) { return item.alias === index; });
109
+ if (item.length > 0)
110
+ return item[0].customJsx({ index: i, itemFormatado: line(linha)[index], linhaFormatada: line(linha), linhaOriginal: linha });
111
+ }
112
+ return coluna;
113
+ };
114
+ return (react_1.default.createElement(dist_1.Container, { dragHandleSelector: "." + classes.dragHandle, onDrop: onDrop, render: function (containerRef) {
115
+ var _a;
116
+ return (react_1.default.createElement(core_1.TableBody, { innerRef: containerRef }, loading ? (react_1.default.createElement(core_1.TableRow, null,
117
+ react_1.default.createElement(core_1.TableCell, { className: classes.loading, colSpan: (dadosMostrados === null || dadosMostrados === void 0 ? void 0 : dadosMostrados.length) && ((_a = line(dadosMostrados[0])) === null || _a === void 0 ? void 0 : _a.length) + (enableCheck ? 1 : 0) + (enableDrag ? 1 : 0) },
118
+ react_1.default.createElement(core_1.CircularProgress, { disableShrink: true })))) : dadosMostrados.length ? dadosMostrados.map(function (linha, i) {
119
+ var isItemSelected = isSelected(linha[indexToSelect]);
120
+ var isItemOpen = i === open;
121
+ var _a = rowProps({ index: i, linhaOriginal: linha, linhaFormatada: line(linha), itensSelecionados: selected }) || {}, title = _a.title, rowProperties = __rest(_a, ["title"]);
122
+ return react_1.default.createElement(dist_1.Draggable, { key: customKey ? lista[i][customKey] : i, render: function (draggableRef) {
123
+ var _a;
124
+ var _b;
125
+ return (
126
+ //TODO criar proprio draggable pois esse remove classes do filho
127
+ react_1.default.createElement(react_1.Fragment, null,
128
+ react_1.default.createElement(exports.CustomTooltip, { title: lineTitle || title },
129
+ react_1.default.createElement(core_1.TableRow, __assign({ component: dist_1.Draggable }, rowProperties, { className: clsx_1.default((_a = {}, _a[classes.hover] = isItemSelected, _a[classes.open] = isItemOpen && !!children, _a), lineClass(line(linha), linha, i), rowProperties.className), hover: true, role: 'checkbox', tabIndex: -1, selected: isItemSelected, style: lineStyle ? lineStyle(linha, line(linha), i) : undefined, onClick: onClick ? function (e) { return onClick(e, linha, line(linha), i); } : children ? function () { return handleOpenClose(i); } : undefined, onDoubleClick: onDoubleClick ? function (e) { return onDoubleClick(e, linha, line(linha), i); } : undefined, innerRef: draggableRef }),
130
+ enableDrag && react_1.default.createElement(core_1.TableCell, { padding: 'checkbox' },
131
+ react_1.default.createElement(core_1.Tooltip, { title: 'Arrastar' },
132
+ react_1.default.createElement(core_1.IconButton, { size: 'small', className: classes.dragHandle },
133
+ react_1.default.createElement(md_1.MdDragHandle, null)))),
134
+ enableCheck && react_1.default.createElement(core_1.TableCell, { padding: 'checkbox' },
135
+ react_1.default.createElement(core_1.Checkbox, { disabled: disableCheckIf && disableCheckIf(linha, line(linha), i), onClick: function (e) {
136
+ e.stopPropagation();
137
+ handleClick(linha[indexToSelect]);
138
+ }, checked: isItemSelected })),
139
+ lodash_1.isArray(line(linha)) && line(linha).map(function (coluna, j) { return (react_1.default.createElement(core_1.TableCell, __assign({ key: j }, columnProps(j, coluna, linha, line(linha)), { style: columnStyles ? columnStyles[j] : undefined }), getCellContent(coluna, dadosMostrados[i], j, i))); }))),
140
+ children && (react_1.default.createElement(core_1.TableRow, { className: classes.group },
141
+ react_1.default.createElement(core_1.TableCell, { colSpan: (dadosMostrados === null || dadosMostrados === void 0 ? void 0 : dadosMostrados.length) && ((_b = line(dadosMostrados[0])) === null || _b === void 0 ? void 0 : _b.length) + (enableCheck ? 1 : 0) + (enableDrag ? 1 : 0), style: { padding: open === i ? 8 : 0 } },
142
+ react_1.default.createElement(core_1.Collapse, { in: open === i, mountOnEnter: true, unmountOnExit: true }, typeof children === 'function' ? children({ linha: line(linha), linhaOriginal: linha, index: i }) : children))))));
143
+ } });
144
+ }) : react_1.default.createElement(core_1.TableRow, null,
145
+ react_1.default.createElement(core_1.Typography, { className: classes.semDados, component: 'td', variant: 'h6', colSpan: head.length + (enableCheck ? 1 : 0) }, "Nenhum dado a ser exibido"))));
146
+ } }));
147
+ });
148
+ exports.default = ArgousComplexTableBody;
149
+ var CustomTooltip = function (_a) {
150
+ var title = _a.title, children = _a.children;
151
+ if (title)
152
+ return react_1.default.createElement(core_1.Tooltip, { arrow: true, title: title }, children);
153
+ return children;
154
+ };
155
+ exports.CustomTooltip = CustomTooltip;
@@ -0,0 +1,2 @@
1
+ export { default } from './ArgousComplexTableBody';
2
+ export * from './ArgousComplexTableBody';
@@ -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 ArgousComplexTableBody_1 = require("./ArgousComplexTableBody");
8
+ Object.defineProperty(exports, "default", { enumerable: true, get: function () { return __importDefault(ArgousComplexTableBody_1).default; } });
@@ -0,0 +1,73 @@
1
+ import * as React from 'react';
2
+
3
+ export interface ArgousComplexTableHeadProps {
4
+ /**
5
+ * Array de títulos para o cabeçalho da tabela
6
+ */
7
+ head?: Array<string>,
8
+ /**
9
+ * Array de estilos para cada item do cabeçalho
10
+ */
11
+ headerColumnStyles?: Array<React.CSSProperties>,
12
+ /**
13
+ * Array de booleanos para desabilitar a ordenacao em itens expecificos
14
+ */
15
+ disableSorting?: Array<boolean>,
16
+ }
17
+
18
+ export interface ArgousComplexTableHeadPrivateProps extends ArgousComplexTableHeadProps {
19
+ /**
20
+ * Quantidade de itens selecionados
21
+ */
22
+ numSelected: number,
23
+ /**
24
+ * Quantidade de linhas por página
25
+ */
26
+ rowCount: number,
27
+ /**
28
+ * Habilita a seleção de linhas da lista
29
+ */
30
+ enableCheck?: boolean,
31
+ /**
32
+ * Habilita o drag and drop das linhas
33
+ */
34
+ enableDrag?: boolean,
35
+ /**
36
+ * Função que decide se a seleção de determinada linha está habilitada
37
+ *
38
+ * @param linhaOriginal - Linha original, antes de ser formatada pela função line
39
+ * @param linhaFormatada - Linha ja formatada pela função line
40
+ * @param index - Índice da linha
41
+ *
42
+ * @returns {boolean} Booleano
43
+ */
44
+ disableCheckIf?: (linhaOriginal: Array<any> | object, linhaFormatada: Array<any>, index: number) => boolean,
45
+ /**
46
+ * Função que converte a linha original em um array com os dados a serem exibidos
47
+ *
48
+ * @param linhaOriginal - linha a ser formatada
49
+ *
50
+ * @returns {Array<any>} Retorna array
51
+ */
52
+ line: (linhaOriginal: Array<Array<any> | Object>) => Array<any>,
53
+ /**
54
+ * Quantidade total de linhas na tabela
55
+ */
56
+ size: number,
57
+ /**
58
+ * Array de booleanos retornado pelo caminhador para habilitar a ordenação
59
+ */
60
+ ordCols: Array<boolean>,
61
+ /**
62
+ * Recebe o array com todos os dados e retorna um array somente com os dados mostrados
63
+ *
64
+ * @param dados - Dados completos
65
+ *
66
+ * @returns {Array<Array<any> | Object>} Array com dados mostrados
67
+ */
68
+ cortaDados: (dados: Array<Array<any> | Object>) => Array<Array<any> | Object>
69
+ }
70
+
71
+ declare function ArgousComplexTableHead(props: ArgousComplexTableHeadPrivateProps): JSX.Element
72
+
73
+ export default ArgousComplexTableHead;
@@ -0,0 +1,88 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
5
+ }) : (function(o, m, k, k2) {
6
+ if (k2 === undefined) k2 = k;
7
+ o[k2] = m[k];
8
+ }));
9
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
10
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
11
+ }) : function(o, v) {
12
+ o["default"] = v;
13
+ });
14
+ var __importStar = (this && this.__importStar) || function (mod) {
15
+ if (mod && mod.__esModule) return mod;
16
+ var result = {};
17
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
18
+ __setModuleDefault(result, mod);
19
+ return result;
20
+ };
21
+ var __importDefault = (this && this.__importDefault) || function (mod) {
22
+ return (mod && mod.__esModule) ? mod : { "default": mod };
23
+ };
24
+ Object.defineProperty(exports, "__esModule", { value: true });
25
+ var ArgousComplexTable_1 = require("../ArgousComplexTable/ArgousComplexTable");
26
+ var core_1 = require("@material-ui/core");
27
+ var clsx_1 = __importDefault(require("clsx"));
28
+ var lodash_1 = require("lodash");
29
+ var react_1 = __importStar(require("react"));
30
+ var useStyles = core_1.makeStyles(function (theme) { return ({
31
+ highlight: {
32
+ color: theme.palette.type === 'light' ? theme.palette.secondary.main : theme.palette.text.primary,
33
+ backgroundColor: core_1.alpha(theme.palette.secondary.main, theme.palette.action.selectedOpacity * 2)
34
+ },
35
+ lighthighlight: {
36
+ background: core_1.alpha(theme.palette.secondary.main, theme.palette.action.selectedOpacity)
37
+ },
38
+ visuallyHidden: {
39
+ border: 0,
40
+ clip: 'rect(0 0 0 0)',
41
+ height: 1,
42
+ margin: -1,
43
+ overflow: 'hidden',
44
+ padding: 0,
45
+ position: 'absolute',
46
+ top: 20,
47
+ width: 1,
48
+ }
49
+ }); });
50
+ var ArgousComplexTableHead = react_1.memo(function (_a) {
51
+ var _b;
52
+ var numSelected = _a.numSelected, rowCount = _a.rowCount, head = _a.head, enableCheck = _a.enableCheck, disableCheckIf = _a.disableCheckIf, line = _a.line, size = _a.size, headerColumnStyles = _a.headerColumnStyles, disableSorting = _a.disableSorting, ordCols = _a.ordCols, cortaDados = _a.cortaDados, enableDrag = _a.enableDrag;
53
+ var classes = useStyles();
54
+ var _c = react_1.useContext(ArgousComplexTable_1.TableContext), selected = _c.selected, order = _c.order, orderBy = _c.orderBy, dispatch = _c.dispatch, lista = _c.lista, indexToSelect = _c.indexToSelect, method = _c.method;
55
+ var handleRequestSort = function (property) {
56
+ var isAsc = orderBy === property && order === 'asc';
57
+ dispatch({ type: 'setOrder', value: isAsc ? 'desc' : 'asc' });
58
+ dispatch({ type: 'setOrderBy', value: property });
59
+ };
60
+ var length = react_1.useMemo(function () { return disableCheckIf ? lista.reduce(function (acc, linha, i) { return !disableCheckIf(linha, line(linha), i) ? acc + 1 : acc; }, 0) : size; }, [disableCheckIf, lista, size]);
61
+ var handleSelectAllClick = function (event) {
62
+ if (event.target.checked) {
63
+ if (!method && selected.length === 0)
64
+ dispatch({ type: 'setSelected', value: cortaDados(lista).filter(function (linha, i) { return disableCheckIf ? !disableCheckIf(linha, line(linha), i) : true; }).map(function (n) { return n[indexToSelect]; }) });
65
+ else if (selected.length < length)
66
+ dispatch({ type: 'setSelected', value: lista.filter(function (linha, i) { return disableCheckIf ? !disableCheckIf(linha, line(linha), i) : true; }).map(function (n) { return n[indexToSelect]; }) });
67
+ else
68
+ dispatch({ type: 'setSelected', value: [] });
69
+ }
70
+ else
71
+ dispatch({ type: 'setSelected', value: [] });
72
+ };
73
+ return (react_1.default.createElement(core_1.TableHead, null,
74
+ react_1.default.createElement(core_1.TableRow, { className: clsx_1.default((_b = {},
75
+ _b[classes.highlight] = (numSelected === rowCount || numSelected === length) && (rowCount && length),
76
+ _b[classes.lighthighlight] = numSelected > 0 && numSelected < rowCount,
77
+ _b)) },
78
+ enableDrag && react_1.default.createElement(core_1.TableCell, { padding: 'checkbox' }),
79
+ enableCheck && react_1.default.createElement(core_1.TableCell, { padding: 'checkbox' },
80
+ react_1.default.createElement(core_1.Checkbox, { disabled: !length, indeterminate: method ? (numSelected > 0 && numSelected < rowCount) : (numSelected > 0 && numSelected < length), checked: method ? (rowCount > 0 && numSelected === rowCount) : (rowCount > 0 && length && numSelected === length), onChange: handleSelectAllClick })),
81
+ lodash_1.isArray(head) && head.map(function (item, i) { return (react_1.default.createElement(core_1.TableCell, { key: i, style: headerColumnStyles ? headerColumnStyles[i] : undefined }, (disableSorting[i] || (ordCols && !ordCols[i])) ?
82
+ item
83
+ :
84
+ react_1.default.createElement(core_1.TableSortLabel, { active: orderBy === i, direction: orderBy === i ? order : 'asc', onClick: function () { return handleRequestSort(i); } },
85
+ item,
86
+ orderBy === i ? (react_1.default.createElement("span", { className: classes.visuallyHidden }, order === 'desc' ? 'sorted descending' : 'sorted ascending')) : null))); }))));
87
+ });
88
+ exports.default = ArgousComplexTableHead;
@@ -0,0 +1,2 @@
1
+ export { default } from './ArgousComplexTableHead';
2
+ export * from './ArgousComplexTableHead';
@@ -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 ArgousComplexTableHead_1 = require("./ArgousComplexTableHead");
8
+ Object.defineProperty(exports, "default", { enumerable: true, get: function () { return __importDefault(ArgousComplexTableHead_1).default; } });
@@ -0,0 +1,58 @@
1
+ import * as React from 'react';
2
+ import { IconType } from 'react-icons';
3
+
4
+ declare interface ActionsFunction {
5
+ /**
6
+ * @param identificador - Array com todos os itens que foram selecionados
7
+ *
8
+ * @returns {void} Sem retorno
9
+ */
10
+ (identificador: Array<any>): void
11
+ }
12
+
13
+ export interface ArgousComplexTableToolBarProps {
14
+ /**
15
+ * Recebe um array com as ações para a tabela, cada item do array deve ser outro array
16
+ * com três itens na seguinte ordem:
17
+ *
18
+ * @param icone - Icone, do react icons, que ficará visivel na action
19
+ * @param title - Texto que aparecerá ao passar o mouse por cima do icone
20
+ * @param callback - Funcao q será chamada ao clicar no icone, ela pode receber como parametros os itens selecioandos na lista
21
+ */
22
+ actions?: Array<Array<IconType | string | ActionsFunction>>,
23
+ /**
24
+ * Titulo que aparecerá acima da tabela
25
+ */
26
+ title?: string,
27
+ /**
28
+ * Desabilita o filtro
29
+ */
30
+ disableFilter?: boolean,
31
+ /**
32
+ * Label a ser aplicado ao filtro
33
+ */
34
+ filterLabel?: string,
35
+ /**
36
+ * Deixa a barra de ferramentas fixa sempre ativa
37
+ */
38
+ fixedToolbar?: boolean,
39
+ }
40
+
41
+ export interface ArgousComplexTableToolBarPrivateProps extends ArgousComplexTableToolBarProps {
42
+ /**
43
+ * Quantidade de itens selecionados
44
+ */
45
+ numSelected: number,
46
+ /**
47
+ * Lista com os itens da tabela
48
+ */
49
+ lista: Array<Array<any> | Object>,
50
+ /**
51
+ * Ìndice da linha original a ser utilizado como ID primário na hora das seleções e que será retornado pelas actions
52
+ */
53
+ indexToSelect?: number | string,
54
+ }
55
+
56
+ declare function ArgousComplexTableToolBar(props: ArgousComplexTableToolBarPrivateProps): JSX.Element
57
+
58
+ export default ArgousComplexTableToolBar;
@@ -0,0 +1,70 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
5
+ }) : (function(o, m, k, k2) {
6
+ if (k2 === undefined) k2 = k;
7
+ o[k2] = m[k];
8
+ }));
9
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
10
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
11
+ }) : function(o, v) {
12
+ o["default"] = v;
13
+ });
14
+ var __importStar = (this && this.__importStar) || function (mod) {
15
+ if (mod && mod.__esModule) return mod;
16
+ var result = {};
17
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
18
+ __setModuleDefault(result, mod);
19
+ return result;
20
+ };
21
+ var __importDefault = (this && this.__importDefault) || function (mod) {
22
+ return (mod && mod.__esModule) ? mod : { "default": mod };
23
+ };
24
+ Object.defineProperty(exports, "__esModule", { value: true });
25
+ var ArgousComplexTable_1 = require("../ArgousComplexTable/ArgousComplexTable");
26
+ var core_1 = require("@material-ui/core");
27
+ var clsx_1 = __importDefault(require("clsx"));
28
+ var lodash_1 = require("lodash");
29
+ var react_1 = __importStar(require("react"));
30
+ var useStyles = core_1.makeStyles(function (theme) { return ({
31
+ toolbar: {
32
+ minHeight: 0,
33
+ paddingLeft: theme.spacing(2),
34
+ paddingRight: theme.spacing(1),
35
+ },
36
+ highlight: {
37
+ color: theme.palette.type === 'light' ? theme.palette.secondary.main : theme.palette.text.primary,
38
+ backgroundColor: core_1.alpha(theme.palette.secondary.main, theme.palette.action.selectedOpacity * 2)
39
+ },
40
+ title: {
41
+ flex: '1 1 100%',
42
+ lineHeight: '50px'
43
+ }
44
+ }); });
45
+ var ArgousComplexTableToolBar = react_1.memo(function (_a) {
46
+ var _b;
47
+ var numSelected = _a.numSelected, actions = _a.actions, title = _a.title, disableFilter = _a.disableFilter, filterLabel = _a.filterLabel, lista = _a.lista, indexToSelect = _a.indexToSelect, fixedToolbar = _a.fixedToolbar;
48
+ var classes = useStyles();
49
+ var _c = react_1.useContext(ArgousComplexTable_1.TableContext), selected = _c.selected, dispatch = _c.dispatch;
50
+ var filterTime = react_1.useRef();
51
+ var handleChange = function (e) {
52
+ var value = e.target.value;
53
+ clearTimeout(filterTime.current);
54
+ filterTime.current = setTimeout(function () {
55
+ dispatch({ type: 'setFilter', value: value });
56
+ }, 300);
57
+ };
58
+ return (react_1.default.createElement(core_1.Toolbar, { className: clsx_1.default(classes.toolbar, (_b = {}, _b[classes.highlight] = numSelected > 0, _b)) },
59
+ numSelected > 0 ? (react_1.default.createElement(core_1.Typography, { className: classes.title, color: 'inherit', variant: 'subtitle1', component: 'div' },
60
+ numSelected,
61
+ " ",
62
+ numSelected === 1 ? 'selecionado' : 'selecionados')) : react_1.default.createElement(core_1.Grid, { container: true, spacing: 2, style: { marginRight: 0 } },
63
+ title && react_1.default.createElement(core_1.Grid, { item: true, xs: true, style: { display: 'flex', alignItems: 'center' } },
64
+ react_1.default.createElement(core_1.Typography, { className: classes.title, variant: 'h6', component: 'div' }, title)),
65
+ !disableFilter && react_1.default.createElement(core_1.Grid, { item: true, xs: true },
66
+ react_1.default.createElement(core_1.TextField, { label: filterLabel, fullWidth: true, margin: 'dense', variant: 'outlined', onChange: handleChange }))),
67
+ (fixedToolbar || numSelected > 0) && lodash_1.isArray(actions) && actions.map(function (action, i) { return (react_1.default.createElement(core_1.Tooltip, { key: i, title: action[0] },
68
+ react_1.default.createElement(core_1.IconButton, { onClick: function (e) { return action[2](selected, e, lista.filter(function (linha) { return selected.indexOf(linha[indexToSelect]) > -1; })); } }, action[1]))); })));
69
+ });
70
+ exports.default = ArgousComplexTableToolBar;
@@ -0,0 +1,2 @@
1
+ export { default } from './ArgousComplexTableToolBar';
2
+ export * from './ArgousComplexTableToolBar';
@@ -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 ArgousComplexTableToolBar_1 = require("./ArgousComplexTableToolBar");
8
+ Object.defineProperty(exports, "default", { enumerable: true, get: function () { return __importDefault(ArgousComplexTableToolBar_1).default; } });
@@ -0,0 +1,8 @@
1
+ export interface ArgousInputProps {}
2
+ /**
3
+ * @deprecated
4
+ * @param props
5
+ */
6
+ declare function ArgousInput(props: ArgousInputProps): JSX.Element
7
+
8
+ export default ArgousInput;