forked from DefinitelyTyped/DefinitelyTyped
-
Notifications
You must be signed in to change notification settings - Fork 0
/
jqrangeslider.d.ts
74 lines (63 loc) · 3.01 KB
/
jqrangeslider.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
// Type definitions for jQRangeSlider 4.2.8
// Project: http://ghusse.github.com/jQRangeSlider
// Definitions by: Dániel Tar <https://github.com/qcz>
// Definitions: https://github.com/borisyankov/DefinitelyTyped
/// <reference path="../jquery/jquery.d.ts"/>
/// <reference path="../jqueryui/jqueryui.d.ts"/>
interface JQRangeSliderNumericRange {
min?: number;
max?: number;
}
interface JQRangeSliderDateRange {
min?: Date;
max?: Date;
}
interface JQRangeSliderRangeLength {
min?: any;
max?: any;
}
interface JQRangeSliderDateSteps {
years?: number;
months?: number;
weeks?: number;
days?: number;
hours?: number;
minutes?: number;
seconds?: number;
}
interface JQRangeSliderOptions {
wheelMode?: string; // function of the wheel, "zoom", "scroll" or null
wheelSpeed?: number; // speed of the wheel scrolling
arrows?: boolean; // hide the arrows or not
valueLabels?: string; // when to show value labels: "show" (always), "hide" (never) and "change" (only if slider changed)
durationIn?: number; // fade in length when displaying value labels (only when valueLabels = "change")
durationOut?: number; // fade out length when displaying value labels (only when valueLabels = "change")
delayOut?: number; // duration labels are shown after the user changed its values (only when valueLabels = "change")
range?: JQRangeSliderRangeLength; // lets you specify minimum and/or maximum range length
}
interface JQNumericRangeSliderOptions extends JQRangeSliderOptions {
bounds?: JQRangeSliderNumericRange; // min and max values of the slider
defaultValues?: JQRangeSliderNumericRange; // values selected by default on construction
formatter?: (integer) => string; // customize displayed label text
step?: number; // allows to customize values rounding, and graphically render this rounding
}
interface JQDateRangeSliderOptions extends JQRangeSliderOptions {
bounds?: JQRangeSliderDateRange; // min and max values of the slider
defaultValues?: JQRangeSliderDateRange; // values selected by default on construction
formatter?: (Date) => string; // customize displayed label text
step?: JQRangeSliderDateSteps; // allows to customize values rounding, and graphically render this rounding
}
interface JQuery {
rangeSlider(method: string): any;
rangeSlider(method: string, value: number): JQuery;
rangeSlider(method: string, min: number, max: number): JQuery;
rangeSlider(options?: JQNumericRangeSliderOptions): JQuery;
editRangeSlider(method: string): any;
editRangeSlider(method: string, value: number): JQuery;
editRangeSlider(method: string, min: number, max: number): JQuery
editRangeSlider(options?: JQNumericRangeSliderOptions): JQuery;
dateRangeSlider(method: string): any;
dateRangeSlider(method: string, value: Date): JQuery;
dateRangeSlider(method: string, min: Date, max: Date): JQuery
dateRangeSlider(options?: JQRangeSliderOptions): JQuery;
}