mirror of
https://github.com/trustgraph-ai/trustgraph.git
synced 2026-07-03 15:01:00 +02:00
Squashed 'ai-context/workbench-ui/' content from commit 32e36a5c
git-subtree-dir: ai-context/workbench-ui git-subtree-split: 32e36a5c2131e429a7081cfaf67dabad3193cda3
This commit is contained in:
commit
a8390532f7
310 changed files with 56430 additions and 0 deletions
32
src/model/node-properties-table.tsx
Normal file
32
src/model/node-properties-table.tsx
Normal file
|
|
@ -0,0 +1,32 @@
|
|||
import { createColumnHelper } from "@tanstack/react-table";
|
||||
|
||||
/**
|
||||
* Node property data structure for the node properties table
|
||||
* Represents a single property with its predicate label and value
|
||||
*/
|
||||
export type NodeProperty = {
|
||||
property: string; // Human-readable property name (label)
|
||||
value: string; // Property value
|
||||
uri?: string; // Original property URI (optional, for reference)
|
||||
};
|
||||
|
||||
// Create a column helper instance for type-safe column definitions
|
||||
export const columnHelper = createColumnHelper<NodeProperty>();
|
||||
|
||||
/**
|
||||
* Column definitions for the node properties table
|
||||
* Defines how each column should be rendered and what data it displays
|
||||
*/
|
||||
export const columns = [
|
||||
// Property column - displays the property name/label
|
||||
columnHelper.accessor("property", {
|
||||
header: "Property",
|
||||
cell: (info) => info.getValue(),
|
||||
}),
|
||||
|
||||
// Value column - displays the property value
|
||||
columnHelper.accessor("value", {
|
||||
header: "Value",
|
||||
cell: (info) => info.getValue(),
|
||||
}),
|
||||
];
|
||||
Loading…
Add table
Add a link
Reference in a new issue