@overmap-ai/blocks 1.0.25-export-error-fixes.2 → 1.0.25-export-error-fixes.3

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.
@@ -1,4 +1,4 @@
1
- import { ReactNode } from "react";
1
+ import { ReactElement, ReactNode } from "react";
2
2
  export type IdLabel = string | number;
3
3
  export type ValueLabel = IdLabel | null | undefined;
4
4
  export type TableLabel = ValueLabel | ReactNode;
@@ -37,6 +37,7 @@ export interface TableRow {
37
37
  columns: {
38
38
  [columnId: string]: TableCell;
39
39
  };
40
+ decorator?: (row: ReactElement) => ReactElement;
40
41
  }
41
42
  export interface TableProps {
42
43
  columns: TableColumn[];
package/dist/blocks.js CHANGED
@@ -3978,37 +3978,43 @@ const _Table = forwardRef(function Table2(props, ref) {
3978
3978
  ] }) }),
3979
3979
  /* @__PURE__ */ jsxs(Body, { children: [
3980
3980
  tableList.length === 0 && /* @__PURE__ */ jsx(TableRow, { className: styles$1.noDataTextContainer, children: /* @__PURE__ */ jsx(Cell, { children: emptyMessage }) }),
3981
- tableList.map((row) => /* @__PURE__ */ jsxs(
3982
- Row,
3983
- {
3984
- item: row,
3985
- className: classNames(styles$1.tableRow, rowClassName, row.className, {
3986
- [styles$1.disabled]: row.disabled
3987
- }),
3988
- onClick: !row.disabled && row.onClick,
3989
- children: [
3990
- showSelect && /* @__PURE__ */ jsx(CellSelect, { item: row }, row.id),
3991
- columns.map((column, i) => {
3992
- const cell = row[column.id];
3993
- return /* @__PURE__ */ jsx(
3994
- Cell,
3995
- {
3996
- className: classNames(
3997
- styles$1.tableCell,
3998
- cellClassName,
3999
- cell.className,
4000
- { [styles$1.disabled]: cell.disabled || column.disabled }
4001
- ),
4002
- onClick: cell.disabled || column.disabled ? void 0 : row[column.id].onClick,
4003
- children: cell.label
4004
- },
4005
- i
4006
- );
4007
- })
4008
- ]
4009
- },
4010
- row.id
4011
- ))
3981
+ tableList.map((row) => {
3982
+ const rowElement = /* @__PURE__ */ jsxs(
3983
+ Row,
3984
+ {
3985
+ item: row,
3986
+ render: true,
3987
+ className: classNames(styles$1.tableRow, rowClassName, row.className, {
3988
+ [styles$1.disabled]: row.disabled
3989
+ }),
3990
+ onClick: !row.disabled && row.onClick,
3991
+ children: [
3992
+ showSelect && /* @__PURE__ */ jsx(CellSelect, { item: row }, row.id),
3993
+ columns.map((column, i) => {
3994
+ const cell = row[column.id];
3995
+ return /* @__PURE__ */ jsx(
3996
+ Cell,
3997
+ {
3998
+ className: classNames(
3999
+ styles$1.tableCell,
4000
+ cellClassName,
4001
+ cell.className,
4002
+ {
4003
+ [styles$1.disabled]: cell.disabled || column.disabled
4004
+ }
4005
+ ),
4006
+ onClick: cell.disabled || column.disabled ? void 0 : row[column.id].onClick,
4007
+ children: cell.label
4008
+ },
4009
+ i
4010
+ );
4011
+ })
4012
+ ]
4013
+ },
4014
+ row.id
4015
+ );
4016
+ return (row == null ? void 0 : row.decorator) ? row.decorator(rowElement) : rowElement;
4017
+ })
4012
4018
  ] })
4013
4019
  ] })
4014
4020
  }