-
Notifications
You must be signed in to change notification settings - Fork 287
/
jquery.sumoselect.d.ts
58 lines (55 loc) · 1.65 KB
/
jquery.sumoselect.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
46
47
48
49
50
51
52
53
54
55
56
57
58
export type SumoProps = {
placeholder?: string;
csvDispCount?: number;
captionFormat?: string;
captionFormatAllSelected?: string;
floatWidth?: number;
forceCustomRendering?: boolean;
nativeOnDevice?: string[];
outputAsCSV?: boolean;
csvSepChar?: string;
okCancelInMulti?: boolean;
isClickAwayOk?: boolean;
triggerChangeCombined?: boolean;
selectAll?: boolean;
selectAllPartialCheck?: boolean;
search?: boolean;
searchText?: string;
searchFn?: (haystack: string, needle: string) => boolean;
noMatch?: string;
prefix?: string;
locale?: [string, string, string, string];
up?: boolean;
showTitle?: boolean;
clearAll?: boolean;
closeAfterClearAll?: boolean;
max?: number;
renderLi?: (li: JQuery, originalOption: JQuery) => JQuery;
}
export interface SumoJQuery<TElement = HTMLElement> extends JQuery<TElement> {
[n: number]: TElement & {
sumo: SumoJQuery;
};
unload(): JQuery;
add(name: string): SumoJQuery;
add(name: string, index: number): SumoJQuery;
add(name: string, html: string): SumoJQuery;
add(name: string, html: string, index: number): SumoJQuery;
remove(index: number): SumoJQuery;
selectItem(index: number): SumoJQuery;
selectItem(value: string): SumoJQuery;
unSelectItem(index: number): SumoJQuery;
unSelectItem(value: string): SumoJQuery;
disableItem(index: number): SumoJQuery;
enableItem(index: number): SumoJQuery;
selectAll(): SumoJQuery;
unSelectAll(): SumoJQuery;
enable(): SumoJQuery;
disable(): SumoJQuery;
reload(): SumoJQuery;
}
declare global {
interface JQuery {
SumoSelect(options: SumoProps): SumoJQuery;
}
}