Skip to content

fix(Typescript): typescript support for ticksArray as array of objects #666

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Mar 9, 2019
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions dist/rzslider.css

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions dist/rzslider.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ declare module "angular" {
* {value: 10, legend: 'Legend for 10'} // the display value will be 10 and a legend will be displayed under the corresponding tick.
* ]
*/
stepsArray?: any[];
stepsArray?: number[] | Array<{value: number; legend?: string}>;
/**
* Boolean (defaults to false): Set to true to bind the index of the selected item to rz-slider-model and rz-slider-high.
* (This was the default behavior prior to 4.0).
Expand Down Expand Up @@ -131,8 +131,8 @@ declare module "angular" {
showTicks?: boolean | number;
/** 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. */
showTicksValues?: boolean | number;
/** 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. */
ticksArray?: number[];
/** 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. It also supports the { value: 0, legend: 'Bad' } format to display a legend for each tick. */
ticksArray?: number[] | Array<{value: number; legend?: string}>;
/** 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. */
ticksTooltip?: (value: number) => string;
/** Function(value) (defaults to null): Same as ticksTooltip but for ticks values. */
Expand Down
2 changes: 1 addition & 1 deletion dist/rzslider.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*! angularjs-slider - v7.0.0 -
(c) Rafal Zajac <rzajac@gmail.com>, Valentin Hervieu <valentin@hervi.eu>, Jussi Saarivirta <jusasi@gmail.com>, Angelin Sirbu <angelin.sirbu@gmail.com> -
https://github.com/angular-slider/angularjs-slider -
2019-02-23 */
2019-03-06 */
/*jslint unparam: true */
/*global angular: false, console: false, define, module */
;(function(root, factory) {
Expand Down
2 changes: 1 addition & 1 deletion dist/rzslider.min.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/rzslider.min.js

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions dist/rzslider.scss

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions rzslider.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ declare module "angular" {
* {value: 10, legend: 'Legend for 10'} // the display value will be 10 and a legend will be displayed under the corresponding tick.
* ]
*/
stepsArray?: any[];
stepsArray?: number[] | Array<{value: number; legend?: string}>;
/**
* Boolean (defaults to false): Set to true to bind the index of the selected item to rz-slider-model and rz-slider-high.
* (This was the default behavior prior to 4.0).
Expand Down Expand Up @@ -131,8 +131,8 @@ declare module "angular" {
showTicks?: boolean | number;
/** 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. */
showTicksValues?: boolean | number;
/** 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. */
ticksArray?: number[];
/** 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. It also supports the { value: 0, legend: 'Bad' } format to display a legend for each tick. */
ticksArray?: number[] | Array<{value: number; legend?: string}>;
/** 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. */
ticksTooltip?: (value: number) => string;
/** Function(value) (defaults to null): Same as ticksTooltip but for ticks values. */
Expand Down