argous 1.2.142 → 1.2.145
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/AutoCompleteFavorites/AutoCompleteFavorites.js +1 -12
- package/dist/components/BarraFerramentas/BarraFerramentas.js +3 -2
- package/lib/components/AutoCompleteFavorites/AutoCompleteFavorites.js +1 -12
- package/lib/components/BarraFerramentas/BarraFerramentas.js +3 -2
- package/package.json +1 -1
|
@@ -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,19 +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
|
-
lista.
|
|
299
|
-
for (var _i = 0, _a = v.values(); _i < _a.length; _i++) {
|
|
300
|
-
var item = _a[_i];
|
|
301
|
-
completo.push(item);
|
|
302
|
-
}
|
|
303
|
-
});
|
|
304
|
-
console.log('carimbaLista completo', completo);
|
|
296
|
+
lista.map(function (v) { return v.map(function (d) { return completo.push(d); }); });
|
|
305
297
|
setDados(function (v) { return (__assign(__assign({}, v), { lista: completo })); });
|
|
306
298
|
return [2 /*return*/];
|
|
307
299
|
});
|
|
@@ -318,8 +310,6 @@ var AutoCompleteFavorites = function (_a) {
|
|
|
318
310
|
return [4 /*yield*/, api_1.serverAction(action, __assign((_a = {}, _a[busca] = valor || inputValue, _a), searchParams), true, pgCode)];
|
|
319
311
|
case 1:
|
|
320
312
|
res = _c.sent();
|
|
321
|
-
if (res)
|
|
322
|
-
console.log('Resposta busca', res);
|
|
323
313
|
if (!(((_b = res[resposta || 'result']) === null || _b === void 0 ? void 0 : _b.length) > 1)) return [3 /*break*/, 3];
|
|
324
314
|
return [4 /*yield*/, carimbaLista(res[resposta || 'result'])];
|
|
325
315
|
case 2:
|
|
@@ -340,7 +330,6 @@ var AutoCompleteFavorites = function (_a) {
|
|
|
340
330
|
react_1.useEffect(function () { return buscar(); }, [inputValue, buscar]);
|
|
341
331
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
342
332
|
react_1.useEffect(function () { return lodash_1.isString(value) && buscar(value); }, []);
|
|
343
|
-
console.log('Lista', dados.lista);
|
|
344
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,
|
|
345
334
|
params.InputProps.endAdornment,
|
|
346
335
|
react_1.default.createElement(core_1.Fade, { in: loading },
|
|
@@ -45,12 +45,13 @@ 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),
|
|
54
55
|
},
|
|
55
56
|
menuButton: {
|
|
56
57
|
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,25 +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
|
-
lista.
|
|
239
|
-
for (let item of v.values()) {
|
|
240
|
-
completo.push(item);
|
|
241
|
-
}
|
|
242
|
-
});
|
|
243
|
-
console.log('carimbaLista completo', completo);
|
|
235
|
+
lista.map(v => v.map(d => completo.push(d)));
|
|
244
236
|
setDados(v => ({ ...v, lista: completo }));
|
|
245
237
|
}
|
|
246
238
|
|
|
247
239
|
const buscar = useCallback(async valor => {
|
|
248
240
|
setLoading(true);
|
|
249
241
|
const res = await serverAction(action, { [busca]: valor || inputValue, ...searchParams }, true, pgCode);
|
|
250
|
-
if (res) console.log('Resposta busca', res);
|
|
251
242
|
if (res[resposta || 'result']?.length > 1) await carimbaLista(res[resposta || 'result']);
|
|
252
243
|
else if (res[resposta || 'result']) setDados({ lista: res[resposta || 'result'] || [] });
|
|
253
244
|
else setError('Erro ao tentar buscar dados.');
|
|
@@ -259,8 +250,6 @@ const AutoCompleteFavorites = ({ action, busca, resposta, label, value, pgCode,
|
|
|
259
250
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
260
251
|
useEffect(() => isString(value) && buscar(value), []);
|
|
261
252
|
|
|
262
|
-
console.log('Lista', dados.lista);
|
|
263
|
-
|
|
264
253
|
return (
|
|
265
254
|
<Autocomplete
|
|
266
255
|
{...props}
|
|
@@ -11,12 +11,13 @@ 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),
|
|
20
21
|
},
|
|
21
22
|
menuButton: {
|
|
22
23
|
marginRight: theme.spacing(2),
|