You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

27 lines
1.1 KiB

import { Store } from 'redux';
import { State } from './reducers';
import { DragSource, DropTarget, SourceType, TargetType, Identifier, HandlerRegistry } from './interfaces';
export default class HandlerRegistryImpl implements HandlerRegistry {
private types;
private dragSources;
private dropTargets;
private pinnedSourceId;
private pinnedSource;
private store;
constructor(store: Store<State>);
addSource(type: SourceType, source: DragSource): string;
addTarget(type: TargetType, target: DropTarget): string;
containsHandler(handler: DragSource | DropTarget): boolean;
getSource(sourceId: string, includePinned?: boolean): DragSource;
getTarget(targetId: string): DropTarget;
getSourceType(sourceId: string): Identifier;
getTargetType(targetId: string): Identifier | Identifier[];
isSourceId(handlerId: string): boolean;
isTargetId(handlerId: string): boolean;
removeSource(sourceId: string): void;
removeTarget(targetId: string): void;
pinSource(sourceId: string): void;
unpinSource(): void;
private addHandler;
}