-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathCallout.d.ts
More file actions
106 lines (97 loc) · 2.95 KB
/
Callout.d.ts
File metadata and controls
106 lines (97 loc) · 2.95 KB
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
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
//TypeScript definitions for Callout.js in SharePoint 2013
declare class CalloutOptions {
ID: string;
launchPoint: HTMLElement;
beakOrientation: string;
content: string;
title: string;
contentElement: HTMLElement;
boundingBox: any;
contentWidth: number;
openOptions: CalloutOpenOptions;
onOpeningCallback: (callout: Callout) => any;
onOpenedCallback: (callout: Callout) => any;
onClosingCallback: (callout: Callout) => any;
onClosedCallback: (callout: Callout) => any;
positionAlgorithm: any;
}
declare class CalloutOpenOptions {
event: string;
closeCalloutOnBlur: bool;
showCloseButton: bool;
}
declare class Callout {
set (options: CalloutOptions);
addEventCallback(eventName: string, callback: any);
getLaunchPoint(): HTMLElement;
getID(): string;
getTitle(): string;
getContent(): string;
getContentElement(): HTMLElement;
getBoundingBox(): HTMLElement;
getContentWidth(): number;
getOpenOptions(): CalloutOpenOptions;
getBeakOrientation(): string;
getPositionAlgorithm(): any;
isOpen(): bool;
isOpening(): bool;
isOpenOrOpening(): bool;
isClosing(): bool;
isClosed(): bool;
getActionMenu(): CalloutActionMenu;
addAction(action:CalloutAction);
refreshActions():void;
open(useAnimation: bool);
close(useAnimation: bool);
toggle(): void;
destroy(): void;
}
declare class CalloutActionOptions {
text: string;
tooltip: string;
disabledTooltip: string;
onClickCallback: (event,action:CalloutAction)=>any;
isEnabledCallback: any;
isVisibleCallback: any;
menuEntries: CalloutActionMenuEntry[];
}
declare class CalloutActionMenuEntry {
constructor(text, onClickCallback, wzISrc, wzIAlt, wzISeq, wzDesc);
}
declare class CalloutActionMenu {
constructor(actionsId);
addAction(action: CalloutAction);
getActions(): CalloutAction[];
render():void;
refreshActions():void;
calculateActionWidth():void;
}
declare class CalloutAction {
constructor(options: CalloutActionOptions);
getText(): string;
getToolTop(): string;
getDisabledToolTip(): string;
getOnClickCallback(): any;
getIsDisabledCallback(): any;
getIsVisibleCallback(): any;
getIsMenu(): bool;
getMenuEntires(): any;
render():void;
isEnabled(): bool;
isVisible(): bool;
set (options: CalloutActionOptions):void;
}
interface ICalloutManager {
createNew(options: CalloutOptions): Callout;
createNewIfNecessary(options: CalloutOptions): Callout;
remove(callout: Callout);
getFromLaunchPoint(launchPoint: HTMLElement): Callout;
getFromLaunchPointIfExists(launchPoint: HTMLElement): Callout;
containsOneCalloutOpen(ancestor: HTMLElement): bool;
getFromCalloutDescendant(descendant: HTMLElement): Callout;
forEach(any);
closeAll():bool;
isAtLeastOneCalloutOpen(): bool;
isAtLeastOneCalloutOn(): bool;
}
declare var CalloutManager: ICalloutManager;