import { Component } from 'react'; import type { MouseEventHandler, MouseEvent } from 'react'; import { Map } from 'immutable'; import { PortRecordMap, Position as PositionType, Size as SizeType, NodeRecord, Id } from '../../customTypings/index.d'; export declare const ABSTRACT_NODE_INVARIANT = " should not be used without giving it a children\nex: "; /** * calculate the position of each ports for a given node information * @param ports * @param nodePosition * @param nodeSize */ declare function calculatePortPosition(ports: PortRecordMap, nodePosition: PositionType, nodeSize: SizeType): Map; type Props = { node: NodeRecord; startMoveNodeTo: (nodeId: Id, nodePosition: PositionType) => void; moveNodeTo: (nodeId: Id, nodePosition: PositionType) => void; moveNodeToEnd: (nodeId: Id, nodePosition: PositionType) => void; snapToGrid?: boolean; onDragStart?: (event: any) => void; onDrag?: (event: any) => void; onDragEnd?: (event: any) => void; onClick?: MouseEventHandler; onDoubleClick?: MouseEventHandler; children?: any; }; declare class AbstractNode extends Component { static calculatePortPosition: typeof calculatePortPosition; d3Node: any; nodeElement: any; squaredDeltaDrag: number; constructor(props: Props); componentDidMount(): void; componentDidUpdate(prevProps: Props): void; shouldComponentUpdate(nextProps: Props): boolean; componentWillUnmount(): void; onClick(clickEvent: MouseEvent): void; onDoubleClick(clickEvent: MouseEvent): void; onDragStart(event: any): void; onDrag(event: any): void; onDragEnd(event: any): void; getEventPosition(event: any): { x: any; y: any; }; renderContent(): any; render(): import("react/jsx-runtime").JSX.Element; } export default AbstractNode;