1 | import type { Backend, DragDropManager, Identifier, Unsubscribe } from 'dnd-core';
|
2 | import type { TouchBackendContext, TouchBackendOptions } from './interfaces.js';
|
3 | export declare class TouchBackendImpl implements Backend {
|
4 | private options;
|
5 | private actions;
|
6 | private monitor;
|
7 | private static isSetUp;
|
8 | sourceNodes: Map<Identifier, HTMLElement>;
|
9 | sourcePreviewNodes: Map<string, HTMLElement>;
|
10 | sourcePreviewNodeOptions: Map<string, any>;
|
11 | targetNodes: Map<string, HTMLElement>;
|
12 | private _mouseClientOffset;
|
13 | private _isScrolling;
|
14 | private listenerTypes;
|
15 | private moveStartSourceIds;
|
16 | private waitingForDelay;
|
17 | private timeout;
|
18 | private dragOverTargetIds;
|
19 | private draggedSourceNode;
|
20 | private draggedSourceNodeRemovalObserver;
|
21 | private lastTargetTouchFallback;
|
22 | constructor(manager: DragDropManager, context: TouchBackendContext, options: Partial<TouchBackendOptions>);
|
23 | /**
|
24 | * Generate profiling statistics for the HTML5Backend.
|
25 | */
|
26 | profile(): Record<string, number>;
|
27 | get document(): Document | undefined;
|
28 | setup(): void;
|
29 | teardown(): void;
|
30 | private addEventListener;
|
31 | private removeEventListener;
|
32 | connectDragSource(sourceId: string, node: HTMLElement): Unsubscribe;
|
33 | connectDragPreview(sourceId: string, node: HTMLElement, options: unknown): Unsubscribe;
|
34 | connectDropTarget(targetId: string, node: HTMLElement): Unsubscribe;
|
35 | private getSourceClientOffset;
|
36 | handleTopMoveStartCapture: (e: Event) => void;
|
37 | handleMoveStart: (sourceId: string) => void;
|
38 | private getTopMoveStartHandler;
|
39 | handleTopMoveStart: (e: MouseEvent | TouchEvent) => void;
|
40 | handleTopMoveStartDelay: (e: Event) => void;
|
41 | handleTopMoveCapture: () => void;
|
42 | handleMove: (_evt: MouseEvent | TouchEvent, targetId: string) => void;
|
43 | handleTopMove: (e: TouchEvent | MouseEvent) => void;
|
44 | /**
|
45 | *
|
46 | * visible for testing
|
47 | */
|
48 | _getDropTargetId: (node: Element) => Identifier | undefined;
|
49 | handleTopMoveEndCapture: (e: Event) => void;
|
50 | handleCancelOnEscape: (e: KeyboardEvent) => void;
|
51 | private installSourceNodeRemovalObserver;
|
52 | private resurrectSourceNode;
|
53 | private uninstallSourceNodeRemovalObserver;
|
54 | }
|