Skip to content

Commit f37b9e5

Browse files
author
Valentin Hervieu
committed
6.2.3 release
1 parent eb6efae commit f37b9e5

File tree

9 files changed

+5039
-12
lines changed

9 files changed

+5039
-12
lines changed

bower.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "angularjs-slider",
3-
"version": "6.2.2",
3+
"version": "6.2.3",
44
"homepage": "https://github.com/angular-slider/angularjs-slider",
55
"authors": [
66
"Rafal Zajac <[email protected]>",

dist/rzslider.css

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/rzslider.d.ts

Lines changed: 176 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,176 @@
1+
/**
2+
* Typescript type definition file.
3+
*/
4+
5+
import * as angular from "angular";
6+
7+
declare module "angular" {
8+
export namespace RzSlider {
9+
type RzLabelType = "model"|"high"|"floor"|"ceil"|"tick-value";
10+
type RzPointerType = "min"|"max";
11+
type RzCallback = (id: string, modelValue: number, highValue: number, pointerType: "min"|"max") => void;
12+
type RzTranslate = (value: number, sliderId: string, label: RzLabelType) => string;
13+
14+
/** RZ slider options typing */
15+
interface RzOptions {
16+
/** Number (defaults to 0): Minimum value for a slider. */
17+
floor?: number;
18+
/** Number (defaults to rz-slider-modelvalue): Maximum value for a slider. */
19+
ceil?: number;
20+
/** Number (defaults to 1): Step between each value. */
21+
step?: number;
22+
/** Number (defaults to 0): The precision to display values with. The toFixed() is used internally for this. */
23+
precision?: number;
24+
/** Number (defaults to null): The minimum value authorized on the slider. */
25+
minLimit?: number;
26+
/** Number (defaults to null): The maximum value authorized on the slider. */
27+
maxLimit?: number;
28+
/** Number (defaults to null): The minimum range authorized on the slider. Applies to range slider only. */
29+
minRange?: number;
30+
/** Number (defaults to null): The maximum range authorized on the slider. Applies to range slider only. */
31+
maxRange?: number;
32+
/**
33+
* Boolean (defaults to false): Set to true to have a push behavior. When the min handle goes above the max,
34+
* the max is moved as well (and vice-versa). The range between min and max is defined by the step option
35+
* (defaults to 1) and can also be override by the minRange option. Applies to range slider only.
36+
*/
37+
pushRange?: boolean;
38+
/**
39+
* Custom translate function. Use this if you want to translate values displayed on the slider.
40+
* sliderId can be used to determine the slider for which we are translating the value.
41+
* label is a string that can take the following values:
42+
* 'model': the model label
43+
* 'high': the high label
44+
* 'floor': the floor label
45+
* 'ceil': the ceil label
46+
* 'tick-value': the ticks labels
47+
*/
48+
translate?: RzTranslate;
49+
/**
50+
* Function(value, sliderId): Use to display legend under ticks. The function will be called with each tick
51+
* value and returned content will be displayed under the tick as a legend. If the returned value is null,
52+
* then no legend is displayed under the corresponding tick.
53+
*/
54+
getLegend?: (value: number, sliderId: string) => string;
55+
/**
56+
* Any (defaults to null): If you want to use the same translate function for several sliders,
57+
* just set the id to anything you want, and it will be passed to the translate(value, sliderId)
58+
* function as a second argument.
59+
*/
60+
id?: string;
61+
/**
62+
* Array: If you want to display a slider with non linear/number steps. Just pass an array with each slider
63+
* value and that's it; the floor, ceil and step settings of the slider will be computed automatically.
64+
* By default, the rz-slider-model and rz-slider-high values will be the value of the selected item in the stepsArray.
65+
* They can also be bound to the index of the selected item by setting the bindIndexForStepsArray option to true.
66+
*
67+
* stepsArray can also be an array of objects like:
68+
* [
69+
* {value: 'A'}, // the display value will be *A*
70+
* {value: 10, legend: 'Legend for 10'} // the display value will be 10 and a legend will be displayed under the corresponding tick.
71+
* ]
72+
*/
73+
stepsArray?: any[];
74+
/**
75+
* Boolean (defaults to false): Set to true to bind the index of the selected item to rz-slider-model and rz-slider-high.
76+
* (This was the default behavior prior to 4.0).
77+
*/
78+
bindIndexForStepsArray?: boolean;
79+
/** Boolean (defaults to false): When set to true and using a range slider, the range can be dragged by the selection bar. Applies to range slider only. */
80+
draggableRange?: boolean;
81+
/** Boolean (defaults to false): Same as draggableRange but the slider range can't be changed. Applies to range slider only. */
82+
draggableRangeOnly?: boolean;
83+
/** Boolean (defaults to false): Set to true to always show the selection bar before the slider handle. */
84+
showSelectionBar?: boolean;
85+
/** Boolean (defaults to false): Set to true to always show the selection bar after the slider handle. */
86+
showSelectionBarEnd?: boolean;
87+
/** Number (defaults to null): Set a number to draw the selection bar between this value and the slider handle. */
88+
showSelectionBarFromValue?: number;
89+
/**
90+
* Function(value) or Function(minVal, maxVal) (defaults to null): Function that returns the current color of the
91+
* selection bar. If your color won't changed, don't use this option but set it through CSS. If the returned color
92+
* depends on a model value (either rzScopeModelor 'rzSliderHigh), you should use the argument passed to the function.
93+
* Indeed, when the function is called, there is no certainty that the model has already been updated.
94+
*/
95+
getSelectionBarColor?: (minVal: number, maxVal?: number) => string;
96+
/** Function(value) (defaults to null): Function that returns the color of a tick. showTicks must be enabled. */
97+
getTickColor?: (value: number) => string;
98+
/**
99+
* Function(value, pointerType) (defaults to null): Function that returns the current color of a pointer.
100+
* If your color won't changed, don't use this option but set it through CSS. If the returned color depends
101+
* on a model value (either rzScopeModelor 'rzSliderHigh), you should use the argument passed to the function.
102+
* Indeed, when the function is called, there is no certainty that the model has already been updated.
103+
* To handle range slider pointers independently, you should evaluate pointerType within the given function
104+
* where "min" stands for rzScopeModel and "max" for rzScopeHigh values.
105+
*/
106+
getPointerColor?: (value: number, pointerType: RzPointerType) => string;
107+
/** Boolean (defaults to false): Set to true to hide pointer labels */
108+
hidePointerLabels?: boolean;
109+
/** Boolean (defaults to false): Set to true to hide min / max labels */
110+
hideLimitLabels?: boolean;
111+
/** Boolean (defaults to false): Set to true to make the slider read-only. */
112+
readOnly?: boolean;
113+
/** Boolean (defaults to false): Set to true to disable the slider. */
114+
disabled?: boolean;
115+
/**
116+
* Number in ms (defaults to 350): Internally, a throttle function (See http://underscorejs.org/#throttle) is used
117+
* when the model or high values of the slider are changed from outside the slider. This is to prevent from re-rendering
118+
* the slider too many times in a row. interval is the number of milliseconds to wait between two updates of the slider.
119+
*/
120+
interval?: number;
121+
/** Boolean or Number (defaults to false): Set to true to display a tick for each step of the slider. Set an integer to display ticks at intermediate positions. */
122+
showTicks?: boolean | number;
123+
/** Boolean or Number (defaults to false): Set to true to display a tick and the step value for each step of the slider. Set an integer to display ticks and the step value at intermediate positions. */
124+
showTicksValues?: boolean | number;
125+
/** Array (defaults to null): Use to display ticks at specific positions. The array contains the index of the ticks that should be displayed. For example, [0, 1, 5] will display a tick for the first, second and sixth values. */
126+
ticksArray?: number[];
127+
/** Function(value) (defaults to null): (requires angular-ui bootstrap) Used to display a tooltip when a tick is hovered. Set to a function that returns the tooltip content for a given value. */
128+
ticksTooltip?: (value: number) => string;
129+
/** Function(value) (defaults to null): Same as ticksTooltip but for ticks values. */
130+
ticksValuesTooltip?: (value: number) => string;
131+
/** Number (defaults to 1): If you display the slider in an element that uses transform: scale(0.5), set the scale value to 2 so that the slider is rendered properly and the events are handled correctly. */
132+
scale?: number;
133+
/** Boolean (defaults to true): Set to true to force the value to be rounded to the step, even when modified from the outside.. When set to false, if the model values are modified from outside the slider, they are not rounded and can be between two steps. */
134+
enforceStep?: boolean;
135+
/** Boolean (defaults to false): Set to true to round the rzSliderModel and rzSliderHigh to the slider range even when modified from outside the slider. When set to false, if the model values are modified from outside the slider, they are not rounded but they are still rendered properly on the slider. */
136+
enforceRange?: boolean;
137+
/** Boolean (defaults to false): Set to true to prevent to user from switching the min and max handles. Applies to range slider only. */
138+
noSwitching?: boolean;
139+
/** Boolean (defaults to false): Set to true to only bind events on slider handles. */
140+
onlyBindHandles?: boolean;
141+
/** Boolean (defaults to true): Set to true to keep the slider labels inside the slider bounds. */
142+
boundPointerLabels?: boolean;
143+
/** Boolean (defaults to false): Set to true to merge the range labels if they are the same. For instance, if min and max are 50, the label will be "50 - 50" if mergeRangeLabelsIfSame: false, else "50". */
144+
mergeRangeLabelsIfSame?: boolean;
145+
/** Function(sliderId, modelValue, highValue, pointerType): Function to be called when a slider update is started. If an id was set in the options, then it's passed to this callback. This callback is called before any update on the model. pointerType is either 'min' or 'max' depending on which handle is used. */
146+
onStart?: RzCallback;
147+
/**
148+
* Function to be called when rz-slider-model or rz-slider-high change. If an id was set in the options,
149+
* then it's passed to this callback. pointerType is either 'min' or 'max' depending
150+
* on which handle is used.
151+
*/
152+
onChange?: RzCallback;
153+
/** Function(sliderId, modelValue, highValue, pointerType): Function to be called when a slider update is ended. If an id was set in the options, then it's passed to this callback. pointerType is either 'min' or 'max' depending on which handle is used. */
154+
onEnd?: RzCallback;
155+
/** Boolean (defaults to false): Set to true to show graphs right to left. If vertical is true it will be from top to bottom and left / right arrow functions reversed. */
156+
rightToLeft?: boolean;
157+
/**
158+
* Boolean (defaults to false): Set to true to display the slider vertically. The slider will take the full height of its parent.
159+
* Changing this value at runtime is not currently supported.
160+
*/
161+
vertical?: boolean;
162+
/**
163+
* Boolean (defaults to true): Handles are focusable (on click or with tab) and can be modified using the following keyboard controls:
164+
* Left/bottom arrows: -1
165+
* Right/top arrows: +1
166+
* Page-down: -10%
167+
* Page-up: +10%
168+
* Home: minimum value
169+
* End: maximum value
170+
*/
171+
keyboardSupport?: boolean;
172+
/** Object (default to null): The properties defined in this object will be exposed in the slider template under custom.X. */
173+
customTemplateScope?: any;
174+
}
175+
}
176+
}

dist/rzslider.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
/*! angularjs-slider - v6.2.2 -
1+
/*! angularjs-slider - v6.2.3 -
22
(c) Rafal Zajac <[email protected]>, Valentin Hervieu <[email protected]>, Jussi Saarivirta <[email protected]>, Angelin Sirbu <[email protected]> -
33
https://github.com/angular-slider/angularjs-slider -
4-
2017-05-26 */
4+
2017-07-08 */
55
/*jslint unparam: true */
66
/*global angular: false, console: false, define, module */
77
(function(root, factory) {

dist/rzslider.min.css

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/rzslider.min.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)