next-recomponents 2.0.50 → 2.0.51

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 CHANGED
@@ -39435,8 +39435,10 @@ function HTable({
39435
39435
  );
39436
39436
  });
39437
39437
  }),
39438
- Object.keys((context == null ? void 0 : context.footer) || {}).length > 0 && headers.filter((h) => !h.startsWith("_") && !h.startsWith("__")).map((header) => {
39439
- var _a;
39438
+ Object.keys((context == null ? void 0 : context.footer) || {}).length > 0 && headers.map((header) => {
39439
+ var _a, _b, _c;
39440
+ if ((_b = (_a = context == null ? void 0 : context.hideColumns) == null ? void 0 : _a.includes) == null ? void 0 : _b.call(_a, header)) return null;
39441
+ if (header.startsWith("_") && !header.startsWith("__")) return null;
39440
39442
  return /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
39441
39443
  "div",
39442
39444
  {
@@ -39447,7 +39449,7 @@ function HTable({
39447
39449
  className: "border-b font-bold bg-white flex items-center justify-center",
39448
39450
  children: valueFormatter({
39449
39451
  currentCoin: context.currentCoin,
39450
- value: ((_a = context.footer) == null ? void 0 : _a[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) : "" : ""
39452
+ 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
39453
  })
39452
39454
  },
39453
39455
  header
package/dist/index.mjs CHANGED
@@ -39433,8 +39433,10 @@ function HTable({
39433
39433
  );
39434
39434
  });
39435
39435
  }),
39436
- Object.keys((context == null ? void 0 : context.footer) || {}).length > 0 && headers.filter((h) => !h.startsWith("_") && !h.startsWith("__")).map((header) => {
39437
- var _a;
39436
+ Object.keys((context == null ? void 0 : context.footer) || {}).length > 0 && headers.map((header) => {
39437
+ var _a, _b, _c;
39438
+ if ((_b = (_a = context == null ? void 0 : context.hideColumns) == null ? void 0 : _a.includes) == null ? void 0 : _b.call(_a, header)) return null;
39439
+ if (header.startsWith("_") && !header.startsWith("__")) return null;
39438
39440
  return /* @__PURE__ */ jsx33(
39439
39441
  "div",
39440
39442
  {
@@ -39445,7 +39447,7 @@ function HTable({
39445
39447
  className: "border-b font-bold bg-white flex items-center justify-center",
39446
39448
  children: valueFormatter({
39447
39449
  currentCoin: context.currentCoin,
39448
- value: ((_a = context.footer) == null ? void 0 : _a[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) : "" : ""
39450
+ 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
39451
  })
39450
39452
  },
39451
39453
  header
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "next-recomponents",
3
- "version": "2.0.50",
3
+ "version": "2.0.51",
4
4
  "description": "description nueva",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -463,45 +463,45 @@ export default function HTable({
463
463
  });
464
464
  })}
465
465
  {Object.keys(context?.footer || {}).length > 0 &&
466
- headers
467
- .filter((h) => !h.startsWith("_") && !h.startsWith("__"))
468
- .map((header) => {
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"
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) => +d[header])
487
- .reduce((acc, h) => h + acc, 0)
488
- : context.footer[header] == "count"
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
- : context.footer[header] == "avg"
493
- ? context.filteredData
494
- .map((d) => +d[header])
495
- .reduce((acc, h) => h + acc, 0) /
496
- context.filteredData
497
- .map((d) => (d[header] != "" ? 1 : 0))
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 && (