-
Notifications
You must be signed in to change notification settings - Fork 3
/
index.d.ts
87 lines (77 loc) · 1.76 KB
/
index.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
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
export module 'wezom-standard-tabs' {
type hook = (...args: any) => void;
interface WSTabs {
events: {
on: string;
off: string;
again: string;
};
hooks: {
beforeOn: hook[];
beforeOff: hook[];
beforeAgain: hook[];
on: hook[];
off: hook[];
again: hook[];
update: hook[];
};
cssClass: {
active: string;
disabled: string;
};
keys: {
ns: string;
button: string;
block: string;
};
/**
* Initialize.
* Set dependencies and delegated handlers
*/
init<TContext = Document>($context: JQuery<TContext> = $(document)): void;
/**
* Forced activation of tabs if there are no active one
*/
setActive<TContext = Document>($context: JQuery<TContext> = $(document)): void;
/**
* Remove all dependencies
*/
dropDependencies<
TButtons = HTMLElement,
TBlocks = HTMLElement,
TContext = Document
>(
$context: JQuery<TContext> = $(document)
): {
$buttons: JQuery<TButtons>;
$blocks: JQuery<TBlocks>;
};
/**
* Update all dependencies with pre-reset.
* Actual when dynamically adding new buttons and blocks to existing tab groups
*/
updateDependencies<TContext = Document>(
$context: JQuery<TContext> = $(document)
): void;
/**
* Ejecting tabs data from given tab button
*/
ejectData<TButtons = HTMLElement, TBlocks = HTMLElement, TContext = Document>(
$button: JQuery<TButtons>,
$context: JQuery<TContext> = $(document)
): {
myNs: string;
myName: string;
buttonsSelector: string;
buttonSyncSelector: string;
blocksSelector: string;
blockSelector: string;
$block: JQuery<TBlocks>;
$siblingBlocks: JQuery<TBlocks>;
$siblingButtons: JQuery<TButtons>;
$syncButtons: JQuery<TButtons>;
};
}
const wsTabs: WSTabs;
export = wsTabs;
}