next-recomponents 2.0.50 → 2.0.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 -6
- package/dist/index.mjs +9 -6
- package/package.json +1 -1
- package/src/container/index.tsx +4 -3
- package/src/table-advanced/h.table.tsx +35 -35
package/dist/index.js
CHANGED
|
@@ -3694,13 +3694,14 @@ function Container({
|
|
|
3694
3694
|
{ location: "/", name: "Home", icon: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(HomeIcon, {}) },
|
|
3695
3695
|
...navItems
|
|
3696
3696
|
].map((li, k) => {
|
|
3697
|
+
const icono = menuList == null ? void 0 : menuList.find((m) => m.location == li.location);
|
|
3697
3698
|
return li && /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(
|
|
3698
3699
|
import_link.default,
|
|
3699
3700
|
{
|
|
3700
3701
|
href: li.location,
|
|
3701
3702
|
className: "flex gap-1 p-1 items-center",
|
|
3702
3703
|
children: [
|
|
3703
|
-
li.icon,
|
|
3704
|
+
(li == null ? void 0 : li.icon) || icono,
|
|
3704
3705
|
li.name
|
|
3705
3706
|
]
|
|
3706
3707
|
},
|
|
@@ -3745,11 +3746,11 @@ function Container({
|
|
|
3745
3746
|
{
|
|
3746
3747
|
href: (itemMenu == null ? void 0 : itemMenu.location) || "#",
|
|
3747
3748
|
children: [
|
|
3748
|
-
isSidebarOpen && /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)("div", { className: "text-sm flex
|
|
3749
|
+
isSidebarOpen && /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)("div", { className: "text-sm flex items-center hover:bg-gray-200 hover:text-black rounded p-1", children: [
|
|
3749
3750
|
icon,
|
|
3750
3751
|
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)("div", { className: " truncate", children: itemMenu == null ? void 0 : itemMenu.name })
|
|
3751
3752
|
] }),
|
|
3752
|
-
!isSidebarOpen && /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("div", { className: "text-sm hover:bg-gray-200 hover:text-black rounded p-1", children: icon })
|
|
3753
|
+
!isSidebarOpen && /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("div", { className: "text-sm flex hover:bg-gray-200 hover:text-black rounded p-1", children: icon })
|
|
3753
3754
|
]
|
|
3754
3755
|
}
|
|
3755
3756
|
) }, k);
|
|
@@ -39435,8 +39436,10 @@ function HTable({
|
|
|
39435
39436
|
);
|
|
39436
39437
|
});
|
|
39437
39438
|
}),
|
|
39438
|
-
Object.keys((context == null ? void 0 : context.footer) || {}).length > 0 && headers.
|
|
39439
|
-
var _a;
|
|
39439
|
+
Object.keys((context == null ? void 0 : context.footer) || {}).length > 0 && headers.map((header) => {
|
|
39440
|
+
var _a, _b, _c;
|
|
39441
|
+
if ((_b = (_a = context == null ? void 0 : context.hideColumns) == null ? void 0 : _a.includes) == null ? void 0 : _b.call(_a, header)) return null;
|
|
39442
|
+
if (header.startsWith("_") && !header.startsWith("__")) return null;
|
|
39440
39443
|
return /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
|
|
39441
39444
|
"div",
|
|
39442
39445
|
{
|
|
@@ -39447,7 +39450,7 @@ function HTable({
|
|
|
39447
39450
|
className: "border-b font-bold bg-white flex items-center justify-center",
|
|
39448
39451
|
children: valueFormatter({
|
|
39449
39452
|
currentCoin: context.currentCoin,
|
|
39450
|
-
value: ((
|
|
39453
|
+
value: ((_c = context.footer) == null ? void 0 : _c[header]) ? context.footer[header] == "sum" ? context.filteredData.map((d) => +d[header]).reduce((acc, h) => h + acc, 0) : context.footer[header] == "count" ? context.filteredData.map((d) => d[header] != "" ? 1 : 0).reduce((acc, h) => acc + h, 0) : context.footer[header] == "avg" ? context.filteredData.map((d) => +d[header]).reduce((acc, h) => h + acc, 0) / context.filteredData.map((d) => d[header] != "" ? 1 : 0).reduce((acc, h) => acc + h, 0) : "" : ""
|
|
39451
39454
|
})
|
|
39452
39455
|
},
|
|
39453
39456
|
header
|
package/dist/index.mjs
CHANGED
|
@@ -3668,13 +3668,14 @@ function Container({
|
|
|
3668
3668
|
{ location: "/", name: "Home", icon: /* @__PURE__ */ jsx3(HomeIcon, {}) },
|
|
3669
3669
|
...navItems
|
|
3670
3670
|
].map((li, k) => {
|
|
3671
|
+
const icono = menuList == null ? void 0 : menuList.find((m) => m.location == li.location);
|
|
3671
3672
|
return li && /* @__PURE__ */ jsxs2(
|
|
3672
3673
|
import_link.default,
|
|
3673
3674
|
{
|
|
3674
3675
|
href: li.location,
|
|
3675
3676
|
className: "flex gap-1 p-1 items-center",
|
|
3676
3677
|
children: [
|
|
3677
|
-
li.icon,
|
|
3678
|
+
(li == null ? void 0 : li.icon) || icono,
|
|
3678
3679
|
li.name
|
|
3679
3680
|
]
|
|
3680
3681
|
},
|
|
@@ -3719,11 +3720,11 @@ function Container({
|
|
|
3719
3720
|
{
|
|
3720
3721
|
href: (itemMenu == null ? void 0 : itemMenu.location) || "#",
|
|
3721
3722
|
children: [
|
|
3722
|
-
isSidebarOpen && /* @__PURE__ */ jsxs2("div", { className: "text-sm flex
|
|
3723
|
+
isSidebarOpen && /* @__PURE__ */ jsxs2("div", { className: "text-sm flex items-center hover:bg-gray-200 hover:text-black rounded p-1", children: [
|
|
3723
3724
|
icon,
|
|
3724
3725
|
/* @__PURE__ */ jsx3("div", { className: " truncate", children: itemMenu == null ? void 0 : itemMenu.name })
|
|
3725
3726
|
] }),
|
|
3726
|
-
!isSidebarOpen && /* @__PURE__ */ jsx3("div", { className: "text-sm hover:bg-gray-200 hover:text-black rounded p-1", children: icon })
|
|
3727
|
+
!isSidebarOpen && /* @__PURE__ */ jsx3("div", { className: "text-sm flex hover:bg-gray-200 hover:text-black rounded p-1", children: icon })
|
|
3727
3728
|
]
|
|
3728
3729
|
}
|
|
3729
3730
|
) }, k);
|
|
@@ -39433,8 +39434,10 @@ function HTable({
|
|
|
39433
39434
|
);
|
|
39434
39435
|
});
|
|
39435
39436
|
}),
|
|
39436
|
-
Object.keys((context == null ? void 0 : context.footer) || {}).length > 0 && headers.
|
|
39437
|
-
var _a;
|
|
39437
|
+
Object.keys((context == null ? void 0 : context.footer) || {}).length > 0 && headers.map((header) => {
|
|
39438
|
+
var _a, _b, _c;
|
|
39439
|
+
if ((_b = (_a = context == null ? void 0 : context.hideColumns) == null ? void 0 : _a.includes) == null ? void 0 : _b.call(_a, header)) return null;
|
|
39440
|
+
if (header.startsWith("_") && !header.startsWith("__")) return null;
|
|
39438
39441
|
return /* @__PURE__ */ jsx33(
|
|
39439
39442
|
"div",
|
|
39440
39443
|
{
|
|
@@ -39445,7 +39448,7 @@ function HTable({
|
|
|
39445
39448
|
className: "border-b font-bold bg-white flex items-center justify-center",
|
|
39446
39449
|
children: valueFormatter({
|
|
39447
39450
|
currentCoin: context.currentCoin,
|
|
39448
|
-
value: ((
|
|
39451
|
+
value: ((_c = context.footer) == null ? void 0 : _c[header]) ? context.footer[header] == "sum" ? context.filteredData.map((d) => +d[header]).reduce((acc, h) => h + acc, 0) : context.footer[header] == "count" ? context.filteredData.map((d) => d[header] != "" ? 1 : 0).reduce((acc, h) => acc + h, 0) : context.footer[header] == "avg" ? context.filteredData.map((d) => +d[header]).reduce((acc, h) => h + acc, 0) / context.filteredData.map((d) => d[header] != "" ? 1 : 0).reduce((acc, h) => acc + h, 0) : "" : ""
|
|
39449
39452
|
})
|
|
39450
39453
|
},
|
|
39451
39454
|
header
|
package/package.json
CHANGED
package/src/container/index.tsx
CHANGED
|
@@ -66,6 +66,7 @@ export default function Container({
|
|
|
66
66
|
{ location: "/", name: "Home", icon: <HomeIcon /> },
|
|
67
67
|
...navItems,
|
|
68
68
|
].map((li, k) => {
|
|
69
|
+
const icono = menuList?.find((m) => m.location == li.location);
|
|
69
70
|
return (
|
|
70
71
|
li && (
|
|
71
72
|
<Link
|
|
@@ -73,7 +74,7 @@ export default function Container({
|
|
|
73
74
|
key={k}
|
|
74
75
|
className="flex gap-1 p-1 items-center"
|
|
75
76
|
>
|
|
76
|
-
{li
|
|
77
|
+
{(li?.icon as any) || icono}
|
|
77
78
|
{li.name as any}
|
|
78
79
|
</Link>
|
|
79
80
|
)
|
|
@@ -129,13 +130,13 @@ export default function Container({
|
|
|
129
130
|
// onClick={() => setIsSidebarOpen(false)}
|
|
130
131
|
>
|
|
131
132
|
{isSidebarOpen && (
|
|
132
|
-
<div className="text-sm flex
|
|
133
|
+
<div className="text-sm flex items-center hover:bg-gray-200 hover:text-black rounded p-1">
|
|
133
134
|
{icon}
|
|
134
135
|
<div className=" truncate">{itemMenu?.name}</div>
|
|
135
136
|
</div>
|
|
136
137
|
)}
|
|
137
138
|
{!isSidebarOpen && (
|
|
138
|
-
<div className="text-sm hover:bg-gray-200 hover:text-black rounded p-1">
|
|
139
|
+
<div className="text-sm flex hover:bg-gray-200 hover:text-black rounded p-1">
|
|
139
140
|
{icon}
|
|
140
141
|
</div>
|
|
141
142
|
)}
|
|
@@ -463,45 +463,45 @@ export default function HTable({
|
|
|
463
463
|
});
|
|
464
464
|
})}
|
|
465
465
|
{Object.keys(context?.footer || {}).length > 0 &&
|
|
466
|
-
headers
|
|
467
|
-
|
|
468
|
-
.
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
466
|
+
headers.map((header) => {
|
|
467
|
+
if (context?.hideColumns?.includes?.(header)) return null;
|
|
468
|
+
if (header.startsWith("_") && !header.startsWith("__")) return null;
|
|
469
|
+
return (
|
|
470
|
+
<div
|
|
471
|
+
key={header}
|
|
472
|
+
style={{
|
|
473
|
+
height: `${padding}px`,
|
|
474
|
+
maxHeight: "100px",
|
|
475
|
+
}}
|
|
476
|
+
className={
|
|
477
|
+
"border-b font-bold " +
|
|
478
|
+
" bg-white flex items-center justify-center"
|
|
479
|
+
}
|
|
480
|
+
>
|
|
481
|
+
{valueFormatter({
|
|
482
|
+
currentCoin: context.currentCoin,
|
|
483
|
+
value: context.footer?.[header]
|
|
484
|
+
? context.footer[header] == "sum"
|
|
485
|
+
? context.filteredData
|
|
486
|
+
.map((d) => +d[header])
|
|
487
|
+
.reduce((acc, h) => h + acc, 0)
|
|
488
|
+
: context.footer[header] == "count"
|
|
485
489
|
? context.filteredData
|
|
486
|
-
.map((d) =>
|
|
487
|
-
.reduce((acc, h) =>
|
|
488
|
-
: context.footer[header] == "
|
|
490
|
+
.map((d) => (d[header] != "" ? 1 : 0))
|
|
491
|
+
.reduce((acc: number, h) => acc + h, 0)
|
|
492
|
+
: context.footer[header] == "avg"
|
|
489
493
|
? context.filteredData
|
|
494
|
+
.map((d) => +d[header])
|
|
495
|
+
.reduce((acc, h) => h + acc, 0) /
|
|
496
|
+
context.filteredData
|
|
490
497
|
.map((d) => (d[header] != "" ? 1 : 0))
|
|
491
498
|
.reduce((acc: number, h) => acc + h, 0)
|
|
492
|
-
:
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
.reduce((acc: number, h) => acc + h, 0)
|
|
499
|
-
: ""
|
|
500
|
-
: "",
|
|
501
|
-
})}
|
|
502
|
-
</div>
|
|
503
|
-
);
|
|
504
|
-
})}
|
|
499
|
+
: ""
|
|
500
|
+
: "",
|
|
501
|
+
})}
|
|
502
|
+
</div>
|
|
503
|
+
);
|
|
504
|
+
})}
|
|
505
505
|
</div>
|
|
506
506
|
|
|
507
507
|
{context.modal && (
|