UNPKG

@kit-data-manager/react-search-component

Version:

All-in-one component for rendering an elastic search UI for searching anything. Built-in support for visualizing related items in a graph and resolving unique identifiers.

66 lines (65 loc) 2.29 kB
import { Edge, Node } from "@xyflow/react"; import { GraphNode } from "../../components/graph/GraphNode"; export declare abstract class GraphUtils { static buildGraphFromNodes(nodes: GraphNode[]): { initialNodes: { id: string; type: string; position: { x: number; y: number; }; data: Record<string, unknown>; }[]; initialEdges: { id: string; source: string; target: string; }[]; }; static computeNodeLayout(nodes: (Node & { type: string; })[], edges: Edge[]): { nodes: { position: { x: number; y: number; }; id: string; data: Record<string, unknown>; sourcePosition?: import("@xyflow/system").Position; targetPosition?: import("@xyflow/system").Position; hidden?: boolean; selected?: boolean; dragging?: boolean; draggable?: boolean; selectable?: boolean; connectable?: boolean; deletable?: boolean; dragHandle?: string; width?: number; height?: number; initialWidth?: number; initialHeight?: number; parentId?: string; zIndex?: number; extent?: "parent" | import("@xyflow/system").CoordinateExtent | null; expandParent?: boolean; ariaLabel?: string; origin?: import("@xyflow/system").NodeOrigin; handles?: import("@xyflow/system").NodeHandle[]; measured?: { width?: number; height?: number; }; type: string; style?: import("react").CSSProperties; className?: string; resizing?: boolean; focusable?: boolean; ariaRole?: import("react").AriaRole; domAttributes?: Omit<import("react").HTMLAttributes<HTMLDivElement>, "id" | "style" | "className" | "draggable" | "role" | "aria-label" | "defaultValue" | "dangerouslySetInnerHTML" | keyof import("react").DOMAttributes<HTMLDivElement>>; }[]; edges: Edge[]; }; }