import { XOR } from "design-to-code/dist/dts/data-utilities/type.utilities"; import React from "react"; import { HoverLocation } from "./navigation.props"; export declare enum VerticalDragDirection { up = 0, down = 1, center = 2 } export declare enum DragDropItemType { rootLinkedData = "root-linked-data", rootLinkedDataUndroppable = "root-linked-data-undroppable", linkedData = "linked-data", linkedDataUndroppable = "linked-data-undroppable", linkedDataContainer = "linked-data-container", undraggableUndroppable = "undraggable-undroppable" } export interface NavigationTreeItemProps extends NavigationTreeItemDragSourceCollectedProps, NavigationTreeItemDropTargetCollectedProps { /** * The type of item for drag and drop */ type: DragDropItemType; /** * The class names assigned to style the drag item */ className: string; /** * The class name assigned to the expand trigger */ expandTriggerClassName: string; /** * The class name assigned to the items content */ contentClassName: string; /** * The class name assigned to the display text input */ displayTextInputClassName: string; /** * The dictionary ID */ dictionaryId: string; /** * The index of this drag item */ index: number; /** * The navigation ID */ navigationConfigId: string; /** * Whether this navigation item is collapsible */ isCollapsible: boolean; /** * Whether this navigation item is editable */ isEditing: boolean; /** * The React ref for the input element */ inputRef: React.RefObject; /** * The React ref for the navigation element */ itemRef: XOR, null>; /** * The text content */ text: string; /** * The click handler for expanding an item */ handleExpandClick: React.MouseEventHandler; /** * The click handler for activating an item */ handleClick: React.MouseEventHandler; /** * The change handler for updating an items display text */ handleInputChange: React.ChangeEventHandler; /** * The blur handler for defocusing the display text input */ handleInputBlur: React.FocusEventHandler; /** * The keydown handler for the display text input */ handleInputKeyDown: React.KeyboardEventHandler; /** * The keyDown handler */ handleKeyDown: React.KeyboardEventHandler; /** * Callback for starting the drag */ dragStart: (dictionaryId: string, type: string) => { type: string; }; /** * Callback for ending the drag */ dragEnd: () => void; /** * Callback for hovering an item */ dragHover: (type: DragDropItemType, dictionaryId: string, navigationConfigId: string, index: number, location: HoverLocation) => void; } export interface NavigationTreeItemDragSourceCollectedProps { connectDragSource?: (el: JSX.Element) => JSX.Element; isDragging?: boolean; } export interface NavigationTreeItemDropTargetCollectedProps { connectDropTarget?: (el: JSX.Element) => JSX.Element; isOver?: boolean; } export interface NavigationTreeItemDragObject { dictionaryId: string; navigationConfigId: string; }