@sustaina/shared-ui 1.8.0 → 1.8.2
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.d.mts +1 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +11 -6
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +11 -6
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -276,6 +276,7 @@ declare module "@tanstack/react-table" {
|
|
|
276
276
|
cellProps?: React.ComponentProps<"td">;
|
|
277
277
|
filterCellProps?: React.ComponentProps<"td">;
|
|
278
278
|
useColumnSizing?: boolean;
|
|
279
|
+
columnSeparatorProps?: ColumnSeparatorProps;
|
|
279
280
|
renderColumnFilter?: (props: DataTableColumnFilterProps<TData>) => ReactNode;
|
|
280
281
|
}
|
|
281
282
|
}
|
package/dist/index.d.ts
CHANGED
|
@@ -276,6 +276,7 @@ declare module "@tanstack/react-table" {
|
|
|
276
276
|
cellProps?: React.ComponentProps<"td">;
|
|
277
277
|
filterCellProps?: React.ComponentProps<"td">;
|
|
278
278
|
useColumnSizing?: boolean;
|
|
279
|
+
columnSeparatorProps?: ColumnSeparatorProps;
|
|
279
280
|
renderColumnFilter?: (props: DataTableColumnFilterProps<TData>) => ReactNode;
|
|
280
281
|
}
|
|
281
282
|
}
|
package/dist/index.js
CHANGED
|
@@ -946,12 +946,16 @@ function getColumnPinningStyles(column) {
|
|
|
946
946
|
return { classes, style };
|
|
947
947
|
}
|
|
948
948
|
function getRowClickHandlers(handler, { rowData, row, table }) {
|
|
949
|
-
const
|
|
950
|
-
|
|
949
|
+
const handleClick = (event) => {
|
|
950
|
+
if (event.detail === 1) {
|
|
951
|
+
handler(rowData, { event, row, table, clickType: "single" });
|
|
952
|
+
}
|
|
953
|
+
if (event.detail >= 2) {
|
|
954
|
+
handler(rowData, { event, row, table, clickType: "double" });
|
|
955
|
+
}
|
|
951
956
|
};
|
|
952
957
|
return {
|
|
953
|
-
onClick:
|
|
954
|
-
onDoubleClick: (event) => handleRowClick(event, "double")
|
|
958
|
+
onClick: handleClick
|
|
955
959
|
};
|
|
956
960
|
}
|
|
957
961
|
var fallbackData = [];
|
|
@@ -1197,8 +1201,9 @@ var DataTable = ({
|
|
|
1197
1201
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1198
1202
|
ColumnSeparator_default,
|
|
1199
1203
|
{
|
|
1200
|
-
|
|
1201
|
-
...
|
|
1204
|
+
...components?.columnSeparatorProps?.headerCell,
|
|
1205
|
+
...header.column.columnDef?.meta?.columnSeparatorProps,
|
|
1206
|
+
show: header.column.columnDef?.meta?.columnSeparatorProps?.show ?? components?.columnSeparatorProps?.headerCell?.show ?? showSeparator
|
|
1202
1207
|
}
|
|
1203
1208
|
),
|
|
1204
1209
|
/* @__PURE__ */ jsxRuntime.jsx(ColumnResizer_default, { header, ...components?.columnResizerProps })
|