next-recomponents 2.0.59 → 2.0.61

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
@@ -39263,10 +39263,10 @@ function HTable({
39263
39263
  setWidths(
39264
39264
  Object.fromEntries(
39265
39265
  headers.map((h) => {
39266
- var _a, _b;
39266
+ var _a, _b, _c, _d;
39267
39267
  return [
39268
39268
  h,
39269
- ((_a = context == null ? void 0 : context.colSize) == null ? void 0 : _a[h]) ? (_b = context == null ? void 0 : context.colSize) == null ? void 0 : _b[h] : ["__select__", "__modal__"].includes(h) ? 60 : h.startsWith("_") ? 0 : w
39269
+ ((_a = context == null ? void 0 : context.colSize) == null ? void 0 : _a[h]) ? (_b = context == null ? void 0 : context.colSize) == null ? void 0 : _b[h] : ["__select__", "__modal__"].includes(h) ? 60 : h.startsWith("_") || ((_d = (_c = context == null ? void 0 : context.hideColumns) == null ? void 0 : _c.includes) == null ? void 0 : _d.call(_c, h)) ? 0 : w
39270
39270
  ];
39271
39271
  })
39272
39272
  )
@@ -39406,7 +39406,7 @@ function HTable({
39406
39406
  children: searchedData.slice(pagination.inicio - 1, pagination.fin).map((row, rowIndex) => {
39407
39407
  const items = Object.entries(row);
39408
39408
  return items.map(([key, item], i) => {
39409
- var _a, _b, _c, _d, _e;
39409
+ var _a, _b, _c;
39410
39410
  if ((_b = (_a = context == null ? void 0 : context.hideColumns) == null ? void 0 : _a.includes) == null ? void 0 : _b.call(_a, key)) return null;
39411
39411
  if (key.startsWith("_") && !key.startsWith("__")) return null;
39412
39412
  if (key == "__modal__") {
@@ -39500,7 +39500,7 @@ function HTable({
39500
39500
  // ? item
39501
39501
  // : undefined,
39502
39502
  value: item,
39503
- children: ((_e = (_d = context.buttons[key]) == null ? void 0 : _d.props) == null ? void 0 : _e.children) ? item : null,
39503
+ children: item,
39504
39504
  onClick: async (e) => {
39505
39505
  var _a2, _b2;
39506
39506
  const ret = await ((_b2 = (_a2 = context.buttons[key].props) == null ? void 0 : _a2.onClick) == null ? void 0 : _b2.call(_a2, {
package/dist/index.mjs CHANGED
@@ -39260,10 +39260,10 @@ function HTable({
39260
39260
  setWidths(
39261
39261
  Object.fromEntries(
39262
39262
  headers.map((h) => {
39263
- var _a, _b;
39263
+ var _a, _b, _c, _d;
39264
39264
  return [
39265
39265
  h,
39266
- ((_a = context == null ? void 0 : context.colSize) == null ? void 0 : _a[h]) ? (_b = context == null ? void 0 : context.colSize) == null ? void 0 : _b[h] : ["__select__", "__modal__"].includes(h) ? 60 : h.startsWith("_") ? 0 : w
39266
+ ((_a = context == null ? void 0 : context.colSize) == null ? void 0 : _a[h]) ? (_b = context == null ? void 0 : context.colSize) == null ? void 0 : _b[h] : ["__select__", "__modal__"].includes(h) ? 60 : h.startsWith("_") || ((_d = (_c = context == null ? void 0 : context.hideColumns) == null ? void 0 : _c.includes) == null ? void 0 : _d.call(_c, h)) ? 0 : w
39267
39267
  ];
39268
39268
  })
39269
39269
  )
@@ -39403,7 +39403,7 @@ function HTable({
39403
39403
  children: searchedData.slice(pagination.inicio - 1, pagination.fin).map((row, rowIndex) => {
39404
39404
  const items = Object.entries(row);
39405
39405
  return items.map(([key, item], i) => {
39406
- var _a, _b, _c, _d, _e;
39406
+ var _a, _b, _c;
39407
39407
  if ((_b = (_a = context == null ? void 0 : context.hideColumns) == null ? void 0 : _a.includes) == null ? void 0 : _b.call(_a, key)) return null;
39408
39408
  if (key.startsWith("_") && !key.startsWith("__")) return null;
39409
39409
  if (key == "__modal__") {
@@ -39497,7 +39497,7 @@ function HTable({
39497
39497
  // ? item
39498
39498
  // : undefined,
39499
39499
  value: item,
39500
- children: ((_e = (_d = context.buttons[key]) == null ? void 0 : _d.props) == null ? void 0 : _e.children) ? item : null,
39500
+ children: item,
39501
39501
  onClick: async (e) => {
39502
39502
  var _a2, _b2;
39503
39503
  const ret = await ((_b2 = (_a2 = context.buttons[key].props) == null ? void 0 : _a2.onClick) == null ? void 0 : _b2.call(_a2, {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "next-recomponents",
3
- "version": "2.0.59",
3
+ "version": "2.0.61",
4
4
  "description": "description nueva",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -129,7 +129,7 @@ export default function HTable({
129
129
  ? context?.colSize?.[h]
130
130
  : ["__select__", "__modal__"].includes(h)
131
131
  ? 60
132
- : h.startsWith("_")
132
+ : h.startsWith("_") || context?.hideColumns?.includes?.(h)
133
133
  ? 0
134
134
  : w,
135
135
  ]),
@@ -444,9 +444,7 @@ export default function HTable({
444
444
  // ? item
445
445
  // : undefined,
446
446
  value: item,
447
- children: context.buttons[key]?.props?.children
448
- ? item
449
- : null,
447
+ children: item,
450
448
  onClick: async (e: any) => {
451
449
  const ret =
452
450
  (await context.buttons[key].props?.onClick?.({