1 | import { DrakeWithModels } from './DrakeWithModels';
|
2 | import { EventTypes } from './EventTypes';
|
3 | import { DragulaOptions } from './DragulaOptions';
|
4 | import { DrakeFactory } from './DrakeFactory';
|
5 | export declare const MockDrakeFactory: DrakeFactory;
|
6 |
|
7 |
|
8 |
|
9 |
|
10 |
|
11 |
|
12 |
|
13 |
|
14 |
|
15 |
|
16 |
|
17 |
|
18 |
|
19 |
|
20 |
|
21 |
|
22 | export declare class MockDrake implements DrakeWithModels {
|
23 | containers: Element[];
|
24 | options: DragulaOptions;
|
25 | models: any[][];
|
26 | |
27 |
|
28 |
|
29 |
|
30 |
|
31 |
|
32 | constructor(containers?: Element[], options?: DragulaOptions, models?: any[][]);
|
33 | dragging: boolean;
|
34 | start(item: Element): any;
|
35 | end(): any;
|
36 | cancel(revert: boolean): any;
|
37 | cancel(): any;
|
38 | remove(): any;
|
39 | private emitter$;
|
40 | private subs;
|
41 | on(event: string, callback: Function): any;
|
42 | destroy(): any;
|
43 | /**
|
44 | * This is the most useful method. You can use it to manually fire events that would normally
|
45 | * be fired by a real drake.
|
46 | *
|
47 | * You're likely most interested in firing `drag`, `remove` and `drop`, the three events
|
48 | * DragulaService uses to implement [dragulaModel].
|
49 | *
|
50 | * See https://github.com/bevacqua/dragula#drakeon-events for what you should emit (and in what order).
|
51 | *
|
52 | * (Note also, firing dropModel and removeModel won't work. You would have to mock DragulaService for that.)
|
53 | */
|
54 | emit(eventType: EventTypes, ...args: any[]): void;
|
55 | }
|