-
Notifications
You must be signed in to change notification settings - Fork 18
/
Copy pathaurelia-dragula.d.ts
45 lines (37 loc) · 1.39 KB
/
aurelia-dragula.d.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
declare namespace dragula {
export interface Options {
isContainer?: (el?: Element) => boolean;
moves?: (el?: Element, source?: Element, handle?: Element, sibling?: Element) => boolean;
accepts?: (el?: Element, target?: Element, source?: Element, sibling?: Element) => boolean;
invalid?: (el?: Element, handle?: Element) => boolean;
direction?: string;
copy?: boolean;
copySortSource?: boolean;
revertOnSpill?: boolean;
removeOnSpill?: boolean;
mirrorContainer?: Element;
ignoreInputTextSelection?: boolean;
// Setting this option is effectively the same as passing the containers in the first argument to dragula(containers, options).
containers?: Array<Element>;
}
export interface Dragula {
new (options?: Options): Dragula;
new (): Dragula;
containers: Array<Element>;
dragging: boolean;
options: Options;
start(item: Element): void;
end(): void;
cancel(revert?: boolean): void;
remove(): void;
on(events: string, callback: Function): void;
off(events: string, callback: Function): void;
once(events: string, callback: Function): void;
canMove(item: Element): boolean;
destroy(): void;
isContainer(item: Element);
drop(item: Element, target: Element);
}
function moveBefore<T>(array: T[], itemMatcherFn: (item: T) => boolean, siblingMatcherFn: (item: T) => boolean)
}
export = dragula;