@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.
- package/dist/Table/typings.d.ts +2 -1
- package/dist/blocks.js +37 -31
- package/dist/blocks.js.map +1 -1
- package/dist/blocks.umd.cjs +37 -31
- package/dist/blocks.umd.cjs.map +1 -1
- package/package.json +1 -1
package/dist/Table/typings.d.ts
CHANGED
|
@@ -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) =>
|
|
3982
|
-
|
|
3983
|
-
|
|
3984
|
-
|
|
3985
|
-
|
|
3986
|
-
|
|
3987
|
-
|
|
3988
|
-
|
|
3989
|
-
|
|
3990
|
-
|
|
3991
|
-
|
|
3992
|
-
|
|
3993
|
-
|
|
3994
|
-
|
|
3995
|
-
|
|
3996
|
-
|
|
3997
|
-
|
|
3998
|
-
|
|
3999
|
-
|
|
4000
|
-
|
|
4001
|
-
|
|
4002
|
-
|
|
4003
|
-
|
|
4004
|
-
|
|
4005
|
-
|
|
4006
|
-
|
|
4007
|
-
|
|
4008
|
-
|
|
4009
|
-
|
|
4010
|
-
|
|
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
|
}
|