@sphereon/ui-components.ssi-react 0.4.1-unstable.158 → 0.4.1-unstable.160
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.
|
@@ -6,7 +6,6 @@ type Props<T> = {
|
|
|
6
6
|
data: Array<T>;
|
|
7
7
|
columns: Array<ColumnHeader<T>>;
|
|
8
8
|
onRowClick?: (data: Row<T>) => Promise<void>;
|
|
9
|
-
onRowDoubleClick?: (data: Row<T>) => Promise<void>;
|
|
10
9
|
onDelete?: (rows: Array<T>) => Promise<void>;
|
|
11
10
|
enableRowSelection?: boolean;
|
|
12
11
|
enableRowHover?: boolean;
|
|
@@ -64,7 +64,7 @@ const toRowSelectionObject = (rows) => {
|
|
|
64
64
|
return rowSelectionObject;
|
|
65
65
|
};
|
|
66
66
|
const SSITableView = (props) => {
|
|
67
|
-
const { columns, data, enableRowSelection = false, enableRowHover = true, enableFiltering = false, enableMostRecent = false, enableResultCount = false, columnResizeMode = 'onChange', actions = [], onRowClick,
|
|
67
|
+
const { columns, data, enableRowSelection = false, enableRowHover = true, enableFiltering = false, enableMostRecent = false, enableResultCount = false, columnResizeMode = 'onChange', actions = [], onRowClick, onDelete, pagination, } = props;
|
|
68
68
|
const [rowSelection, setRowSelection] = React.useState([]);
|
|
69
69
|
const [focusedRowId, setFocusedRowId] = React.useState();
|
|
70
70
|
const columnHelper = createColumnHelper();
|
|
@@ -125,9 +125,6 @@ const SSITableView = (props) => {
|
|
|
125
125
|
const onRowClicked = async (row) => {
|
|
126
126
|
await onRowClick?.(row);
|
|
127
127
|
};
|
|
128
|
-
const onRowDoubleClicked = async (row) => {
|
|
129
|
-
await onRowDoubleClick?.(row);
|
|
130
|
-
};
|
|
131
128
|
const onDeleteClicked = async () => {
|
|
132
129
|
await onDelete?.(rowSelection.map((row) => row.rowData));
|
|
133
130
|
};
|
|
@@ -142,7 +139,7 @@ const SSITableView = (props) => {
|
|
|
142
139
|
transform: columnResizeMode === 'onEnd' && header.column.getIsResizing()
|
|
143
140
|
? `translateX(${table.getState().columnSizingInfo.deltaOffset}px)`
|
|
144
141
|
: '',
|
|
145
|
-
} })] }, header.id))) }, headerGroup.id))) }), _jsx("tbody", { children: table.getRowModel().rows.map((row) => (_jsx(RowContainer, { enableHover: enableRowHover, onClick: () => onRowClicked(row),
|
|
142
|
+
} })] }, header.id))) }, headerGroup.id))) }), _jsx("tbody", { children: table.getRowModel().rows.map((row) => (_jsx(RowContainer, { enableHover: enableRowHover, onClick: () => onRowClicked(row), onMouseEnter: () => onFocusRow(row.id), onMouseLeave: () => onFocusRow(), style: { ...(row.getIsSelected() && { backgroundColor: selectionElementColors.selectedRow }) }, children: row.getVisibleCells().map((cell) => (_jsx(CellContainer, { style: {
|
|
146
143
|
...(cell.column.columnDef.minSize && { minWidth: cell.column.columnDef.minSize }),
|
|
147
144
|
...(cell.column.columnDef.maxSize && { maxWidth: cell.column.columnDef.maxSize }),
|
|
148
145
|
...(cell.column.columnDef.size !== 0 && { width: cell.column.columnDef.size }),
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sphereon/ui-components.ssi-react",
|
|
3
3
|
"private": false,
|
|
4
|
-
"version": "0.4.1-unstable.
|
|
4
|
+
"version": "0.4.1-unstable.160+9a3bad1",
|
|
5
5
|
"description": "SSI UI components for React",
|
|
6
6
|
"repository": "git@github.com:Sphereon-Opensource/UI-Components.git",
|
|
7
7
|
"author": "Sphereon <dev@sphereon.com>",
|
|
@@ -50,7 +50,7 @@
|
|
|
50
50
|
"@mui/x-date-pickers": "^8.18.0",
|
|
51
51
|
"@sphereon/ssi-sdk.data-store": "0.34.1-feature.SSISDK.45.94",
|
|
52
52
|
"@sphereon/ssi-types": "0.34.1-feature.SSISDK.45.94",
|
|
53
|
-
"@sphereon/ui-components.core": "0.4.1-unstable.
|
|
53
|
+
"@sphereon/ui-components.core": "0.4.1-unstable.160+9a3bad1",
|
|
54
54
|
"@tanstack/react-table": "^8.9.3",
|
|
55
55
|
"ajv": "^8.17.1",
|
|
56
56
|
"ajv-formats": "^3.0.1",
|
|
@@ -72,5 +72,5 @@
|
|
|
72
72
|
"peerDependencies": {
|
|
73
73
|
"react": ">= 18"
|
|
74
74
|
},
|
|
75
|
-
"gitHead": "
|
|
75
|
+
"gitHead": "9a3bad1ec0bc88f6102cdbb039cd4a20441144fd"
|
|
76
76
|
}
|