import type { BoxSelectInteraction, BoxSelectInteractionCallbacks, BoxSelectInteractionOptions, ClickInteraction, ClickInteractionCallbacks, ClickInteractionOptions, DragNodeInteraction, DragNodeInteractionCallbacks, DrawInteraction, DrawInteractionCallbacks, DrawInteractionOptions, HoverInteraction, HoverInteractionCallbacks, HoverInteractionOptions, KeyboardInteraction, KeyboardInteractionCallbacks, KeyboardInteractionOptions, LassoInteraction, LassoInteractionCallbacks, LassoInteractionOptions, PanInteraction, PanInteractionCallbacks, PanInteractionOptions, ZoomInteraction, ZoomInteractionCallbacks, ZoomInteractionOptions } from '@neo4j-nvl/interaction-handlers'; import type { BasicReactWrapperProps } from '../basic-wrapper/BasicNvlWrapper'; export type InteractionModule = typeof HoverInteraction | typeof ClickInteraction | typeof PanInteraction | typeof ZoomInteraction | typeof DragNodeInteraction | typeof DrawInteraction | typeof BoxSelectInteraction | typeof LassoInteraction | typeof KeyboardInteraction; export type Interaction = HoverInteraction | ClickInteraction | PanInteraction | ZoomInteraction | DragNodeInteraction | DrawInteraction | BoxSelectInteraction | LassoInteraction | KeyboardInteraction; /** * Collection of mouse event callbacks that can be used with * the {@link InteractiveNvlWrapper} component. */ export type MouseEventCallbacks = ClickInteractionCallbacks & DragNodeInteractionCallbacks & HoverInteractionCallbacks & PanInteractionCallbacks & ZoomInteractionCallbacks & BoxSelectInteractionCallbacks & DrawInteractionCallbacks & LassoInteractionCallbacks; /** * Collection of keyboard event callbacks that can be used with * the {@link InteractiveNvlWrapper} component. */ export type KeyboardEventCallbacks = KeyboardInteractionCallbacks; /** * Collection of interaction options that can be used with * the {@link InteractiveNvlWrapper} component. */ export type InteractionOptions = ClickInteractionOptions & BoxSelectInteractionOptions & HoverInteractionOptions & PanInteractionOptions & ZoomInteractionOptions & LassoInteractionOptions & DrawInteractionOptions & KeyboardInteractionOptions; /** * The events that can be passed to the {@link MouseEventCallbacks} object * to turn on/off certain events for the {@link InteractiveNvlWrapper} component. */ export type MouseEvent = keyof MouseEventCallbacks; export type KeyboardEvent = keyof KeyboardEventCallbacks; /** * The properties that can be passed to the {@link InteractiveNvlWrapper} component. */ export interface InteractiveNvlWrapperProps extends BasicReactWrapperProps { /** {@link MouseEventCallbacks} containing functions for callbacks on certain actions */ mouseEventCallbacks?: MouseEventCallbacks; /** {@link KeyboardEventCallbacks} containing functions for callbacks on keyboard actions */ keyboardEventCallbacks?: KeyboardEventCallbacks; /** {@link InteractionOptions} for the underlying interaction handlers */ interactionOptions?: InteractionOptions; }