@m4l/components 0.0.41 → 0.0.44
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/DynamicFilter/index.js +0 -17
- package/dist/components/Icon/index.js +0 -2
- package/dist/components/ObjectLogs/index.js +14 -6
- package/dist/components/PropertyValue/index.js +0 -4
- package/dist/components/hook-form/RHFAutocompleteAsync/index.js +0 -1
- package/dist/components/hook-form/RHFUpload.js +0 -1
- package/dist/components/mui_extended/IconButton/index.js +0 -2
- package/dist/components/mui_extended/Pager/index.js +0 -2
- package/package.json +2 -2
|
@@ -152,7 +152,6 @@ function StringFilter() {
|
|
|
152
152
|
setIsLoaded(true);
|
|
153
153
|
}, [getLabel, filter, field]);
|
|
154
154
|
useEffect(() => {
|
|
155
|
-
console.debug("InputRef", inputRef);
|
|
156
155
|
inputRef.current?.focus();
|
|
157
156
|
}, [isLoaded]);
|
|
158
157
|
return /* @__PURE__ */ jsx(WrapperStringFilter$1, {
|
|
@@ -469,7 +468,6 @@ function DateTimeFilter() {
|
|
|
469
468
|
return newFilter;
|
|
470
469
|
}, []);
|
|
471
470
|
useEffect(() => {
|
|
472
|
-
console.debug("useEffect Datetime", isLoaded, filter?.o1, filter?.o2);
|
|
473
471
|
if (!isLoaded) {
|
|
474
472
|
setPoupEditValidationSchema({
|
|
475
473
|
valueOperator: Yup.object().nullable().required(getLabel(`operator_required`)),
|
|
@@ -616,11 +614,9 @@ function NumberFilter() {
|
|
|
616
614
|
valueOperand1: Yup.number().typeError(getLabel(`dynamic_filter.error_operand_mustbe_number`)),
|
|
617
615
|
valueOperand2: Yup.string().when("valueOperator", {
|
|
618
616
|
is: (o) => {
|
|
619
|
-
console.log("valueOperand2", o);
|
|
620
617
|
return o.id === "b";
|
|
621
618
|
},
|
|
622
619
|
then: Yup.string().test("DOB", getLabel(`dynamic_filter.error_operand_mustbe_number`), (value) => {
|
|
623
|
-
console.log("imprimir", value);
|
|
624
620
|
if (value === "")
|
|
625
621
|
return false;
|
|
626
622
|
return !isNaN(Number(value));
|
|
@@ -642,7 +638,6 @@ function NumberFilter() {
|
|
|
642
638
|
setIsLoaded(true);
|
|
643
639
|
}, [getLabel, filter, field]);
|
|
644
640
|
useEffect(() => {
|
|
645
|
-
console.debug("InputRef", inputRef);
|
|
646
641
|
inputRef.current?.focus();
|
|
647
642
|
}, [isLoaded]);
|
|
648
643
|
return /* @__PURE__ */ jsx(WrapperStringFilter, {
|
|
@@ -1000,7 +995,6 @@ function BaseProvider(props) {
|
|
|
1000
995
|
const setFnTransformFormValuesIntoValues = useCallback((fn) => {
|
|
1001
996
|
setInternalfnTransormFormValuesIntoRawValues(() => fn);
|
|
1002
997
|
}, []);
|
|
1003
|
-
console.log("popupData value", popupData);
|
|
1004
998
|
return /* @__PURE__ */ jsx(BaseContext.Provider, {
|
|
1005
999
|
value: {
|
|
1006
1000
|
isSkeleton,
|
|
@@ -1091,7 +1085,6 @@ function ApplyedFilter(props) {
|
|
|
1091
1085
|
labelOperator,
|
|
1092
1086
|
labelOperands
|
|
1093
1087
|
} = props;
|
|
1094
|
-
console.log("props ApplyedFilter ", props);
|
|
1095
1088
|
const {
|
|
1096
1089
|
removeFilter,
|
|
1097
1090
|
showPopupForEditFilter,
|
|
@@ -1103,11 +1096,9 @@ function ApplyedFilter(props) {
|
|
|
1103
1096
|
host_static_assets,
|
|
1104
1097
|
environment_assets
|
|
1105
1098
|
} = useEnvironment();
|
|
1106
|
-
console.log("fieldName by ApplyedFilter 1", getFieldByName(fieldName));
|
|
1107
1099
|
const field = useMemo(() => {
|
|
1108
1100
|
return getFieldByName(fieldName);
|
|
1109
1101
|
}, [getFieldByName]);
|
|
1110
|
-
console.log("fieldName by ApplyedFilter 2", field);
|
|
1111
1102
|
const urlIcon = useMemo(() => {
|
|
1112
1103
|
if (!field)
|
|
1113
1104
|
return;
|
|
@@ -1116,7 +1107,6 @@ function ApplyedFilter(props) {
|
|
|
1116
1107
|
}
|
|
1117
1108
|
return "";
|
|
1118
1109
|
}, [field]);
|
|
1119
|
-
console.log("urlIcon value", urlIcon);
|
|
1120
1110
|
const onDelete = () => {
|
|
1121
1111
|
hidePopupEdit(false);
|
|
1122
1112
|
removeFilter(id);
|
|
@@ -1206,7 +1196,6 @@ const ClearFilters = () => {
|
|
|
1206
1196
|
})
|
|
1207
1197
|
});
|
|
1208
1198
|
}
|
|
1209
|
-
console.log("Dynamic validation", applyedFilters.findIndex((f) => f.fixed == false) > -1);
|
|
1210
1199
|
if (applyedFilters.findIndex((f) => f.fixed == false) > -1) {
|
|
1211
1200
|
return /* @__PURE__ */ jsx(WrapperClearFilters, {
|
|
1212
1201
|
children: /* @__PURE__ */ jsx(IconButton, {
|
|
@@ -1260,7 +1249,6 @@ function FilterButton() {
|
|
|
1260
1249
|
host_static_assets,
|
|
1261
1250
|
environment_assets
|
|
1262
1251
|
} = useEnvironment();
|
|
1263
|
-
console.log("Render isDirty", isDirty, automatic);
|
|
1264
1252
|
if (isSkeleton) {
|
|
1265
1253
|
return /* @__PURE__ */ jsx(SKTWrapperFilterButton, {
|
|
1266
1254
|
children: /* @__PURE__ */ jsx(Skeleton, {
|
|
@@ -1279,8 +1267,6 @@ function FilterButton() {
|
|
|
1279
1267
|
}
|
|
1280
1268
|
return "selected";
|
|
1281
1269
|
}, [automatic, isValid]);
|
|
1282
|
-
console.log("Dynamic color value", color);
|
|
1283
|
-
console.log("Dynamic automatic value", automatic);
|
|
1284
1270
|
return /* @__PURE__ */ jsx(WrapperFilterButton, {
|
|
1285
1271
|
id: "WrapperFilterButton",
|
|
1286
1272
|
className: isDirty && isValid ? "isDirty" : "",
|
|
@@ -1393,11 +1379,9 @@ function InputFilter() {
|
|
|
1393
1379
|
closeMenuFields();
|
|
1394
1380
|
}
|
|
1395
1381
|
};
|
|
1396
|
-
console.log("Render InputFilter");
|
|
1397
1382
|
if (!withAllField && availableFields.length == 0) {
|
|
1398
1383
|
return /* @__PURE__ */ jsx(Fragment, {});
|
|
1399
1384
|
}
|
|
1400
|
-
console.log("availableFields test", availableFields.length);
|
|
1401
1385
|
return /* @__PURE__ */ jsxs(WrapperInputFilter, {
|
|
1402
1386
|
id: "WrapperInputFilter",
|
|
1403
1387
|
children: [/* @__PURE__ */ jsx(StyledInputFilter, {
|
|
@@ -1517,7 +1501,6 @@ const PopupEditFilter = () => {
|
|
|
1517
1501
|
const onClose = () => {
|
|
1518
1502
|
hidePopupEdit(false);
|
|
1519
1503
|
};
|
|
1520
|
-
console.log("Render PopupEditFilter");
|
|
1521
1504
|
return /* @__PURE__ */ jsx(Popper, {
|
|
1522
1505
|
id: "MenuPopover",
|
|
1523
1506
|
open: Boolean(popupAnchorEl),
|
|
@@ -57,14 +57,12 @@ function Icon(props) {
|
|
|
57
57
|
(async function networkOperation() {
|
|
58
58
|
await fetch(src).then((response) => {
|
|
59
59
|
if (mounted) {
|
|
60
|
-
console.log("Icon***", response.body);
|
|
61
60
|
setResource(response.url);
|
|
62
61
|
}
|
|
63
62
|
}).catch((_err) => {
|
|
64
63
|
});
|
|
65
64
|
})();
|
|
66
65
|
return function clenUp() {
|
|
67
|
-
console.log("CleanUP", "Icon");
|
|
68
66
|
mounted = false;
|
|
69
67
|
};
|
|
70
68
|
}, []);
|
|
@@ -178,22 +178,30 @@ function ObjectLogs(props) {
|
|
|
178
178
|
rows,
|
|
179
179
|
onPageChange,
|
|
180
180
|
onRowsPerPageChange,
|
|
181
|
-
clearRows
|
|
181
|
+
clearRows,
|
|
182
|
+
Refresh
|
|
182
183
|
} = usePaginate({
|
|
183
184
|
endPoint: "logs",
|
|
184
|
-
|
|
185
|
+
fireOnChangeParms: false,
|
|
185
186
|
queryParams
|
|
186
187
|
});
|
|
187
188
|
useEffect(() => {
|
|
189
|
+
console.log("useEffect ObjectLogs", object_id);
|
|
188
190
|
clearRows();
|
|
191
|
+
setQueryParams((oldParms) => ({
|
|
192
|
+
...oldParms,
|
|
193
|
+
object_id
|
|
194
|
+
}));
|
|
189
195
|
}, [object_id]);
|
|
190
196
|
const onChangeFilter = useCallback((_initFilters, rawFilters) => {
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
197
|
+
console.log("onChangeFilter", object_id);
|
|
198
|
+
setQueryParams((oldParms) => ({
|
|
199
|
+
...oldParms,
|
|
194
200
|
f: rawFilters
|
|
195
|
-
});
|
|
201
|
+
}));
|
|
202
|
+
Refresh();
|
|
196
203
|
}, [object_id]);
|
|
204
|
+
console.log("Render ObjectLogs", object_id, queryParams);
|
|
197
205
|
return /* @__PURE__ */ jsxs(Container$1, {
|
|
198
206
|
children: [/* @__PURE__ */ jsx(Actions, {
|
|
199
207
|
id: "objectLogsActions",
|
|
@@ -90,7 +90,6 @@ function PropertyValue(props) {
|
|
|
90
90
|
isSkeleton = false
|
|
91
91
|
} = props;
|
|
92
92
|
const isDesktop = useResponsiveDesktop();
|
|
93
|
-
console.log("valueWidth", valueWidth);
|
|
94
93
|
const getValueW = () => {
|
|
95
94
|
if (valueWidth === "75" && isDesktop) {
|
|
96
95
|
return "75";
|
|
@@ -107,12 +106,9 @@ function PropertyValue(props) {
|
|
|
107
106
|
} else if (valueWidth === "25" && !isDesktop || valueWidth === "12.5" && !isDesktop) {
|
|
108
107
|
return (parseFloat(valueWidth) * 2).toString(10);
|
|
109
108
|
}
|
|
110
|
-
console.log("valueWidth in function", valueWidth);
|
|
111
109
|
return "100";
|
|
112
110
|
};
|
|
113
111
|
const valueW = getValueW();
|
|
114
|
-
console.log("valueWidth in function", valueWidth);
|
|
115
|
-
console.log("getValueW", typeof getValueW(), getValueW());
|
|
116
112
|
return /* @__PURE__ */ jsxs(WrapperPropertyValue, {
|
|
117
113
|
id: "ContainerPropertyValue",
|
|
118
114
|
isForm,
|
|
@@ -71,7 +71,6 @@ function IconButton({
|
|
|
71
71
|
getLabel
|
|
72
72
|
} = useModuleDictionary();
|
|
73
73
|
const iconMemo = useMemo(() => {
|
|
74
|
-
console.log("IconButton", size, other, src);
|
|
75
74
|
return /* @__PURE__ */ jsx(Icon, {
|
|
76
75
|
src,
|
|
77
76
|
bgColor: other.disabled ? "disabled" : bgColor
|
|
@@ -83,7 +82,6 @@ function IconButton({
|
|
|
83
82
|
}
|
|
84
83
|
return tooltip;
|
|
85
84
|
}, [dictionaryTooltip, tooltip, getLabel]);
|
|
86
|
-
console.log("icon button test validation disabled", other.disabled ? "disabled" : bgColor);
|
|
87
85
|
if (finalTooltip && !other.disabled) {
|
|
88
86
|
return /* @__PURE__ */ jsx(Tooltip, {
|
|
89
87
|
title: finalTooltip,
|
|
@@ -38,8 +38,6 @@ function PagerActions(props) {
|
|
|
38
38
|
const handleLastPageButtonClick = (event) => {
|
|
39
39
|
onPageChange(event, Math.max(0, Math.ceil(count / rowsPerPage) - 1));
|
|
40
40
|
};
|
|
41
|
-
console.log("validaci\xF3n pager action 1", page === 0);
|
|
42
|
-
console.log("validaci\xF3n pager action 2", page >= Math.ceil(count / rowsPerPage) - 1);
|
|
43
41
|
return /* @__PURE__ */ jsxs(WrapperPagerActions, {
|
|
44
42
|
id: "WrapperPagerActions",
|
|
45
43
|
children: [/* @__PURE__ */ jsx(IconButton, {
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@m4l/components",
|
|
3
3
|
"private": false,
|
|
4
|
-
"version": "0.0.
|
|
4
|
+
"version": "0.0.44",
|
|
5
5
|
"license": "UNLICENSED",
|
|
6
6
|
"scripts": {
|
|
7
7
|
"dev": "vite",
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
"format": "npm run prettier:fix && npm run lint:fix"
|
|
15
15
|
},
|
|
16
16
|
"dependencies": {
|
|
17
|
-
"@m4l/graphics": "^0.0.
|
|
17
|
+
"@m4l/graphics": "^0.0.31",
|
|
18
18
|
"react": "^17.0.0 || 18.x",
|
|
19
19
|
"react-dom": "^18.0.0",
|
|
20
20
|
"react-draggable": "^4.4.5"
|