forked from DefinitelyTyped/DefinitelyTyped
-
Notifications
You must be signed in to change notification settings - Fork 0
/
jqueryui.d.ts
1890 lines (1682 loc) · 70.2 KB
/
jqueryui.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
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
// Type definitions for jQueryUI 1.11
// Project: http://jqueryui.com/
// Definitions by: Boris Yankov <https://github.com/borisyankov/>, John Reilly <https://github.com/johnnyreilly>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
/// <reference path="../jquery/jquery.d.ts"/>
declare namespace JQueryUI {
// Accordion //////////////////////////////////////////////////
interface AccordionOptions extends AccordionEvents {
active?: any; // boolean or number
animate?: any; // boolean, number, string or object
collapsible?: boolean;
disabled?: boolean;
event?: string;
header?: string;
heightStyle?: string;
icons?: any;
}
interface AccordionUIParams {
newHeader: JQuery;
oldHeader: JQuery;
newPanel: JQuery;
oldPanel: JQuery;
}
interface AccordionEvent {
(event: Event, ui: AccordionUIParams): void;
}
interface AccordionEvents {
activate?: AccordionEvent;
beforeActivate?: AccordionEvent;
create?: AccordionEvent;
}
interface Accordion extends Widget, AccordionOptions {
}
// Autocomplete //////////////////////////////////////////////////
interface AutocompleteOptions extends AutocompleteEvents {
appendTo?: any; //Selector;
autoFocus?: boolean;
delay?: number;
disabled?: boolean;
minLength?: number;
position?: any; // object
source?: any; // [], string or ()
}
interface AutocompleteUIParams {
/**
* The item selected from the menu, if any. Otherwise the property is null
*/
item?: any;
}
interface AutocompleteEvent {
(event: Event, ui: AutocompleteUIParams): void;
}
interface AutocompleteEvents {
change?: AutocompleteEvent;
close?: AutocompleteEvent;
create?: AutocompleteEvent;
focus?: AutocompleteEvent;
open?: AutocompleteEvent;
response?: AutocompleteEvent;
search?: AutocompleteEvent;
select?: AutocompleteEvent;
}
interface Autocomplete extends Widget, AutocompleteOptions {
escapeRegex: (value: string) => string;
filter: (array: any, term: string) => any;
}
// Button //////////////////////////////////////////////////
interface ButtonOptions {
disabled?: boolean;
icons?: any;
label?: string;
text?: string|boolean;
click?: (event?: Event) => void;
}
interface Button extends Widget, ButtonOptions {
}
// Datepicker //////////////////////////////////////////////////
interface DatepickerOptions {
/**
* An input element that is to be updated with the selected date from the datepicker. Use the altFormat option to change the format of the date within this field. Leave as blank for no alternate field.
*/
altField?: any; // Selector, jQuery or Element
/**
* The dateFormat to be used for the altField option. This allows one date format to be shown to the user for selection purposes, while a different format is actually sent behind the scenes. For a full list of the possible formats see the formatDate function
*/
altFormat?: string;
/**
* The text to display after each date field, e.g., to show the required format.
*/
appendText?: string;
/**
* Set to true to automatically resize the input field to accommodate dates in the current dateFormat.
*/
autoSize?: boolean;
/**
* A function that takes an input field and current datepicker instance and returns an options object to update the datepicker with. It is called just before the datepicker is displayed.
*/
beforeShow?: (input: Element, inst: any) => JQueryUI.DatepickerOptions;
/**
* A function that takes a date as a parameter and must return an array with:
* [0]: true/false indicating whether or not this date is selectable
* [1]: a CSS class name to add to the date's cell or "" for the default presentation
* [2]: an optional popup tooltip for this date
* The function is called for each day in the datepicker before it is displayed.
*/
beforeShowDay?: (date: Date) => any[];
/**
* A URL of an image to use to display the datepicker when the showOn option is set to "button" or "both". If set, the buttonText option becomes the alt value and is not directly displayed.
*/
buttonImage?: string;
/**
* Whether the button image should be rendered by itself instead of inside a button element. This option is only relevant if the buttonImage option has also been set.
*/
buttonImageOnly?: boolean;
/**
* The text to display on the trigger button. Use in conjunction with the showOn option set to "button" or "both".
*/
buttonText?: string;
/**
* A function to calculate the week of the year for a given date. The default implementation uses the ISO 8601 definition: weeks start on a Monday; the first week of the year contains the first Thursday of the year.
*/
calculateWeek?: (date: Date) => string;
/**
* Whether the month should be rendered as a dropdown instead of text.
*/
changeMonth?: boolean;
/**
* Whether the year should be rendered as a dropdown instead of text. Use the yearRange option to control which years are made available for selection.
*/
changeYear?: boolean;
/**
* The text to display for the close link. Use the showButtonPanel option to display this button.
*/
closeText?: string;
/**
* When true, entry in the input field is constrained to those characters allowed by the current dateFormat option.
*/
constrainInput?: boolean;
/**
* The text to display for the current day link. Use the showButtonPanel option to display this button.
*/
currentText?: string;
/**
* The format for parsed and displayed dates. For a full list of the possible formats see the formatDate function.
*/
dateFormat?: string;
/**
* The list of long day names, starting from Sunday, for use as requested via the dateFormat option.
*/
dayNames?: string[];
/**
* The list of minimised day names, starting from Sunday, for use as column headers within the datepicker.
*/
dayNamesMin?: string[];
/**
* The list of abbreviated day names, starting from Sunday, for use as requested via the dateFormat option.
*/
dayNamesShort?: string[];
/**
* Set the date to highlight on first opening if the field is blank. Specify either an actual date via a Date object or as a string in the current dateFormat, or a number of days from today (e.g. +7) or a string of values and periods ('y' for years, 'm' for months, 'w' for weeks, 'd' for days, e.g. '+1m +7d'), or null for today.
* Multiple types supported:
* Date: A date object containing the default date.
* Number: A number of days from today. For example 2 represents two days from today and -1 represents yesterday.
* String: A string in the format defined by the dateFormat option, or a relative date. Relative dates must contain value and period pairs; valid periods are "y" for years, "m" for months, "w" for weeks, and "d" for days. For example, "+1m +7d" represents one month and seven days from today.
*/
defaultDate?: any; // Date, number or string
/**
* Control the speed at which the datepicker appears, it may be a time in milliseconds or a string representing one of the three predefined speeds ("slow", "normal", "fast").
*/
duration?: string;
/**
* Set the first day of the week: Sunday is 0, Monday is 1, etc.
*/
firstDay?: number;
/**
* When true, the current day link moves to the currently selected date instead of today.
*/
gotoCurrent?: boolean;
/**
* Normally the previous and next links are disabled when not applicable (see the minDate and maxDate options). You can hide them altogether by setting this attribute to true.
*/
hideIfNoPrevNext?: boolean;
/**
* Whether the current language is drawn from right to left.
*/
isRTL?: boolean;
/**
* The maximum selectable date. When set to null, there is no maximum.
* Multiple types supported:
* Date: A date object containing the maximum date.
* Number: A number of days from today. For example 2 represents two days from today and -1 represents yesterday.
* String: A string in the format defined by the dateFormat option, or a relative date. Relative dates must contain value and period pairs; valid periods are "y" for years, "m" for months, "w" for weeks, and "d" for days. For example, "+1m +7d" represents one month and seven days from today.
*/
maxDate?: any; // Date, number or string
/**
* The minimum selectable date. When set to null, there is no minimum.
* Multiple types supported:
* Date: A date object containing the minimum date.
* Number: A number of days from today. For example 2 represents two days from today and -1 represents yesterday.
* String: A string in the format defined by the dateFormat option, or a relative date. Relative dates must contain value and period pairs; valid periods are "y" for years, "m" for months, "w" for weeks, and "d" for days. For example, "+1m +7d" represents one month and seven days from today.
*/
minDate?: any; // Date, number or string
/**
* The list of full month names, for use as requested via the dateFormat option.
*/
monthNames?: string[];
/**
* The list of abbreviated month names, as used in the month header on each datepicker and as requested via the dateFormat option.
*/
monthNamesShort?: string[];
/**
* Whether the prevText and nextText options should be parsed as dates by the formatDate function, allowing them to display the target month names for example.
*/
navigationAsDateFormat?: boolean;
/**
* The text to display for the next month link. With the standard ThemeRoller styling, this value is replaced by an icon.
*/
nextText?: string;
/**
* The number of months to show at once.
* Multiple types supported:
* Number: The number of months to display in a single row.
* Array: An array defining the number of rows and columns to display.
*/
numberOfMonths?: any; // number or number[]
/**
* Called when the datepicker moves to a new month and/or year. The function receives the selected year, month (1-12), and the datepicker instance as parameters. this refers to the associated input field.
*/
onChangeMonthYear?: (year: number, month: number, inst: any) => void;
/**
* Called when the datepicker is closed, whether or not a date is selected. The function receives the selected date as text ("" if none) and the datepicker instance as parameters. this refers to the associated input field.
*/
onClose?: (dateText: string, inst: any) => void;
/**
* Called when the datepicker is selected. The function receives the selected date as text and the datepicker instance as parameters. this refers to the associated input field.
*/
onSelect?: (dateText: string, inst: any) => void;
/**
* The text to display for the previous month link. With the standard ThemeRoller styling, this value is replaced by an icon.
*/
prevText?: string;
/**
* Whether days in other months shown before or after the current month are selectable. This only applies if the showOtherMonths option is set to true.
*/
selectOtherMonths?: boolean;
/**
* The cutoff year for determining the century for a date (used in conjunction with dateFormat 'y'). Any dates entered with a year value less than or equal to the cutoff year are considered to be in the current century, while those greater than it are deemed to be in the previous century.
* Multiple types supported:
* Number: A value between 0 and 99 indicating the cutoff year.
* String: A relative number of years from the current year, e.g., "+3" or "-5".
*/
shortYearCutoff?: any; // number or string
/**
* The name of the animation used to show and hide the datepicker. Use "show" (the default), "slideDown", "fadeIn", any of the jQuery UI effects. Set to an empty string to disable animation.
*/
showAnim?: string;
/**
* Whether to display a button pane underneath the calendar. The button pane contains two buttons, a Today button that links to the current day, and a Done button that closes the datepicker. The buttons' text can be customized using the currentText and closeText options respectively.
*/
showButtonPanel?: boolean;
/**
* When displaying multiple months via the numberOfMonths option, the showCurrentAtPos option defines which position to display the current month in.
*/
showCurrentAtPos?: number;
/**
* Whether to show the month after the year in the header.
*/
showMonthAfterYear?: boolean;
/**
* When the datepicker should appear. The datepicker can appear when the field receives focus ("focus"), when a button is clicked ("button"), or when either event occurs ("both").
*/
showOn?: string;
/**
* If using one of the jQuery UI effects for the showAnim option, you can provide additional settings for that animation via this option.
*/
showOptions?: any; // TODO
/**
* Whether to display dates in other months (non-selectable) at the start or end of the current month. To make these days selectable use the selectOtherMonths option.
*/
showOtherMonths?: boolean;
/**
* When true, a column is added to show the week of the year. The calculateWeek option determines how the week of the year is calculated. You may also want to change the firstDay option.
*/
showWeek?: boolean;
/**
* Set how many months to move when clicking the previous/next links.
*/
stepMonths?: number;
/**
* The text to display for the week of the year column heading. Use the showWeek option to display this column.
*/
weekHeader?: string;
/**
* The range of years displayed in the year drop-down: either relative to today's year ("-nn:+nn"), relative to the currently selected year ("c-nn:c+nn"), absolute ("nnnn:nnnn"), or combinations of these formats ("nnnn:-nn"). Note that this option only affects what appears in the drop-down, to restrict which dates may be selected use the minDate and/or maxDate options.
*/
yearRange?: string;
/**
* Additional text to display after the year in the month headers.
*/
yearSuffix?: string;
}
interface DatepickerFormatDateOptions {
dayNamesShort?: string[];
dayNames?: string[];
monthNamesShort?: string[];
monthNames?: string[];
}
interface Datepicker extends Widget, DatepickerOptions {
regional: { [languageCod3: string]: any; };
setDefaults(defaults: DatepickerOptions): void;
formatDate(format: string, date: Date, settings?: DatepickerFormatDateOptions): string;
parseDate(format: string, date: string, settings?: DatepickerFormatDateOptions): Date;
iso8601Week(date: Date): number;
noWeekends(date: Date): any[];
}
// Dialog //////////////////////////////////////////////////
interface DialogOptions extends DialogEvents {
autoOpen?: boolean;
buttons?: { [buttonText: string]: (event?: Event) => void } | DialogButtonOptions[];
closeOnEscape?: boolean;
closeText?: string;
appendTo?: string;
dialogClass?: string;
disabled?: boolean;
draggable?: boolean;
height?: number | string;
hide?: boolean | number | string | DialogShowHideOptions;
maxHeight?: number;
maxWidth?: number;
minHeight?: number;
minWidth?: number;
modal?: boolean;
position?: any; // object, string or []
resizable?: boolean;
show?: boolean | number | string | DialogShowHideOptions;
stack?: boolean;
title?: string;
width?: any; // number or string
zIndex?: number;
open?: DialogEvent;
close?: DialogEvent;
}
interface DialogButtonOptions {
icons?: any;
showText?: string | boolean;
text?: string;
click?: (eventObject: JQueryEventObject) => any;
[attr: string]: any; // attributes for the <button> element
}
interface DialogShowHideOptions {
effect: string;
delay?: number;
duration?: number;
easing?: string;
}
interface DialogUIParams {
}
interface DialogEvent {
(event: Event, ui: DialogUIParams): void;
}
interface DialogEvents {
beforeClose?: DialogEvent;
close?: DialogEvent;
create?: DialogEvent;
drag?: DialogEvent;
dragStart?: DialogEvent;
dragStop?: DialogEvent;
focus?: DialogEvent;
open?: DialogEvent;
resize?: DialogEvent;
resizeStart?: DialogEvent;
resizeStop?: DialogEvent;
}
interface Dialog extends Widget, DialogOptions {
}
// Draggable //////////////////////////////////////////////////
interface DraggableEventUIParams {
helper: JQuery;
position: { top: number; left: number; };
offset: { top: number; left: number; };
}
interface DraggableEvent {
(event: Event, ui: DraggableEventUIParams): void;
}
interface DraggableOptions extends DraggableEvents {
disabled?: boolean;
addClasses?: boolean;
appendTo?: any;
axis?: string;
cancel?: string;
connectToSortable?: Element | Element[] | JQuery | string;
containment?: any;
cursor?: string;
cursorAt?: any;
delay?: number;
distance?: number;
grid?: number[];
handle?: any;
helper?: any;
iframeFix?: any;
opacity?: number;
refreshPositions?: boolean;
revert?: any;
revertDuration?: number;
scope?: string;
scroll?: boolean;
scrollSensitivity?: number;
scrollSpeed?: number;
snap?: any;
snapMode?: string;
snapTolerance?: number;
stack?: string;
zIndex?: number;
}
interface DraggableEvents {
create?: DraggableEvent;
start?: DraggableEvent;
drag?: DraggableEvent;
stop?: DraggableEvent;
}
interface Draggable extends Widget, DraggableOptions, DraggableEvent {
}
// Droppable //////////////////////////////////////////////////
interface DroppableEventUIParam {
draggable: JQuery;
helper: JQuery;
position: { top: number; left: number; };
offset: { top: number; left: number; };
}
interface DroppableEvent {
(event: Event, ui: DroppableEventUIParam): void;
}
interface DroppableOptions extends DroppableEvents {
accept?: any;
activeClass?: string;
addClasses?: boolean;
disabled?: boolean;
greedy?: boolean;
hoverClass?: string;
scope?: string;
tolerance?: string;
}
interface DroppableEvents {
create?: DroppableEvent;
activate?: DroppableEvent;
deactivate?: DroppableEvent;
over?: DroppableEvent;
out?: DroppableEvent;
drop?: DroppableEvent;
}
interface Droppable extends Widget, DroppableOptions {
}
// Menu //////////////////////////////////////////////////
interface MenuOptions extends MenuEvents {
disabled?: boolean;
icons?: any;
menus?: string;
position?: any; // TODO
role?: string;
}
interface MenuUIParams {
item?: JQuery;
}
interface MenuEvent {
(event: Event, ui: MenuUIParams): void;
}
interface MenuEvents {
blur?: MenuEvent;
create?: MenuEvent;
focus?: MenuEvent;
select?: MenuEvent;
}
interface Menu extends Widget, MenuOptions {
}
// Progressbar //////////////////////////////////////////////////
interface ProgressbarOptions extends ProgressbarEvents {
disabled?: boolean;
value?: number | boolean;
max?: number;
}
interface ProgressbarUIParams {
}
interface ProgressbarEvent {
(event: Event, ui: ProgressbarUIParams): void;
}
interface ProgressbarEvents {
change?: ProgressbarEvent;
complete?: ProgressbarEvent;
create?: ProgressbarEvent;
}
interface Progressbar extends Widget, ProgressbarOptions {
}
// Resizable //////////////////////////////////////////////////
interface ResizableOptions extends ResizableEvents {
alsoResize?: any; // Selector, JQuery or Element
animate?: boolean;
animateDuration?: any; // number or string
animateEasing?: string;
aspectRatio?: any; // boolean or number
autoHide?: boolean;
cancel?: string;
containment?: any; // Selector, Element or string
delay?: number;
disabled?: boolean;
distance?: number;
ghost?: boolean;
grid?: any;
handles?: any; // string or object
helper?: string;
maxHeight?: number;
maxWidth?: number;
minHeight?: number;
minWidth?: number;
}
interface ResizableUIParams {
element: JQuery;
helper: JQuery;
originalElement: JQuery;
originalPosition: any;
originalSize: any;
position: any;
size: any;
}
interface ResizableEvent {
(event: Event, ui: ResizableUIParams): void;
}
interface ResizableEvents {
resize?: ResizableEvent;
start?: ResizableEvent;
stop?: ResizableEvent;
create?: ResizableEvents;
}
interface Resizable extends Widget, ResizableOptions {
}
// Selectable //////////////////////////////////////////////////
interface SelectableOptions extends SelectableEvents {
autoRefresh?: boolean;
cancel?: string;
delay?: number;
disabled?: boolean;
distance?: number;
filter?: string;
tolerance?: string;
}
interface SelectableEvents {
selected? (event: Event, ui: { selected?: Element; }): void;
selecting? (event: Event, ui: { selecting?: Element; }): void;
start? (event: Event, ui: any): void;
stop? (event: Event, ui: any): void;
unselected? (event: Event, ui: { unselected: Element; }): void;
unselecting? (event: Event, ui: { unselecting: Element; }): void;
}
interface Selectable extends Widget, SelectableOptions {
}
// SelectMenu //////////////////////////////////////////////////
interface SelectMenuOptions extends SelectMenuEvents {
appendTo?: string;
disabled?: boolean;
icons?: any;
position?: JQueryPositionOptions;
width?: number;
}
interface SelectMenuUIParams {
item?: JQuery;
}
interface SelectMenuEvent {
(event: Event, ui: SelectMenuUIParams): void;
}
interface SelectMenuEvents {
change?: SelectMenuEvent;
close?: SelectMenuEvent;
create?: SelectMenuEvent;
focus?: SelectMenuEvent;
open?: SelectMenuEvent;
select?: SelectMenuEvent;
}
interface SelectMenu extends Widget, SelectMenuOptions {
}
// Slider //////////////////////////////////////////////////
interface SliderOptions extends SliderEvents {
animate?: any; // boolean, string or number
disabled?: boolean;
max?: number;
min?: number;
orientation?: string;
range?: any; // boolean or string
step?: number;
value?: number;
values?: number[];
highlight?: boolean;
}
interface SliderUIParams {
handle?: JQuery;
value?: number;
values?: number[];
}
interface SliderEvent {
(event: Event, ui: SliderUIParams): void;
}
interface SliderEvents {
change?: SliderEvent;
create?: SliderEvent;
slide?: SliderEvent;
start?: SliderEvent;
stop?: SliderEvent;
}
interface Slider extends Widget, SliderOptions {
}
// Sortable //////////////////////////////////////////////////
interface SortableOptions extends SortableEvents {
appendTo?: any; // jQuery, Element, Selector or string
axis?: string;
cancel?: any; // Selector
connectWith?: any; // Selector
containment?: any; // Element, Selector or string
cursor?: string;
cursorAt?: any;
delay?: number;
disabled?: boolean;
distance?: number;
dropOnEmpty?: boolean;
forceHelperSize?: boolean;
forcePlaceholderSize?: boolean;
grid?: number[];
helper?: string | ((event: Event, element: Sortable) => Element);
handle?: any; // Selector or Element
items?: any; // Selector
opacity?: number;
placeholder?: string;
revert?: any; // boolean or number
scroll?: boolean;
scrollSensitivity?: number;
scrollSpeed?: number;
tolerance?: string;
zIndex?: number;
}
interface SortableUIParams {
helper: JQuery;
item: JQuery;
offset: any;
position: any;
originalPosition: any;
sender: JQuery;
placeholder: JQuery;
}
interface SortableEvent {
(event: JQueryEventObject, ui: SortableUIParams): void;
}
interface SortableEvents {
activate?: SortableEvent;
beforeStop?: SortableEvent;
change?: SortableEvent;
deactivate?: SortableEvent;
out?: SortableEvent;
over?: SortableEvent;
receive?: SortableEvent;
remove?: SortableEvent;
sort?: SortableEvent;
start?: SortableEvent;
stop?: SortableEvent;
update?: SortableEvent;
}
interface Sortable extends Widget, SortableOptions, SortableEvents {
}
// Spinner //////////////////////////////////////////////////
interface SpinnerOptions extends SpinnerEvents {
culture?: string;
disabled?: boolean;
icons?: any;
incremental?: any; // boolean or ()
max?: any; // number or string
min?: any; // number or string
numberFormat?: string;
page?: number;
step?: any; // number or string
}
interface SpinnerUIParam {
value: number;
}
interface SpinnerEvent<T> {
(event: Event, ui: T): void;
}
interface SpinnerEvents {
change?: SpinnerEvent<{}>;
create?: SpinnerEvent<{}>;
spin?: SpinnerEvent<SpinnerUIParam>;
start?: SpinnerEvent<{}>;
stop?: SpinnerEvent<{}>;
}
interface Spinner extends Widget, SpinnerOptions {
}
// Tabs //////////////////////////////////////////////////
interface TabsOptions extends TabsEvents {
active?: any; // boolean or number
collapsible?: boolean;
disabled?: any; // boolean or []
event?: string;
heightStyle?: string;
hide?: any; // boolean, number, string or object
show?: any; // boolean, number, string or object
}
interface TabsActivationUIParams {
newTab: JQuery;
oldTab: JQuery;
newPanel: JQuery;
oldPanel: JQuery;
}
interface TabsBeforeLoadUIParams {
tab: JQuery;
panel: JQuery;
jqXHR: JQueryXHR;
ajaxSettings: any;
}
interface TabsCreateOrLoadUIParams {
tab: JQuery;
panel: JQuery;
}
interface TabsEvent<UI> {
(event: Event, ui: UI): void;
}
interface TabsEvents {
activate?: TabsEvent<TabsActivationUIParams>;
beforeActivate?: TabsEvent<TabsActivationUIParams>;
beforeLoad?: TabsEvent<TabsBeforeLoadUIParams>;
load?: TabsEvent<TabsCreateOrLoadUIParams>;
create?: TabsEvent<TabsCreateOrLoadUIParams>;
}
interface Tabs extends Widget, TabsOptions {
}
// Tooltip //////////////////////////////////////////////////
interface TooltipOptions extends TooltipEvents {
content?: any; // () or string
disabled?: boolean;
hide?: any; // boolean, number, string or object
items?: string;
position?: any; // TODO
show?: any; // boolean, number, string or object
tooltipClass?: string;
track?: boolean;
}
interface TooltipUIParams {
}
interface TooltipEvent {
(event: Event, ui: TooltipUIParams): void;
}
interface TooltipEvents {
close?: TooltipEvent;
open?: TooltipEvent;
}
interface Tooltip extends Widget, TooltipOptions {
}
// Effects //////////////////////////////////////////////////
interface EffectOptions {
effect: string;
easing?: string;
duration?: number;
complete: Function;
}
interface BlindEffect {
direction?: string;
}
interface BounceEffect {
distance?: number;
times?: number;
}
interface ClipEffect {
direction?: number;
}
interface DropEffect {
direction?: number;
}
interface ExplodeEffect {
pieces?: number;
}
interface FadeEffect { }
interface FoldEffect {
size?: any;
horizFirst?: boolean;
}
interface HighlightEffect {
color?: string;
}
interface PuffEffect {
percent?: number;
}
interface PulsateEffect {
times?: number;
}
interface ScaleEffect {
direction?: string;
origin?: string[];
percent?: number;
scale?: string;
}
interface ShakeEffect {
direction?: string;
distance?: number;
times?: number;
}
interface SizeEffect {
to?: any;
origin?: string[];
scale?: string;
}
interface SlideEffect {
direction?: string;
distance?: number;
}
interface TransferEffect {
className?: string;
to?: string;
}
interface JQueryPositionOptions {
my?: string;
at?: string;
of?: any;
collision?: string;
using?: Function;
within?: any;
}
// UI //////////////////////////////////////////////////
interface MouseOptions {
cancel?: string;
delay?: number;
distance?: number;
}
interface KeyCode {
BACKSPACE: number;
COMMA: number;
DELETE: number;
DOWN: number;
END: number;
ENTER: number;
ESCAPE: number;
HOME: number;
LEFT: number;
NUMPAD_ADD: number;
NUMPAD_DECIMAL: number;
NUMPAD_DIVIDE: number;
NUMPAD_ENTER: number;
NUMPAD_MULTIPLY: number;
NUMPAD_SUBTRACT: number;
PAGE_DOWN: number;
PAGE_UP: number;
PERIOD: number;
RIGHT: number;
SPACE: number;
TAB: number;
UP: number;
}
interface UI {
mouse(method: string): JQuery;
mouse(options: MouseOptions): JQuery;
mouse(optionLiteral: string, optionName: string, optionValue: any): JQuery;
mouse(optionLiteral: string, optionValue: any): any;
accordion: Accordion;
autocomplete: Autocomplete;
button: Button;
buttonset: Button;
datepicker: Datepicker;