next-recomponents 1.9.51 → 1.9.52
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/index.js +9 -10
- package/dist/index.mjs +9 -10
- package/package.json +1 -1
- package/src/table3/body.tsx +9 -10
package/dist/index.js
CHANGED
|
@@ -46056,15 +46056,7 @@ function TableBody({
|
|
|
46056
46056
|
sort
|
|
46057
46057
|
}) {
|
|
46058
46058
|
const [selected, setSelected] = (0, import_react35.useState)(-1);
|
|
46059
|
-
const sorted = Object.entries(objectData).
|
|
46060
|
-
var _a;
|
|
46061
|
-
return ((_a = objectData[id3]) == null ? void 0 : _a._visible) === true;
|
|
46062
|
-
}).filter((_id, key) => {
|
|
46063
|
-
if (!maxItems || maxItems == Infinity) return true;
|
|
46064
|
-
const start = (page - 1) * maxItems;
|
|
46065
|
-
const end = page * maxItems;
|
|
46066
|
-
return key >= start && key < end;
|
|
46067
|
-
}).sort(([, a], [, b]) => {
|
|
46059
|
+
const sorted = Object.entries(objectData).sort(([, a], [, b]) => {
|
|
46068
46060
|
for (const [key, order] of Object.entries(
|
|
46069
46061
|
sort || { id: "desc", _id: "desc" }
|
|
46070
46062
|
)) {
|
|
@@ -46075,6 +46067,14 @@ function TableBody({
|
|
|
46075
46067
|
return order === "desc" ? -comparison : comparison;
|
|
46076
46068
|
}
|
|
46077
46069
|
return 0;
|
|
46070
|
+
}).filter(([id3, row]) => {
|
|
46071
|
+
var _a;
|
|
46072
|
+
return ((_a = objectData[id3]) == null ? void 0 : _a._visible) === true;
|
|
46073
|
+
}).filter((_id, key) => {
|
|
46074
|
+
if (!maxItems || maxItems == Infinity) return true;
|
|
46075
|
+
const start = (page - 1) * maxItems;
|
|
46076
|
+
const end = page * maxItems;
|
|
46077
|
+
return key >= start && key < end;
|
|
46078
46078
|
}).map(([id3, k], index) => {
|
|
46079
46079
|
const row = objectData[id3];
|
|
46080
46080
|
return /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
|
|
@@ -46100,7 +46100,6 @@ function TableBody({
|
|
|
46100
46100
|
id3
|
|
46101
46101
|
);
|
|
46102
46102
|
});
|
|
46103
|
-
console.log(sorted);
|
|
46104
46103
|
return /* @__PURE__ */ (0, import_jsx_runtime31.jsx)("tbody", { children: sorted });
|
|
46105
46104
|
}
|
|
46106
46105
|
|
package/dist/index.mjs
CHANGED
|
@@ -46053,15 +46053,7 @@ function TableBody({
|
|
|
46053
46053
|
sort
|
|
46054
46054
|
}) {
|
|
46055
46055
|
const [selected, setSelected] = useState13(-1);
|
|
46056
|
-
const sorted = Object.entries(objectData).
|
|
46057
|
-
var _a;
|
|
46058
|
-
return ((_a = objectData[id3]) == null ? void 0 : _a._visible) === true;
|
|
46059
|
-
}).filter((_id, key) => {
|
|
46060
|
-
if (!maxItems || maxItems == Infinity) return true;
|
|
46061
|
-
const start = (page - 1) * maxItems;
|
|
46062
|
-
const end = page * maxItems;
|
|
46063
|
-
return key >= start && key < end;
|
|
46064
|
-
}).sort(([, a], [, b]) => {
|
|
46056
|
+
const sorted = Object.entries(objectData).sort(([, a], [, b]) => {
|
|
46065
46057
|
for (const [key, order] of Object.entries(
|
|
46066
46058
|
sort || { id: "desc", _id: "desc" }
|
|
46067
46059
|
)) {
|
|
@@ -46072,6 +46064,14 @@ function TableBody({
|
|
|
46072
46064
|
return order === "desc" ? -comparison : comparison;
|
|
46073
46065
|
}
|
|
46074
46066
|
return 0;
|
|
46067
|
+
}).filter(([id3, row]) => {
|
|
46068
|
+
var _a;
|
|
46069
|
+
return ((_a = objectData[id3]) == null ? void 0 : _a._visible) === true;
|
|
46070
|
+
}).filter((_id, key) => {
|
|
46071
|
+
if (!maxItems || maxItems == Infinity) return true;
|
|
46072
|
+
const start = (page - 1) * maxItems;
|
|
46073
|
+
const end = page * maxItems;
|
|
46074
|
+
return key >= start && key < end;
|
|
46075
46075
|
}).map(([id3, k], index) => {
|
|
46076
46076
|
const row = objectData[id3];
|
|
46077
46077
|
return /* @__PURE__ */ jsx30(
|
|
@@ -46097,7 +46097,6 @@ function TableBody({
|
|
|
46097
46097
|
id3
|
|
46098
46098
|
);
|
|
46099
46099
|
});
|
|
46100
|
-
console.log(sorted);
|
|
46101
46100
|
return /* @__PURE__ */ jsx30("tbody", { children: sorted });
|
|
46102
46101
|
}
|
|
46103
46102
|
|
package/package.json
CHANGED
package/src/table3/body.tsx
CHANGED
|
@@ -36,15 +36,6 @@ export default function TableBody({
|
|
|
36
36
|
}) {
|
|
37
37
|
const [selected, setSelected] = useState(-1);
|
|
38
38
|
const sorted = Object.entries(objectData)
|
|
39
|
-
.filter(([id, row]) => {
|
|
40
|
-
return objectData[id]?._visible === true;
|
|
41
|
-
})
|
|
42
|
-
.filter((_id, key) => {
|
|
43
|
-
if (!maxItems || maxItems == Infinity) return true;
|
|
44
|
-
const start = (page - 1) * maxItems; // ej: 0 en la página 1
|
|
45
|
-
const end = page * maxItems; // ej: 10 en la página 1
|
|
46
|
-
return key >= start && key < end; // 👈 usamos < en vez de <=
|
|
47
|
-
})
|
|
48
39
|
.sort(([, a]: any, [, b]: any) => {
|
|
49
40
|
for (const [key, order] of Object.entries(
|
|
50
41
|
sort || { id: "desc", _id: "desc" }
|
|
@@ -60,6 +51,15 @@ export default function TableBody({
|
|
|
60
51
|
}
|
|
61
52
|
return 0;
|
|
62
53
|
})
|
|
54
|
+
.filter(([id, row]) => {
|
|
55
|
+
return objectData[id]?._visible === true;
|
|
56
|
+
})
|
|
57
|
+
.filter((_id, key) => {
|
|
58
|
+
if (!maxItems || maxItems == Infinity) return true;
|
|
59
|
+
const start = (page - 1) * maxItems; // ej: 0 en la página 1
|
|
60
|
+
const end = page * maxItems; // ej: 10 en la página 1
|
|
61
|
+
return key >= start && key < end; // 👈 usamos < en vez de <=
|
|
62
|
+
})
|
|
63
63
|
.map(([id, k], index) => {
|
|
64
64
|
const row = objectData[id];
|
|
65
65
|
return (
|
|
@@ -87,6 +87,5 @@ export default function TableBody({
|
|
|
87
87
|
);
|
|
88
88
|
});
|
|
89
89
|
|
|
90
|
-
console.log(sorted);
|
|
91
90
|
return <tbody>{sorted}</tbody>;
|
|
92
91
|
}
|