-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsemantic-ui.d.ts
294 lines (232 loc) · 9.04 KB
/
semantic-ui.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
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
// Type definitions for Semantic-UI 2.1.8
// Project: https://github.com/Semantic-Org/Semantic-UI
// Definitions by: Hugo Mesquita <https://github.com/hugohomesquita/>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
interface AccordionSettings {
name ?: string,
namespace ?: string,
debug ?: boolean,
verbose ?: boolean,
performance ?: boolean,
on ?: string, // event on title that opens accordion
observeChanges ?: boolean, // whether accordion should automatically refresh on DOM insertion
exclusive ?: boolean, // whether a single accordion content panel should be open at once
collapsible ?: boolean, // whether accordion content can be closed
closeNested ?: boolean, // whether nested content should be closed when a panel is closed
animateChildren ?: boolean, // whether children opacity should be animated
duration ?: number, // duration of animation
easing ?: string, // easing equation for animation
onOpening ?: () => void, // callback before open animation
onOpen ?: () => void, // callback after open animation
onClosing ?: () => void, // callback before closing animation
onClose ?: () => void, // callback after closing animation
onChange ?: () => void, // callback after closing or opening animation
error?: {
method : string
},
className ?: {
active ?: string,
animating ?: string
},
selector ?: {
accordion ?: string,
title ?: string,
trigger ?: string,
content ?: string
}
}
interface ApiSettings {
name ?: string,
namespace ?: string,
debug ?: boolean,
verbose ?: boolean,
performance ?: boolean,
// object containing all templates endpoints
api ?: {},
// whether to cache responses
cache ?: boolean,
// whether new requests should abort previous requests
interruptRequests ?: boolean,
// event binding
on ?: string,
// context for applying state classes
stateContext ?: boolean,
// duration for loading state
loadingDuration ?: number,
// whether to hide errors after a period of time
hideError ?: string,
// duration for error state
errorDuration ?: number,
// whether parameters should be encoded with encodeURIComponent
encodeParameters ?: boolean,
// API action to use
action ?: boolean,
// templated URL to use
url ?: boolean,
// base URL to apply to all endpoints
base ?: string,
// data that will
urlData ?: {},
// whether to add default data to url data
defaultData ?: boolean,
// whether to serialize closest form
serializeForm ?: boolean,
// how long to wait before request should occur
throttle ?: number,
// whether to throttle first request or only repeated
throttleFirstRequest ?: boolean,
// standard ajax settings
method ?: string,
data ?: {},
dataType ?: string,
// mock response
mockResponse ?: boolean,
mockResponseAsync ?: boolean,
// aliases for mock
response ?: boolean,
responseAsync ?: boolean,
// callbacks before request
beforeSend ?: (settings: any) => void,
beforeXHR ?: (xhr: any) => void,
onRequest ?: (promise: any, xhr: any) => void,
// after request
onResponse ?: boolean, // function(response) { },
// response was successful, if JSON passed validation
onSuccess ?: (response: any, $module: any) => void,
// request finished without aborting
onComplete ?: (response: any, $module: any) => void,
// failed JSON success test
onFailure ?: (response: any, $module: any) => void,
// server error
onError ?: (errorMessage: any, $module: any) => void,
// request aborted
onAbort ?: (errorMessage: any, $module: any) => void,
successTest ?: boolean,
// errors
error : {
beforeSend ?: string,
error ?: string,
exitConditions ?: string,
JSONParse ?: string,
legacyParameters ?: string,
method ?: string,
missingAction ?: string,
missingSerialize ?: string,
missingURL ?: string,
noReturnedValue ?: string,
noStorage ?: string,
parseError ?: string,
requiredParameter ?: string,
statusMessage ?: string,
timeout ?: string
},
regExp ?: {
required ?: string,
optional ?: string,
},
className ?: {
loading ?: string,
error ?: string
},
selector ?: {
disabled?: string,
form ?: string
},
metadata ?: {
action ?: string,
url ?: string
}
}
interface TabSettings {
name ?: string
namespace ?: string,
debug ?: boolean,
verbose ?: boolean,
performance ?: boolean,
auto ?: boolean, // uses pjax style endpoints fetching content from same url with remote-content headers
history ?: boolean, // use browser history
historyType ?: string, // #/ or html5 state
path ?: boolean, // base path of url
context ?: boolean, // specify a context that tabs must appear inside
childrenOnly ?: boolean, // use only tabs that are children of context
maxDepth ?: number, // max depth a tab can be nested
alwaysRefresh ?: boolean, // load tab content new every tab click
cache ?: boolean, // cache the content requests to pull locally
ignoreFirstLoad ?: boolean, // don't load remote content on first load
apiSettings ?: boolean, // settings for api call
evaluateScripts ?: string,
onFirstLoad ?: () => void,
onLoad ?: () => void,
onVisible ?: () => void,
onRequest ?: () => void,
templates ?: {
determineTitle ?: () => void // returns page title for path
},
error?:{
api ?: string,
method ?: string,
missingTab ?: string,
noContent ?: string,
path ?: string,
recursion ?: string,
legacyInit ?: string,
legacyLoad ?: string,
state ?: string
}
metadata ?:{
tab ?: string,
loaded ?: string,
promise ?: string
},
className ?:{
loading ?: string,
active ?: string
},
selector ?:{
tabs ?: string,
ui ?: string
}
}
interface JQuery {
accordion (params?: AccordionSettings):JQuery;
accordion (behavior: string, ...args: any[]): JQuery;
api (params?: ApiSettings):JQuery;
checkbox (params?: any):JQuery;
checkbox (behavior: string, ...args: any[]): JQuery;
colorize (params?:any):JQuery;
dimmer (params?:any):JQuery;
dimmer (behavior: string, ...args: any[]): JQuery;
dropdown (params?:any):JQuery;
dropdown (behavior: string, ...args: any[]): JQuery;
embed (params?:any):JQuery;
embed (behavior: string, ...args: any[]): JQuery;
form (params?:any):JQuery;
modal (params?: any):JQuery;
modal (behavior: string, ...args: any[]): JQuery;
nag (params?:any):JQuery;
nag (behavior: string, ...args: any[]): JQuery;
popup (params?:any): JQuery;
popup (behavior: string, ...args: any[]): JQuery;
progress (params?:any):JQuery;
progress (behavior: string, ...args: any[]): JQuery;
rating (params?:any):JQuery;
rating (behavior: string, ...args: any[]): JQuery;
search (params?:any):JQuery;
search (behavior: string, ...args: any[]): JQuery;
shape (params?:any):JQuery;
shape (behavior: string, ...args: any[]): JQuery;
sidebar (behavior: string, ...args: any[]): JQuery;
sidebar (params?: any): JQuery;
site (params?:any):JQuery;//check
state (params?:any):JQuery;
sticky (params?:any):JQuery;
sticky (behavior: string, ...args: any[]): JQuery;
tab (params: TabSettings): JQuery;
tab (behavior: string, ...args: any[]): JQuery;
transition(params?: any): JQuery;
transition(behavior: string, ...args: any[]): JQuery;
transition(transition?: string, duration?: string|number, callback?: () => void): JQuery;
video (params?:any):JQuery;
visibility(params?:any):JQuery;
visit (params?:any):JQuery;//check
}