next-recomponents 1.3.8 → 1.4.0
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 +7 -4
- package/dist/index.mjs +7 -4
- package/package.json +1 -1
- package/src/table/h.tsx +2 -2
package/dist/index.js
CHANGED
|
@@ -32001,7 +32001,10 @@ function HTable(_a) {
|
|
|
32001
32001
|
setMapedData(newData);
|
|
32002
32002
|
}, [data]);
|
|
32003
32003
|
const values = (0, import_react25.useMemo)(() => {
|
|
32004
|
-
return mapedData.length > 0 ? mapedData.map((d) => Object.keys(d).map((k) =>
|
|
32004
|
+
return mapedData.length > 0 ? mapedData.map((d) => Object.keys(d).map((k) => {
|
|
32005
|
+
var _a2;
|
|
32006
|
+
return { [k]: (_a2 = d[k]) == null ? void 0 : _a2.content };
|
|
32007
|
+
})).map((d) => Object.assign({}, ...d)) : {};
|
|
32005
32008
|
}, [mapedData]);
|
|
32006
32009
|
return /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(import_jsx_runtime12.Fragment, { children: [
|
|
32007
32010
|
/* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("div", { className: "flex gap-2", children: [
|
|
@@ -32072,10 +32075,10 @@ function HTable(_a) {
|
|
|
32072
32075
|
);
|
|
32073
32076
|
}) }) }),
|
|
32074
32077
|
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)("tbody", { className: "divide-y divide-gray-200", children: mapedData.map((md, trKey) => {
|
|
32075
|
-
var _a2;
|
|
32078
|
+
var _a2, _b2;
|
|
32076
32079
|
const color2 = trKey % 2 == 0 ? "bg-white" : "bg-gray-100";
|
|
32077
32080
|
for (let d in md) {
|
|
32078
|
-
if (md[d].exclude === true) {
|
|
32081
|
+
if (((_a2 = md[d]) == null ? void 0 : _a2.exclude) === true) {
|
|
32079
32082
|
return null;
|
|
32080
32083
|
}
|
|
32081
32084
|
}
|
|
@@ -32110,7 +32113,7 @@ function HTable(_a) {
|
|
|
32110
32113
|
);
|
|
32111
32114
|
})
|
|
32112
32115
|
},
|
|
32113
|
-
((
|
|
32116
|
+
((_b2 = md == null ? void 0 : md.id) == null ? void 0 : _b2.content) || trKey
|
|
32114
32117
|
);
|
|
32115
32118
|
}) }),
|
|
32116
32119
|
totals && /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("tfoot", { className: "bg-gray-800 text-white", children: /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("tr", { children: head.map((h, fkey) => {
|
package/dist/index.mjs
CHANGED
|
@@ -31991,7 +31991,10 @@ function HTable(_a) {
|
|
|
31991
31991
|
setMapedData(newData);
|
|
31992
31992
|
}, [data]);
|
|
31993
31993
|
const values = useMemo7(() => {
|
|
31994
|
-
return mapedData.length > 0 ? mapedData.map((d) => Object.keys(d).map((k) =>
|
|
31994
|
+
return mapedData.length > 0 ? mapedData.map((d) => Object.keys(d).map((k) => {
|
|
31995
|
+
var _a2;
|
|
31996
|
+
return { [k]: (_a2 = d[k]) == null ? void 0 : _a2.content };
|
|
31997
|
+
})).map((d) => Object.assign({}, ...d)) : {};
|
|
31995
31998
|
}, [mapedData]);
|
|
31996
31999
|
return /* @__PURE__ */ jsxs9(Fragment4, { children: [
|
|
31997
32000
|
/* @__PURE__ */ jsxs9("div", { className: "flex gap-2", children: [
|
|
@@ -32062,10 +32065,10 @@ function HTable(_a) {
|
|
|
32062
32065
|
);
|
|
32063
32066
|
}) }) }),
|
|
32064
32067
|
/* @__PURE__ */ jsx11("tbody", { className: "divide-y divide-gray-200", children: mapedData.map((md, trKey) => {
|
|
32065
|
-
var _a2;
|
|
32068
|
+
var _a2, _b2;
|
|
32066
32069
|
const color2 = trKey % 2 == 0 ? "bg-white" : "bg-gray-100";
|
|
32067
32070
|
for (let d in md) {
|
|
32068
|
-
if (md[d].exclude === true) {
|
|
32071
|
+
if (((_a2 = md[d]) == null ? void 0 : _a2.exclude) === true) {
|
|
32069
32072
|
return null;
|
|
32070
32073
|
}
|
|
32071
32074
|
}
|
|
@@ -32100,7 +32103,7 @@ function HTable(_a) {
|
|
|
32100
32103
|
);
|
|
32101
32104
|
})
|
|
32102
32105
|
},
|
|
32103
|
-
((
|
|
32106
|
+
((_b2 = md == null ? void 0 : md.id) == null ? void 0 : _b2.content) || trKey
|
|
32104
32107
|
);
|
|
32105
32108
|
}) }),
|
|
32106
32109
|
totals && /* @__PURE__ */ jsx11("tfoot", { className: "bg-gray-800 text-white", children: /* @__PURE__ */ jsx11("tr", { children: head.map((h, fkey) => {
|
package/package.json
CHANGED
package/src/table/h.tsx
CHANGED
|
@@ -81,7 +81,7 @@ export default function HTable({
|
|
|
81
81
|
const values = useMemo(() => {
|
|
82
82
|
return mapedData.length > 0
|
|
83
83
|
? mapedData
|
|
84
|
-
.map((d: any) => Object.keys(d).map((k) => ({ [k]: d[k]
|
|
84
|
+
.map((d: any) => Object.keys(d).map((k) => ({ [k]: d[k]?.content })))
|
|
85
85
|
.map((d) => Object.assign({}, ...d))
|
|
86
86
|
: ({} as any);
|
|
87
87
|
}, [mapedData]);
|
|
@@ -154,7 +154,7 @@ export default function HTable({
|
|
|
154
154
|
{mapedData.map((md: any, trKey: number) => {
|
|
155
155
|
const color = trKey % 2 == 0 ? "bg-white" : "bg-gray-100";
|
|
156
156
|
for (let d in md) {
|
|
157
|
-
if (md[d]
|
|
157
|
+
if (md[d]?.exclude === true) {
|
|
158
158
|
return null;
|
|
159
159
|
}
|
|
160
160
|
}
|