1 | import { RefObject } from 'react';
|
2 | import { DragDropManager, Identifier } from 'dnd-core';
|
3 | import { DndComponent } from './types';
|
4 | export interface DecorateHandlerArgs<Props, ItemIdType> {
|
5 | DecoratedComponent: any;
|
6 | createMonitor: (manager: DragDropManager) => HandlerReceiver;
|
7 | createHandler: (monitor: HandlerReceiver, ref: RefObject<any>) => Handler<Props>;
|
8 | createConnector: any;
|
9 | registerHandler: any;
|
10 | containerDisplayName: string;
|
11 | getType: (props: Props) => ItemIdType;
|
12 | collect: any;
|
13 | options: any;
|
14 | }
|
15 | interface HandlerReceiver {
|
16 | receiveHandlerId: (handlerId: Identifier | null) => void;
|
17 | }
|
18 | interface Handler<Props> {
|
19 | ref: RefObject<any>;
|
20 | receiveProps(props: Props): void;
|
21 | }
|
22 | export declare function decorateHandler<Props, CollectedProps, ItemIdType>({ DecoratedComponent, createHandler, createMonitor, createConnector, registerHandler, containerDisplayName, getType, collect, options, }: DecorateHandlerArgs<Props, ItemIdType>): DndComponent<Props>;
|
23 | export {};
|