Skip to content
Snippets Groups Projects
Verified Commit 82cc1b11 authored by Dennis Collaris's avatar Dennis Collaris
Browse files

fix: rebase issues

parent 007f0de1
No related branches found
No related tags found
No related merge requests found
Pipeline #147872 passed
......@@ -8,9 +8,6 @@ import {
MenuRadioItem,
MenuSeparator,
MenuTrigger,
SubMenu,
SubMenuContent,
SubMenuTrigger,
} from '@/lib/components/menu';
import {
attributeShownToggle,
......@@ -118,12 +115,12 @@ export const QueryBuilderContextMenu = (props: {
return (
<Menu isOpen={props.open && state !== undefined}>
<MenuTrigger x={state ? state.x : 0} y={state ? state.y : 0}>
<div className="hidden"></div>
<div />
</MenuTrigger>
<MenuContent>
<SubMenu>
<SubMenuTrigger label="Add/remove attribute" />
<SubMenuContent className="max-h-60 overflow-y-auto">
<Menu>
<MenuTrigger label="Add/remove attribute" />
<MenuContent className="max-h-60 overflow-y-auto">
{props.node?.data.attributes.map((attr: { handleData: QueryGraphEdgeHandle }) => (
<MenuCheckboxItem
key={attr.handleData.attributeName + attr.handleData.nodeId}
......@@ -133,41 +130,36 @@ export const QueryBuilderContextMenu = (props: {
iconRight={getDataTypeIcon(attr?.handleData?.attributeType)}
/>
))}
</SubMenuContent>
</SubMenu>
<SubMenu>
<SubMenuTrigger label="Union type" />
<SubMenuContent>
</MenuContent>
</Menu>
<Menu>
<MenuTrigger label="Union type" />
<MenuContent>
<MenuRadioGroup value={unionType ?? QueryUnionType.AND} onValueChange={setUnionType}>
<MenuRadioItem label="AND" value={QueryUnionType.AND} />
<MenuRadioItem label="OR" value={QueryUnionType.OR} />
</MenuRadioGroup>
</SubMenuContent>
</SubMenu>
</MenuContent>
</Menu>
{relationDirection && (
<SubMenu>
<SubMenuTrigger label="Direction" />
<SubMenuContent>
<Menu>
<MenuTrigger label="Direction" />
<MenuContent>
<MenuRadioGroup value={relationDirection} onValueChange={setRelationDirection}>
<MenuRadioItem label={QueryRelationDirection.BOTH} value={QueryRelationDirection.BOTH} />
<MenuRadioItem label={QueryRelationDirection.RIGHT} value={QueryRelationDirection.RIGHT} />
<MenuRadioItem label={QueryRelationDirection.LEFT} value={QueryRelationDirection.LEFT} />
</MenuRadioGroup>
</SubMenuContent>
</SubMenu>
</MenuContent>
</Menu>
)}
<SubMenu>
<SubMenuTrigger label="Entity statistics" />
<SubMenuContent>
<Menu>
<MenuTrigger label="Entity statistics" />
<MenuContent>
<MenuLabel label="Total node count" />
<MenuItem
disabled
label={String(
activeQuery?.graphCounts?.nodeCounts ? activeQuery.graphCounts.nodeCounts[props.node?.id + '_count'] : 'unknown',
)}
></MenuItem>
</SubMenuContent>
</SubMenu>
<MenuItem disabled label={String(activeQuery?.graphCounts?.nodeCounts[props.node?.id + '_count'] ?? 'unknown')}></MenuItem>
</MenuContent>
</Menu>
<MenuSeparator />
<MenuItem label="Remove" className="text-danger" onClick={() => removeNode()} />
</MenuContent>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment