argous 1.2.143 → 1.2.146

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.
@@ -190,7 +190,6 @@ var ListboxFavorites = react_1.forwardRef(function (props, ref) {
190
190
  var classes = useStyles();
191
191
  var children = props.children, favoritePage = props.favoritePage, dados = props.dados, setDados = props.setDados, groupHeaderColor = props.groupHeaderColor, groupTitleColor = props.groupTitleColor;
192
192
  var pageNumber = dados.pageNumber, favoritosLength = dados.favoritosLength, direction = dados.direction, slide = dados.slide;
193
- console.log('Listbox', children);
194
193
  function retornaInicio() {
195
194
  switch (pageNumber) {
196
195
  case 1:
@@ -289,20 +288,12 @@ var AutoCompleteFavorites = function (_a) {
289
288
  return __awaiter(this, void 0, void 0, function () {
290
289
  var completo;
291
290
  return __generator(this, function (_a) {
292
- console.log('carimbaLista', lista);
293
291
  completo = [];
294
292
  lista.map(function (arr, index) {
295
293
  index === 0 && favoritePage && setDados(function (v) { return (__assign(__assign({}, v), { favoritosLength: arr.length })); });
296
294
  return arr.map(function (itemArr) { return itemArr.length < itemArr.length + 1 && itemArr.push(groupName[index]); });
297
295
  });
298
- console.log('listaCarimbada', lista);
299
- // lista.forEach(v => {
300
- // for (let item of v.values()) {
301
- // completo.push(item);
302
- // }
303
- // });
304
296
  lista.map(function (v) { return v.map(function (d) { return completo.push(d); }); });
305
- console.log('carimbaLista completo', completo);
306
297
  setDados(function (v) { return (__assign(__assign({}, v), { lista: completo })); });
307
298
  return [2 /*return*/];
308
299
  });
@@ -319,8 +310,6 @@ var AutoCompleteFavorites = function (_a) {
319
310
  return [4 /*yield*/, api_1.serverAction(action, __assign((_a = {}, _a[busca] = valor || inputValue, _a), searchParams), true, pgCode)];
320
311
  case 1:
321
312
  res = _c.sent();
322
- if (res)
323
- console.log('Resposta busca', res);
324
313
  if (!(((_b = res[resposta || 'result']) === null || _b === void 0 ? void 0 : _b.length) > 1)) return [3 /*break*/, 3];
325
314
  return [4 /*yield*/, carimbaLista(res[resposta || 'result'])];
326
315
  case 2:
@@ -341,7 +330,6 @@ var AutoCompleteFavorites = function (_a) {
341
330
  react_1.useEffect(function () { return buscar(); }, [inputValue, buscar]);
342
331
  // eslint-disable-next-line react-hooks/exhaustive-deps
343
332
  react_1.useEffect(function () { return lodash_1.isString(value) && buscar(value); }, []);
344
- console.log('Lista', dados.lista);
345
333
  return (react_1.default.createElement(lab_1.Autocomplete, __assign({}, props, { value: value, onChange: onChange }, { options: lodash_1.isObject(value) ? dados === null || dados === void 0 ? void 0 : dados.lista.filter(function (v) { return filterFunction ? filterFunction(v, value) : true || v[0] !== value[0]; }) : dados === null || dados === void 0 ? void 0 : dados.lista, getOptionLabel: getOptionLabel && (function (option) { return getOptionLabel(option, dados === null || dados === void 0 ? void 0 : dados.lista); }), noOptionsText: inputValue.length < 2 ? 'Digite para pesquisar' : 'Não Encontrado', onInputChange: function (e) { var _a; return setInputValue(((_a = e === null || e === void 0 ? void 0 : e.target) === null || _a === void 0 ? void 0 : _a.value) || ''); }, getOptionSelected: function (o, v) { return o[0] === v; }, autoComplete: true, autoHighlight: true, openText: 'Abrir', clearText: 'Limpar', filterSelectedOptions: true, renderInput: function (params) { return (react_1.default.createElement(core_1.TextField, __assign({ margin: 'dense', variant: 'outlined', label: label }, params, textFieldProps, { InputProps: __assign(__assign(__assign({}, textFieldProps.InputProps), params.InputProps), { endAdornment: (react_1.default.createElement(react_1.default.Fragment, null,
346
334
  params.InputProps.endAdornment,
347
335
  react_1.default.createElement(core_1.Fade, { in: loading },
@@ -45,12 +45,22 @@ var fa_1 = require("react-icons/fa");
45
45
  var md_1 = require("react-icons/md");
46
46
  var useStyles = core_1.makeStyles(function (theme) { return ({
47
47
  root: {
48
+ zIndex: 0,
48
49
  margin: '-11px',
49
50
  marginBottom: 0,
51
+ overflow: 'auto',
50
52
  width: 'calc(100% + 22px)',
51
- zIndex: 0,
52
53
  paddingRight: theme.spacing(2),
53
- paddingLeft: theme.spacing(2)
54
+ paddingLeft: theme.spacing(2),
55
+ '&::-webkit-scrollbar': {
56
+ width: 5
57
+ },
58
+ '&::-webkit-scrollbar-track': {
59
+ background: '#0000'
60
+ },
61
+ '&::-webkit-scrollbar-thumb': {
62
+ background: theme.palette.type === 'light' ? 'rgba(0, 0, 0, 0.1)' : 'rgba(255, 255, 255, 0.1)'
63
+ }
54
64
  },
55
65
  menuButton: {
56
66
  marginRight: theme.spacing(2),
@@ -112,8 +112,6 @@ const ListboxFavorites = forwardRef((props, ref) => {
112
112
  const { children, favoritePage, dados, setDados, groupHeaderColor, groupTitleColor } = props;
113
113
  const { pageNumber, favoritosLength, direction, slide } = dados;
114
114
 
115
- console.log('Listbox', children);
116
-
117
115
  function retornaInicio() {
118
116
  switch (pageNumber) {
119
117
  case 1:
@@ -229,27 +227,18 @@ const AutoCompleteFavorites = ({ action, busca, resposta, label, value, pgCode,
229
227
  const [inputValue, setInputValue] = useState('');
230
228
 
231
229
  async function carimbaLista(lista) {
232
- console.log('carimbaLista', lista);
233
230
  let completo = [];
234
231
  lista.map((arr, index) => {
235
232
  index === 0 && favoritePage && setDados(v => ({ ...v, favoritosLength: arr.length }));
236
233
  return arr.map(itemArr => itemArr.length < itemArr.length + 1 && itemArr.push(groupName[index]));
237
234
  });
238
- console.log('listaCarimbada', lista);
239
- // lista.forEach(v => {
240
- // for (let item of v.values()) {
241
- // completo.push(item);
242
- // }
243
- // });
244
235
  lista.map(v => v.map(d => completo.push(d)));
245
- console.log('carimbaLista completo', completo);
246
236
  setDados(v => ({ ...v, lista: completo }));
247
237
  }
248
238
 
249
239
  const buscar = useCallback(async valor => {
250
240
  setLoading(true);
251
241
  const res = await serverAction(action, { [busca]: valor || inputValue, ...searchParams }, true, pgCode);
252
- if (res) console.log('Resposta busca', res);
253
242
  if (res[resposta || 'result']?.length > 1) await carimbaLista(res[resposta || 'result']);
254
243
  else if (res[resposta || 'result']) setDados({ lista: res[resposta || 'result'] || [] });
255
244
  else setError('Erro ao tentar buscar dados.');
@@ -261,8 +250,6 @@ const AutoCompleteFavorites = ({ action, busca, resposta, label, value, pgCode,
261
250
  // eslint-disable-next-line react-hooks/exhaustive-deps
262
251
  useEffect(() => isString(value) && buscar(value), []);
263
252
 
264
- console.log('Lista', dados.lista);
265
-
266
253
  return (
267
254
  <Autocomplete
268
255
  {...props}
@@ -11,12 +11,22 @@ import { MdShare, MdFormatListBulleted, MdArrowBack, MdEdit, MdDelete, MdSave, M
11
11
 
12
12
  const useStyles = makeStyles(theme => ({
13
13
  root: {
14
+ zIndex: 0,
14
15
  margin: '-11px',
15
16
  marginBottom: 0,
17
+ overflow: 'auto',
16
18
  width: 'calc(100% + 22px)',
17
- zIndex: 0,
18
19
  paddingRight: theme.spacing(2),
19
- paddingLeft: theme.spacing(2)
20
+ paddingLeft: theme.spacing(2),
21
+ '&::-webkit-scrollbar': {
22
+ width: 5
23
+ },
24
+ '&::-webkit-scrollbar-track': {
25
+ background: '#0000'
26
+ },
27
+ '&::-webkit-scrollbar-thumb': {
28
+ background: theme.palette.type === 'light' ? 'rgba(0, 0, 0, 0.1)' : 'rgba(255, 255, 255, 0.1)'
29
+ }
20
30
  },
21
31
  menuButton: {
22
32
  marginRight: theme.spacing(2),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "argous",
3
- "version": "1.2.143",
3
+ "version": "1.2.146",
4
4
  "description": "Argous.",
5
5
  "main": "lib/index.js",
6
6
  "author": "Carlos Schneider",