diff --git a/.github/FUNDING.yml b/.github/FUNDING.yml new file mode 100644 index 0000000..507d3c6 --- /dev/null +++ b/.github/FUNDING.yml @@ -0,0 +1,3 @@ +# These are supported funding model platforms + +github: [ValentinH] diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md new file mode 100644 index 0000000..6028c0c --- /dev/null +++ b/.github/ISSUE_TEMPLATE/bug_report.md @@ -0,0 +1,26 @@ +--- +name: Bug report +about: Create a report to help us improve +title: '' +labels: '' +assignees: '' + +--- + +**Describe the bug** +A clear and concise description of what the bug is. + +**To Reproduce** +Steps to reproduce the behavior: +1. Go to '...' +2. Click on '....' +3. Scroll down to '....' +4. See error + +Demo: https://jsfiddle.net/wm3ce8jb/ (fork this example and update the link) + +**Expected behavior** +A clear and concise description of what you expected to happen. + +**Screenshots** +If applicable, add screenshots to help explain your problem. diff --git a/.gitignore b/.gitignore index a42b179..b2fa3c1 100644 --- a/.gitignore +++ b/.gitignore @@ -5,4 +5,5 @@ temp/ tests/coverage/ yarn.lock cypress/videos -npm-debug.log \ No newline at end of file +npm-debug.log +.history/ \ No newline at end of file diff --git a/.npmrc b/.npmrc new file mode 100644 index 0000000..5660f81 --- /dev/null +++ b/.npmrc @@ -0,0 +1 @@ +registry=https://registry.npmjs.org/ \ No newline at end of file diff --git a/CHANGELOG.md b/CHANGELOG.md index ea82225..ed21eeb 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,9 +1,39 @@ -# 6.5.0 (2018-06-29) +# 7.0.1 (2021-09-06) + +## Bug fix + +- chore(styles): add parentheses around division-like expr's (#679) + +# 7.0.0 (2019-02-23) + +## Feature + +- feat(transition): slider moves are now animated. (this can be disabled via the `disableAnimation` option) + +## Bug fix + +- fix(vertical): Support switching between horizontal and vertical + +## Breaking change + +The module name was renamed from `rzModule` to `rzSlider`. + +# 6.7.0 (2019-02-23) + +## Feature + +- feat(ticks): add the option to use ticksArray as array of objects (#662, thanks @vdiez) + +# 6.6.0 (2018-06-29) ## Feature - feat(range): adds the `restrictedRange` option (#638, thanks @DanielReid) +## ⚠️ Unwanted breaking change ⚠️ + +Sorry for this, but this version is breaking if you are using the `rz-slider-tpl-url` attribute. You need to update your template to have the correct number of elements. + # 6.5.1 (2018-03-30) ## Bug fix @@ -14,7 +44,7 @@ ## Feature -- feat($compile): adds labelOverlapSeparator as an option (#616) +- feat(\$compile): adds labelOverlapSeparator as an option (#616) # 6.4.4 (2018-01-24) @@ -466,9 +496,9 @@ rzslider { ## Performance improvements -- Remove the $timeout call in the init method (#223). -- Remove the $timeout call in the onStart callback. -- Remove the $timeout call in the onChange callback (#229). +- Remove the \$timeout call in the init method (#223). +- Remove the \$timeout call in the onStart callback. +- Remove the \$timeout call in the onChange callback (#229). # 2.4.0 (2015-12-30) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 94bfe68..73b2fc3 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -10,16 +10,16 @@ This project use [Prettier](https://github.com/prettier/prettier) for its code f To contribute to the project, please follow these steps: -1. Get approval for the idea by filing an issue and talking with me about the changes -2. Fork the repo -3. Make a branch for your change -4. Run `npm install` -5. Run `npm run test` -6. Make your changes -7. Test your changes (if you need a new test file, please copy the `test-template.js` file in the tests/specs folder.) -8. Run `npm run build` to generate the dist files -9. Run `git add -A` to add your changes -10. Run `npm run commit` (**Do not** use `git commit`) - follow the prompts to create your git message +1. Get approval for the idea by filing an issue and talking with me about the changes +2. Fork the repo +3. Make a branch for your change +4. Run `yarn` +5. Run `yarn test` +6. Make your changes +7. Test your changes (if you need a new test file, please copy the `test-template.js` file in the tests/specs folder.) +8. Run `yarn build` to generate the dist files +9. Run `git add -A` to add your changes +10. Run `yarn commit` (**Do not** use `git commit`) - follow the prompts to create your git message 11. Push your changes with `git push` 12. Create the Pull Request (a demo showing what the PR does is always good so you can fork [this fiddle](http://jsfiddle.net/cwhgLcjv/)) 13. If there are several commits, please [rebase](https://github.com/edx/edx-platform/wiki/How-to-Rebase-a-Pull-Request) and [squash](https://github.com/edx/edx-platform/wiki/How-to-Rebase-a-Pull-Request#squash-your-changes) everything to only get one commit. diff --git a/Gruntfile.js b/Gruntfile.js index 1724ba9..8d403f2 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -59,7 +59,7 @@ module.exports = function(grunt) { removeScriptTypeAttributes: true, removeStyleLinkTypeAttributes: true, }, - module: 'rzModule', + module: 'rzSlider', url: function(url) { return url.replace('src/', '') }, diff --git a/README.md b/README.md index 466e6a0..d75b95d 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,9 @@ ## AngularJS 1.X slider directive with no external dependencies +Looking for an Angular version (> 1.X)? We got you covered: https://github.com/angular-slider/ngx-slider (Thanks [@piotrdz](https://github.com/piotrdz) :heart: )! + +
+ Status: ![Maintenance](https://img.shields.io/maintenance/support-only/2017.svg?style=flat-square) [![npm version](https://img.shields.io/npm/v/angularjs-slider.svg?style=flat-square)](https://www.npmjs.com/package/angularjs-slider) @@ -12,18 +16,18 @@ Links: [![Join the chat at https://gitter.im/rzajac/angularjs-slider](https://img.shields.io/badge/GITTER-join%20chat-1dce73.svg?style=flat-square)](https://gitter.im/rzajac/angularjs-slider?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge) [![PRs Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg?style=flat-square)](http://makeapullrequest.com) -> I'm looking for a maintainer for this project. I have lost my [Open Source Stamina](https://medium.com/@kentcdodds/open-source-stamina-dafd063f9932#.sfay5wlzp) for this project and I will probably not push any code to this project anymore (unless, I find some motivation later). I will try to merge pull requests if some are submitted, but only if they are really clean. +> I'm looking for a maintainer for this project. I have lost my [Open Source Stamina](https://kentcdodds.com/blog/open-source-stamina) for this project and I will probably not push any code to this project anymore (unless, I find some motivation later). I will try to merge pull requests if some are submitted, but only if they are really clean. Slider directive implementation for AngularJS 1.X, without any dependencies: [http://angular-slider.github.io/angularjs-slider](http://angular-slider.github.io/angularjs-slider/index.html). -* Mobile friendly -* Fast -* Well documented -* Customizable -* Simple to use -* Keyboard support -* Compatibility with jQuery Lite, ie. with full jQuery ( Thanks Jusas! https://github.com/Jusas) -* Supports right to left +- Mobile friendly +- Fast +- Well documented +- Customizable +- Simple to use +- Keyboard support +- Compatibility with jQuery Lite, ie. with full jQuery ( Thanks Jusas! https://github.com/Jusas) +- Supports right to left **Horizontal** @@ -38,14 +42,14 @@ Slider directive implementation for AngularJS 1.X, without any dependencies: [ht ## Examples -* **Simple example for single slider:** [http://jsfiddle.net/cwhgLcjv](http://jsfiddle.net/cwhgLcjv/) -* **Simple example for double slider:** [http://jsfiddle.net/ye1kpfrj](http://jsfiddle.net/ye1kpfrj/) -* **Various examples:** [http://angular-slider.github.io/angularjs-slider](http://angular-slider.github.io/angularjs-slider/index.html) -* **Same examples with live code:** https://jsfiddle.net/ValentinH/954eve2L/ +- **Simple example for single slider:** [http://jsfiddle.net/ValentinH/qjvxn4fc/](http://jsfiddle.net/ValentinH/qjvxn4fc/) +- **Simple example for double slider:** [http://jsfiddle.net/ValentinH/hnyL2axs/](http://jsfiddle.net/ValentinH/hnyL2axs/) +- **Various examples:** [http://angular-slider.github.io/angularjs-slider](http://angular-slider.github.io/angularjs-slider/index.html) +- **Same examples with live code:** https://jsfiddle.net/ValentinH/954eve2L/ ## Reporting issues -Make sure the report is accompanied by a reproducible demo. The ideal demo is created by forking [our standard jsFiddle](http://jsfiddle.net/cwhgLcjv/), adding your own code and stripping it down to an absolute minimum needed to demonstrate the bug. +Make sure the report is accompanied by a reproducible demo. The ideal demo is created by forking [our standard jsFiddle](http://jsfiddle.net/ValentinH/qjvxn4fc/), adding your own code and stripping it down to an absolute minimum needed to demonstrate the bug. ## Common issues @@ -66,9 +70,9 @@ vm.refreshSlider = function() { if you get some flickering issues, you can try to replace to `$timeout` call by `$scope.$$postDigest` as suggested by @maknapp in [this issue](https://github.com/angular-slider/angularjs-slider/issues/79#issuecomment-219213647). -**ng-show-example**: http://jsfiddle.net/3jjye1cL/ +**ng-show-example**: http://jsfiddle.net/ValentinH/nzL6ax43/ -**UI-Boostrap tabs example**: http://jsfiddle.net/0f7sd7dw/ +**UI-Boostrap tabs example**: http://jsfiddle.net/ValentinH/bo23er5w/ ### Decimal value can't be typed in an input field linked to the slider @@ -84,6 +88,12 @@ By default, the slider value is always rounded to the nearest step. A side effec npm i angularjs-slider ``` +or + +``` +yarn add angularjs-slider +``` + #### Typescript Support Typescript definition files are provided with this project. To use them, be sure you have the angular type definition peer dependency installed. @@ -106,23 +116,23 @@ or Directly use (replace `X.X.X` by the version you want to use): -* `https://cdnjs.cloudflare.com/ajax/libs/angularjs-slider/X.X.X/rzslider.min.js` -* `https://cdnjs.cloudflare.com/ajax/libs/angularjs-slider/X.X.X/rzslider.min.css` +- `https://cdnjs.cloudflare.com/ajax/libs/angularjs-slider/X.X.X/rzslider.min.js` +- `https://cdnjs.cloudflare.com/ajax/libs/angularjs-slider/X.X.X/rzslider.min.css` ## Project integration ### Imports ```html - + - + ``` ### Module ```javascript -angular.module('yourApp', ['rzModule']) +angular.module('yourApp', ['rzSlider']) ``` ### Single slider @@ -209,11 +219,11 @@ $scope.slider = { The following variables are available in the template as scope variables. -* `floorLabel`: The value set to `floor` in `rz-slider-options` -* `ceilLabel`: The value set to `ceil` in `rz-slider-options` -* `modelLabel`: The value set to `rz-slider-model` -* `highLabel`: The value set to `rz-slider-high` -* `cmbLabel`: The text shown when the two handlers are close to each other. (e.g. "30-40") +- `floorLabel`: The value set to `floor` in `rz-slider-options` +- `ceilLabel`: The value set to `ceil` in `rz-slider-options` +- `modelLabel`: The value set to `rz-slider-model` +- `highLabel`: The value set to `rz-slider-high` +- `cmbLabel`: The text shown when the two handlers are close to each other. (e.g. "30-40") The library replaces the HTML contents of label elements in the template by default, if you want to stop this behaviour and tweak label HTML on your own, you need to set `no-label-injection` class on the elements you're customizing. @@ -234,6 +244,7 @@ The default options are: minLimit: null, maxLimit: null, restrictedRange: null, + skipRestrictedRangesWithArrowKeys: null, minRange: null, maxRange: null, pushRange: false, @@ -285,7 +296,8 @@ The default options are: ariaLabel: null, ariaLabelledBy: null, ariaLabelHigh: null, - ariaLabelledByHigh: null + ariaLabelledByHigh: null, + disableAnimation: false } ``` @@ -301,7 +313,9 @@ The default options are: **maxLimit** - _Number (defaults to null)_: The maximum value authorized on the slider. -**restrictedRange** - _Object (defaults to null)_: Has two _Number_ properties, _from_ and _to_ that determine the bounds of an area that is not authorized for values. _Applies to range slider only._ +**restrictedRange** - _Object (defaults to null)_: Has two _Number_ properties, _from_ and _to_ that determine the bounds of an area that is not authorized for values. Can also use an array. _Applies to range slider only._ + +**skipRestrictedRangesWithArrowKeys** - _Boolean (defaults to null)_: Set to true to skip restricted ranges with arrow keys. **minRange** - _Number (defaults to null)_: The minimum range authorized on the slider. _Applies to range slider only._ @@ -312,11 +326,11 @@ The default options are: **translate** - _Function(value, sliderId, label)_: Custom translate function. Use this if you want to translate values displayed on the slider. `sliderId` can be used to determine the slider for which we are translating the value. `label` is a string that can take the following values: -* _'model'_: the model label -* _'high'_: the high label -* _'floor'_: the floor label -* _'ceil'_: the ceil label -* _'tick-value'_: the ticks labels +- _'model'_: the model label +- _'high'_: the high label +- _'floor'_: the floor label +- _'ceil'_: the ceil label +- _'tick-value'_: the ticks labels For example if you want to display dollar amounts instead of just numbers: @@ -397,7 +411,7 @@ Just pass an array with each slider value and that's it; the floor, ceil and ste **showTicksValues** - _Boolean or Number (defaults to false)_: Set to true to display a tick and the step value for each step of the slider. Set a number to display ticks and the step value at intermediate positions. This number corresponds to the step between each tick. -**ticksArray** - _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** - _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. **ticksTooltip** - _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. @@ -432,21 +446,21 @@ _Changing this value at runtime is not currently supported._ **keyboardSupport** - _Boolean (defaults to true)_: Handles are focusable (on click or with tab) and can be modified using the following keyboard controls: -* Left/bottom arrows: -1 -* Right/top arrows: +1 -* Page-down: -10% -* Page-up: +10% -* Home: minimum value -* End: maximum value +- Left/bottom arrows: -1 +- Right/top arrows: +1 +- Page-down: -10% +- Page-up: +10% +- Home: minimum value +- End: maximum value **reversedControls** - _Boolean (defaults to false)_: Set to true to reverse keyboard navigation: -* Right/top arrows: -1 -* Left/bottom arrows: +1 -* Page-up: -10% -* Page-down: +10% -* End: minimum value -* Home: maximum value +- Right/top arrows: -1 +- Left/bottom arrows: +1 +- Page-up: -10% +- Page-down: +10% +- End: minimum value +- Home: maximum value **customTemplateScope** - _Object (default to null)_: The properties defined in this object will be exposed in the slider template under `custom.X`. @@ -464,12 +478,14 @@ For custom scales: **ariaLabelledBy and ariaLabelledByHigh** - _String (default to null)_: Use instead of ariaLabel and ariaLabelHigh to reference the id of an element which will be used to label the slider(s). Adds the `aria-labelledby` attribute. +**disableAnimation** - _Boolean (defaults to false)_: Set to true to disable slider animation. + ## Change default options If you want the change the default options for all the sliders displayed in your application, you can set them using the `RzSliderOptions.options()` method: ```js -angular.module('App', ['rzModule']).run(function(RzSliderOptions) { +angular.module('App', ['rzSlider']).run(function(RzSliderOptions) { // show ticks for all sliders RzSliderOptions.options({ showTicks: true }) }) diff --git a/bower.json b/bower.json index 4bad726..e1e88c1 100644 --- a/bower.json +++ b/bower.json @@ -1,6 +1,6 @@ { "name": "angularjs-slider", - "version": "6.6.0", + "version": "7.0.1", "homepage": "https://github.com/angular-slider/angularjs-slider", "authors": [ "Rafal Zajac ", diff --git a/demo/demo.js b/demo/demo.js index cb85950..0911e87 100644 --- a/demo/demo.js +++ b/demo/demo.js @@ -1,4 +1,4 @@ -var app = angular.module('rzSliderDemo', ['rzModule', 'ui.bootstrap']) +var app = angular.module('rzSliderDemo', ['rzSlider', 'ui.bootstrap']) app.controller('MainCtrl', function($scope, $rootScope, $timeout, $uibModal) { //Minimal slider config @@ -65,6 +65,23 @@ app.controller('MainCtrl', function($scope, $rootScope, $timeout, $uibModal) { }, } + // Restricted range with multiple array and the feature skipRestrictedRangesWithArrowKeys + $scope.multipleRestrictedRangeSlider = { + minValue: 10, + maxValue: 90, + options: { + restrictedRange: [ + { from: 20, to: 30 }, + { from: 50, to: 60 }, + { from: 75, to: 85 }, + ], + skipRestrictedRangesWithArrowKeys: true, + floor: 0, + ceil: 100, + step: 1, + }, + } + //Range slider with minRange and maxRange config $scope.minMaxRangeSlider = { minValue: 40, @@ -464,11 +481,6 @@ app.controller('MainCtrl', function($scope, $rootScope, $timeout, $uibModal) { floor: 0, ceil: 10, vertical: true, - showSelectionBarEnd: true, - selectionBarGradient: { - from: 'white', - to: '#0db9f0', - }, }, } $scope.verticalSlider2 = { @@ -478,10 +490,6 @@ app.controller('MainCtrl', function($scope, $rootScope, $timeout, $uibModal) { floor: 0, ceil: 100, vertical: true, - selectionBarGradient: { - from: 'white', - to: '#0db9f0', - }, }, } $scope.verticalSlider3 = { @@ -658,6 +666,7 @@ app.controller('MainCtrl', function($scope, $rootScope, $timeout, $uibModal) { disabled: false, showTicks: false, showTicksValues: false, + vertical: false, }, } $scope.toggleHighValue = function() { diff --git a/demo/directiveInCustomTemplate.html b/demo/directiveInCustomTemplate.html index a2d001a..6009f92 100644 --- a/demo/directiveInCustomTemplate.html +++ b/demo/directiveInCustomTemplate.html @@ -1,8 +1,17 @@
+ + + + + + - - - + + + + + + {{floorLabel}} diff --git a/demo/index.html b/demo/index.html index e637b08..59c8798 100644 --- a/demo/index.html +++ b/demo/index.html @@ -63,6 +63,18 @@

Range slider with restricted area from 30 to 70

> +
+

Range slider with multiple restricted area from 20 to 30, 50 to 60 and 75 to 85 +
+ and the feature that skip restricted ranges with arrow keys +

+ +
+

Range slider with minimum range of 10 and maximum of 50

Slider with all options demo


- +
+
, Valentin Hervieu , Jussi Saarivirta , Angelin Sirbu - +/*! angularjs-slider - v7.1.0 - + (c) Rafal Zajac , Valentin Hervieu , Jussi Saarivirta , Angelin Sirbu - https://github.com/angular-slider/angularjs-slider - - 2018-06-29 */ + 2022-05-26 */ .rzslider { position: relative; display: inline-block; @@ -15,6 +15,10 @@ user-select: none; } +.rzslider.noanimate * { + transition: none !important; +} + .rzslider.with-legend { margin-bottom: 40px; } @@ -64,6 +68,7 @@ padding-top: 16px; margin-top: -16px; box-sizing: border-box; + transition: all linear 0.3s; } .rzslider .rz-draggable { @@ -95,6 +100,7 @@ z-index: 2; background: #0db9f0; border-radius: 2px; + transition: background-color linear 0.3s; } .rzslider .rz-restricted { @@ -111,6 +117,7 @@ cursor: pointer; background-color: #0db9f0; border-radius: 16px; + transition: all linear 0.3s; } .rzslider .rz-pointer:after { @@ -141,10 +148,12 @@ padding: 1px 3px; color: #55637d; cursor: default; + transition: all linear 0.3s; } .rzslider .rz-bubble.rz-limit { color: #55637d; + transition: none; } .rzslider .rz-ticks { @@ -175,6 +184,7 @@ cursor: pointer; background: #d8e0f3; border-radius: 50%; + transition: background-color linear 0.3s; } .rzslider .rz-tick.rz-selected { @@ -271,4 +281,4 @@ bottom: auto; left: auto; } -/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInJ6c2xpZGVyLmNzcyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQTs7O2NBR2M7QUFDZDtFQUNFLG1CQUFtQjtFQUNuQixzQkFBc0I7RUFDdEIsWUFBWTtFQUNaLFlBQVk7RUFDWixzQkFBc0I7RUFDdEIsdUJBQXVCO0VBQ3ZCLDBCQUFrQjtLQUFsQix1QkFBa0I7TUFBbEIsc0JBQWtCO1VBQWxCLGtCQUFrQjtDQUNuQjs7QUFFRDtFQUNFLG9CQUFvQjtDQUNyQjs7QUFFRDtFQUNFLG9CQ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weDtcbn1cblxuLnJ6c2xpZGVyLnJ6LXZlcnRpY2FsIC5yei10aWNrcyB7XG4gIHRvcDogMDtcbiAgbGVmdDogLTNweDtcbiAgei1pbmRleDogMTtcbiAgd2lkdGg6IDA7XG4gIGhlaWdodDogMTAwJTtcbn1cblxuLnJ6c2xpZGVyLnJ6LXZlcnRpY2FsIC5yei10aWNrIHtcbiAgbWFyZ2luLXRvcDogMTFweDtcbiAgbWFyZ2luLWxlZnQ6IGF1dG87XG4gIHZlcnRpY2FsLWFsaWduOiBtaWRkbGU7XG59XG5cbi5yenNsaWRlci5yei12ZXJ0aWNhbCAucnotdGljay12YWx1ZSB7XG4gIHRvcDogYXV0bztcbiAgbGVmdDogMjRweDtcbiAgdHJhbnNmb3JtOiB0cmFuc2xhdGUoMCwgLTI4JSk7XG59XG5cbi5yenNsaWRlci5yei12ZXJ0aWNhbCAucnotdGljay1sZWdlbmQge1xuICB0b3A6IGF1dG87XG4gIHJpZ2h0OiAyNHB4O1xuICBtYXgtd2lkdGg6IG5vbmU7XG4gIHdoaXRlLXNwYWNlOiBub3dyYXA7XG4gIHRyYW5zZm9ybTogdHJhbnNsYXRlKDAsIC0yOCUpO1xufVxuXG4ucnpzbGlkZXIucnotdmVydGljYWwgLnJ6LXRpY2tzLXZhbHVlcy11bmRlciAucnotdGljay12YWx1ZSB7XG4gIHJpZ2h0OiAyNHB4O1xuICBib3R0b206IGF1dG87XG4gIGxlZnQ6IGF1dG87XG59Il19 */ \ No newline at end of file +/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInJ6c2xpZGVyLmNzcyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQTs7O2NBR2M7QUFDZDtFQUNFLG1CQUFtQjtFQUNuQixzQkFBc0I7RUFDdEIsWUFBWTtFQUNaLFlBQVk7RUFDWixzQkFBc0I7RUFDdEIsdUJBQXVCO0VBQ3ZCLDBCQUFrQjtLQUFsQix1QkFBa0I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IC5yei10aWNrLWxlZ2VuZCB7XG4gIHRvcDogYXV0bztcbiAgcmlnaHQ6IDI0cHg7XG4gIG1heC13aWR0aDogbm9uZTtcbiAgd2hpdGUtc3BhY2U6IG5vd3JhcDtcbiAgdHJhbnNmb3JtOiB0cmFuc2xhdGUoMCwgLTI4JSk7XG59XG5cbi5yenNsaWRlci5yei12ZXJ0aWNhbCAucnotdGlja3MtdmFsdWVzLXVuZGVyIC5yei10aWNrLXZhbHVlIHtcbiAgcmlnaHQ6IDI0cHg7XG4gIGJvdHRvbTogYXV0bztcbiAgbGVmdDogYXV0bztcbn0iXX0= */ \ No newline at end of file diff --git a/dist/rzslider.d.ts b/dist/rzslider.d.ts index c26c9ed..e9ec697 100644 --- a/dist/rzslider.d.ts +++ b/dist/rzslider.d.ts @@ -25,7 +25,14 @@ declare module "angular" { minLimit?: number; /** Number (defaults to null): The maximum value authorized on the slider. */ maxLimit?: number; - /** Number (defaults to null): The minimum range authorized on the slider. Applies to range slider only. */ + /** + * Object(defaults to null): Has two _Number_ properties, _from_ and _to_ that determine + * the bounds of an area that is not authorized for values. _Applies to range slider only._ + */ + restrictedRange?: { from: number, to: number } | Array<{from: number, to: number}>; + /** Number (defaults to null): The minimum range authorized on the slider. Applies to range slider only. Can also use an array.*/ + skipRestrictedRangesWithArrowKeys?: boolean + /** Set to true to skip restricted ranges with arrow keys. */ minRange?: number; /** Number (defaults to null): The maximum range authorized on the slider. Applies to range slider only. */ maxRange?: number; @@ -70,7 +77,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). @@ -126,8 +133,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. */ @@ -203,6 +210,8 @@ declare module "angular" { ariaLabelledBy?: string; /** String(default to null): Use instead of ariaLabel and ariaLabelHigh to reference the id of an element which will be used to label the slider(s). Adds the aria-labelledby attribute. */ ariaLabelledByHigh?: string; + /** Boolean (defaults to false): Set to true to disable slider animation. */ + disableAnimation?: boolean; } } } diff --git a/dist/rzslider.js b/dist/rzslider.js index c3025a7..c8fdfd5 100644 --- a/dist/rzslider.js +++ b/dist/rzslider.js @@ -1,7 +1,7 @@ -/*! angularjs-slider - v6.6.0 - - (c) Rafal Zajac , Valentin Hervieu , Jussi Saarivirta , Angelin Sirbu - +/*! angularjs-slider - v7.1.0 - + (c) Rafal Zajac , Valentin Hervieu , Jussi Saarivirta , Angelin Sirbu - https://github.com/angular-slider/angularjs-slider - - 2018-06-29 */ + 2022-05-26 */ /*jslint unparam: true */ /*global angular: false, console: false, define, module */ ;(function(root, factory) { @@ -27,7 +27,7 @@ })(this, function(angular) { 'use strict' var module = angular - .module('rzModule', []) + .module('rzSlider', []) .factory('RzSliderOptions', function() { var defaultOptions = { floor: 0, @@ -37,6 +37,7 @@ minRange: null, maxRange: null, restrictedRange: null, + skipRestrictedRangesWithArrowKeys: null, pushRange: false, minLimit: null, maxLimit: null, @@ -72,6 +73,7 @@ enforceRange: false, noSwitching: false, onlyBindHandles: false, + disableAnimation: false, onStart: null, onChange: null, onEnd: null, @@ -97,7 +99,7 @@ * `options({})` allows global configuration of all sliders in the * application. * - * var app = angular.module( 'App', ['rzModule'], function( RzSliderOptions ) { + * var app = angular.module( 'App', ['rzSlider'], function( RzSliderOptions ) { * // show ticks for all sliders * RzSliderOptions.options( { showTicks: true } ); * }); @@ -332,6 +334,11 @@ */ this.currentFocusElement = null + /** + * Internal variable to know if we are already moving + */ + this.moving = false + // Slider DOM elements wrapped in jqLite this.fullBar = null // The whole slider bar this.selBar = null // Highlight between two handles @@ -387,6 +394,10 @@ this.initHasRun = true + if (this.options.disableAnimation) { + this.sliderElem.addClass('noanimate') + } + // Watch for changes to the model thrLow = rzThrottle(function() { self.onLowHandleChange() @@ -510,8 +521,8 @@ }, /* - * Reflow the slider when the low handle changes (called with throttle) - */ + * Reflow the slider when the low handle changes (called with throttle) + */ onLowHandleChange: function() { this.syncLowValue() if (this.range) this.syncHighValue() @@ -526,8 +537,8 @@ }, /* - * Reflow the slider when the high handle changes (called with throttle) - */ + * Reflow the slider when the high handle changes (called with throttle) + */ onHighHandleChange: function() { this.syncLowValue() this.syncHighValue() @@ -594,6 +605,9 @@ if (this.options.vertical) { this.positionProperty = 'bottom' this.dimensionProperty = 'height' + } else { + this.positionProperty = 'left' + this.dimensionProperty = 'width' } if (this.options.customTemplateScope) @@ -628,6 +642,7 @@ * @returns {undefined} */ resetSlider: function() { + this.resetLabelsValue() this.manageElementsStyle() this.addAccessibility() this.setMinAndMax() @@ -651,6 +666,40 @@ } }, + /** + * Check if the restrictedRange option using multiple or not + * + * Run only once during initialization and only in case 4 + * + * @returns {undefined} + */ + + ensureRestrictedBarIsArray: function(elem) { + var jElem = angular.element(elem) + this.restrictedBar = [] + if (this.options.restrictedRange) { + // this.options.restrictedRange converting to an array even if it's not entered as array. + this.options.restrictedRange = !Array.isArray( + this.options.restrictedRange + ) + ? [this.options.restrictedRange] + : this.options.restrictedRange + this.restrictedBar[0] = jElem + var mainDiv = elem.parentElement + for (var i = 1; i < this.options.restrictedRange.length; i++) { + var sp = document.createElement('span') + sp.setAttribute('class', 'rz-bar-wrapper') + sp.innerHTML = + '' + mainDiv.appendChild(sp) + this.restrictedBar[i] = angular.element(sp) + } + } else { + elem.style.visibility = 'hidden' + this.restrictedBar = null + } + }, + /** * Set the slider children to variables for easy access * @@ -679,7 +728,7 @@ this.selBar = jElem break case 4: - this.restrictedBar = jElem + this.ensureRestrictedBarIsArray(elem) break case 5: this.minH = jElem @@ -759,7 +808,16 @@ this.leftOutSelBar, !this.range || !this.options.showOuterSelectionBars ) - this.alwaysHide(this.restrictedBar, !this.options.restrictedRange) + + // this.restrictedBar is everytime an array + for (var r in this.restrictedBar) { + if (this.restrictedBar[r]) + this.alwaysHide( + this.restrictedBar[r], + !this.options.restrictedRange[r] + ) + } + this.alwaysHide( this.rightOutSelBar, !this.range || !this.options.showOuterSelectionBars @@ -769,7 +827,11 @@ this.fullBar.addClass('rz-transparent') } - if (this.options.vertical) this.sliderElem.addClass('rz-vertical') + if (this.options.vertical) { + this.sliderElem.addClass('rz-vertical') + } else { + this.sliderElem.removeClass('rz-vertical') + } if (this.options.draggableRange) this.selBar.addClass('rz-draggable') else this.selBar.removeClass('rz-draggable') @@ -816,6 +878,14 @@ resetLabelsValue: function() { this.minLab.rzsv = undefined this.maxLab.rzsv = undefined + this.flrLab.rzsv = undefined + this.ceilLab.rzsv = undefined + this.cmbLab.rzsv = undefined + this.resetPosition(this.flrLab) + this.resetPosition(this.ceilLab) + this.resetPosition(this.cmbLab) + this.resetPosition(this.minLab) + this.resetPosition(this.maxLab) }, /** @@ -935,8 +1005,11 @@ ) this.minH.attr('tabindex', '0') else this.minH.attr('tabindex', '') - if (this.options.vertical) + if (this.options.vertical) { this.minH.attr('aria-orientation', 'vertical') + } else { + this.minH.attr('aria-orientation', 'horizontal') + } if (this.options.ariaLabel) this.minH.attr('aria-label', this.options.ariaLabel) else if (this.options.ariaLabelledBy) @@ -952,6 +1025,7 @@ else this.maxH.attr('tabindex', '') if (this.options.vertical) this.maxH.attr('aria-orientation', 'vertical') + else this.maxH.attr('aria-orientation', 'horizontal') if (this.options.ariaLabelHigh) this.maxH.attr('aria-label', this.options.ariaLabelHigh) else if (this.options.ariaLabelledByHigh) @@ -1033,12 +1107,19 @@ if (this.options.rightToLeft) ticksArray.reverse() this.scope.ticks = ticksArray.map(function(value) { + var legend = null + if (angular.isObject(value)) { + legend = value.legend + value = value.value + } + var position = self.valueToPosition(value) if (self.options.vertical) position = self.maxPos - position var translation = translate + '(' + Math.round(position) + 'px)' var tick = { + legend: legend, selected: self.isTickSelected(value), style: { '-webkit-transform': translation, @@ -1071,7 +1152,7 @@ } } if (self.getLegend) { - var legend = self.getLegend(value, self.options.id) + legend = self.getLegend(value, self.options.id) if (legend) tick.legend = legend } return tick @@ -1321,14 +1402,23 @@ var position = 0, dimension = 0 if (this.options.restrictedRange) { - var from = this.valueToPosition(this.options.restrictedRange.from), - to = this.valueToPosition(this.options.restrictedRange.to) - dimension = Math.abs(to - from) - position = this.options.rightToLeft - ? to + this.handleHalfDim - : from + this.handleHalfDim - this.setDimension(this.restrictedBar, dimension) - this.setPosition(this.restrictedBar, position) + this.options.restrictedRange = !Array.isArray( + this.options.restrictedRange + ) + ? [this.options.restrictedRange] + : this.options.restrictedRange + for (var i in this.options.restrictedRange) { + var from = this.valueToPosition( + this.options.restrictedRange[i].from + ), + to = this.valueToPosition(this.options.restrictedRange[i].to) + dimension = Math.abs(to - from) + position = this.options.rightToLeft + ? to + this.handleHalfDim + : from + this.handleHalfDim + this.setDimension(this.restrictedBar[i], dimension) + this.setPosition(this.restrictedBar[i], position) + } } }, @@ -1410,8 +1500,8 @@ ? 'bottom' : 'top' : reversed - ? 'left' - : 'right' + ? 'left' + : 'right' this.scope.barStyle = { backgroundImage: 'linear-gradient(to ' + @@ -1615,6 +1705,13 @@ return pos }, + resetPosition: function(elem) { + elem.css({ + left: null, + bottom: null, + }) + }, + /** * Get element width/height depending on whether slider is horizontal or vertical * @@ -2029,6 +2126,12 @@ * @returns {undefined} */ onMove: function(pointer, event, fromTick) { + if (!this.options.disableAnimation) { + if (this.moving) { + this.sliderElem.addClass('noanimate') + } + } + this.moving = true var changedTouches = this.getEventAttr(event, 'changedTouches') var touchForThisSlider if (changedTouches) { @@ -2075,6 +2178,10 @@ * @returns {undefined} */ onEnd: function(ehMove, event) { + this.moving = false + if (!this.options.disableAnimation) { + this.sliderElem.removeClass('noanimate') + } var changedTouches = this.getEventAttr(event, 'changedTouches') if (changedTouches && changedTouches[0].identifier !== this.touchId) { return @@ -2129,6 +2236,55 @@ } }, + /** + * Skip restricted range function when arrow keys use + * + * @param {number} currentValue value of the slider + * @param {number} key arrow key used + * + * @returns {number} currentValue value of the slider + */ + + skipRestrictedRanges: function(key, currentValue) { + if ( + this.options.restrictedRange && + Array.isArray(this.options.restrictedRange) + ) { + for (var i in this.options.restrictedRange) { + var range = this.options.restrictedRange[i] + // if it first or last value + if ( + (range.from === 0 && + currentValue === 0 && + [37, 40].includes(key)) || // LEFT or DOWN + (range.to >= + this.options.restrictedRange[ + this.options.restrictedRange.length - 1 + ].to && + currentValue >= + this.options.restrictedRange[ + this.options.restrictedRange.length - 1 + ].to && + [38, 39].includes(key)) // UP or RIGHT + ) { + return currentValue + } + if (range.to > currentValue && currentValue > range.from) { + if ( + Math.abs(range.to - currentValue) > + Math.abs(range.from - currentValue) + ) { + currentValue = range.to + } else { + currentValue = range.from + } + } + } + } + + return currentValue + }, + /** * Key actions helper function * @@ -2174,9 +2330,9 @@ }, onKeyboardEvent: function(event) { - var currentValue = this[this.tracking], - keyCode = event.keyCode || event.which, - keys = { + var keyCode = event.keyCode || event.which + var currentValue = this[this.tracking] + var keys = { 38: 'UP', 40: 'DOWN', 37: 'LEFT', @@ -2200,6 +2356,9 @@ var self = this $timeout(function() { var newValue = self.roundStep(self.sanitizeValue(action)) + newValue = self.options.skipRestrictedRangesWithArrowKeys + ? self.skipRestrictedRanges(keyCode, newValue) + : newValue if (!self.options.draggableRangeOnly) { self.positionTrackingHandle(newValue) } else { @@ -2321,6 +2480,12 @@ * @returns {undefined} */ onDragMove: function(pointer, event) { + if (!this.options.disableAnimation) { + if (this.moving) { + this.sliderElem.addClass('noanimate') + } + } + this.moving = true var newPos = this.getEventPosition(event), newMinValue, newMaxValue, @@ -2488,26 +2653,30 @@ }, applyRestrictedRange: function(newValue) { - if ( - this.options.restrictedRange != null && - newValue > this.options.restrictedRange.from && - newValue < this.options.restrictedRange.to - ) { - var halfWidth = - (this.options.restrictedRange.to - - this.options.restrictedRange.from) / - 2 - if (this.tracking === 'lowValue') { - return newValue > this.options.restrictedRange.from + halfWidth - ? this.options.restrictedRange.to - : this.options.restrictedRange.from - } - if (this.tracking === 'highValue') { - return newValue < this.options.restrictedRange.to - halfWidth - ? this.options.restrictedRange.from - : this.options.restrictedRange.to + for (var i in this.options.restrictedRange) { + if ( + this.options.restrictedRange[i] != null && + newValue > this.options.restrictedRange[i].from && + newValue < this.options.restrictedRange[i].to + ) { + var halfWidth = + (this.options.restrictedRange[i].to - + this.options.restrictedRange[i].from) / + 2 + if (this.tracking === 'lowValue') { + return newValue > + this.options.restrictedRange[i].from + halfWidth + ? this.options.restrictedRange[i].to + : this.options.restrictedRange[i].from + } + if (this.tracking === 'highValue') { + return newValue < this.options.restrictedRange[i].to - halfWidth + ? this.options.restrictedRange[i].from + : this.options.restrictedRange[i].to + } } } + return newValue }, diff --git a/dist/rzslider.min.css b/dist/rzslider.min.css index d981872..ab1f8c9 100644 --- a/dist/rzslider.min.css +++ b/dist/rzslider.min.css @@ -1,2 +1,2 @@ -/*! angularjs-slider - v6.6.0 - (c) Rafal Zajac , Valentin Hervieu , Jussi Saarivirta , Angelin Sirbu - https://github.com/angular-slider/angularjs-slider - 2018-06-29 */ -.rzslider{position:relative;display:inline-block;width:100%;height:4px;margin:35px 0 15px 0;vertical-align:middle;user-select:none}.rzslider.with-legend{margin-bottom:40px}.rzslider[disabled]{cursor:not-allowed}.rzslider[disabled] .rz-pointer{cursor:not-allowed;background-color:#d8e0f3}.rzslider[disabled] .rz-draggable{cursor:not-allowed}.rzslider[disabled] .rz-selection{background:#8b91a2}.rzslider[disabled] .rz-tick{cursor:not-allowed}.rzslider[disabled] .rz-tick.rz-selected{background:#8b91a2}.rzslider span{position:absolute;display:inline-block;white-space:nowrap}.rzslider .rz-base{width:100%;height:100%;padding:0}.rzslider .rz-bar-wrapper{left:0;z-index:1;width:100%;height:32px;padding-top:16px;margin-top:-16px;box-sizing:border-box}.rzslider .rz-draggable{cursor:move}.rzslider .rz-bar{left:0;z-index:1;width:100%;height:4px;background:#d8e0f3;-webkit-border-radius:2px;-moz-border-radius:2px;border-radius:2px}.rzslider .rz-bar-wrapper.rz-transparent .rz-bar{background:transparent}.rzslider .rz-bar-wrapper.rz-left-out-selection .rz-bar{background:#df002d}.rzslider .rz-bar-wrapper.rz-right-out-selection .rz-bar{background:#03a688}.rzslider .rz-selection{z-index:2;background:#0db9f0;-webkit-border-radius:2px;-moz-border-radius:2px;border-radius:2px}.rzslider .rz-restricted{z-index:3;background:#f00;-webkit-border-radius:2px;-moz-border-radius:2px;border-radius:2px}.rzslider .rz-pointer{top:-14px;z-index:3;width:32px;height:32px;cursor:pointer;background-color:#0db9f0;-webkit-border-radius:16px;-moz-border-radius:16px;border-radius:16px}.rzslider .rz-pointer:after{position:absolute;top:12px;left:12px;width:8px;height:8px;background:#fff;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px;content:''}.rzslider .rz-pointer:hover:after{background-color:#fff}.rzslider .rz-pointer.rz-active{z-index:4}.rzslider .rz-pointer.rz-active:after{background-color:#451aff}.rzslider .rz-bubble{bottom:16px;padding:1px 3px;color:#55637d;cursor:default}.rzslider .rz-bubble.rz-limit{color:#55637d}.rzslider .rz-ticks{position:absolute;top:-3px;left:0;z-index:1;width:100%;height:0;margin:0;list-style:none;box-sizing:border-box}.rzslider .rz-ticks-values-under .rz-tick-value{top:auto;bottom:-32px}.rzslider .rz-tick{position:absolute;top:0;left:0;width:10px;height:10px;margin-left:11px;text-align:center;cursor:pointer;background:#d8e0f3;border-radius:50%}.rzslider .rz-tick.rz-selected{background:#0db9f0}.rzslider .rz-tick-value{position:absolute;top:-30px;transform:translate(-50%,0)}.rzslider .rz-tick-legend{position:absolute;top:24px;max-width:50px;white-space:normal;transform:translate(-50%,0)}.rzslider.rz-vertical{position:relative;width:4px;height:100%;padding:0;margin:0 20px;vertical-align:baseline}.rzslider.rz-vertical .rz-base{width:100%;height:100%;padding:0}.rzslider.rz-vertical .rz-bar-wrapper{top:auto;left:0;width:32px;height:100%;padding:0 0 0 16px;margin:0 0 0 -16px}.rzslider.rz-vertical .rz-bar{bottom:0;left:auto;width:4px;height:100%}.rzslider.rz-vertical .rz-pointer{top:auto;bottom:0;left:-14px!important}.rzslider.rz-vertical .rz-bubble{bottom:0;left:16px!important;margin-left:3px}.rzslider.rz-vertical .rz-ticks{top:0;left:-3px;z-index:1;width:0;height:100%}.rzslider.rz-vertical .rz-tick{margin-top:11px;margin-left:auto;vertical-align:middle}.rzslider.rz-vertical .rz-tick-value{top:auto;left:24px;transform:translate(0,-28%)}.rzslider.rz-vertical .rz-tick-legend{top:auto;right:24px;max-width:none;white-space:nowrap;transform:translate(0,-28%)}.rzslider.rz-vertical .rz-ticks-values-under .rz-tick-value{right:24px;bottom:auto;left:auto} \ No newline at end of file +/*! angularjs-slider - v7.1.0 - (c) Rafal Zajac , Valentin Hervieu , Jussi Saarivirta , Angelin Sirbu - https://github.com/angular-slider/angularjs-slider - 2022-05-26 */ +.rzslider{position:relative;display:inline-block;width:100%;height:4px;margin:35px 0 15px 0;vertical-align:middle;user-select:none}.rzslider.noanimate *{transition:none!important}.rzslider.with-legend{margin-bottom:40px}.rzslider[disabled]{cursor:not-allowed}.rzslider[disabled] .rz-pointer{cursor:not-allowed;background-color:#d8e0f3}.rzslider[disabled] .rz-draggable{cursor:not-allowed}.rzslider[disabled] .rz-selection{background:#8b91a2}.rzslider[disabled] .rz-tick{cursor:not-allowed}.rzslider[disabled] .rz-tick.rz-selected{background:#8b91a2}.rzslider span{position:absolute;display:inline-block;white-space:nowrap}.rzslider .rz-base{width:100%;height:100%;padding:0}.rzslider .rz-bar-wrapper{left:0;z-index:1;width:100%;height:32px;padding-top:16px;margin-top:-16px;box-sizing:border-box;transition:all linear .3s}.rzslider .rz-draggable{cursor:move}.rzslider .rz-bar{left:0;z-index:1;width:100%;height:4px;background:#d8e0f3;-webkit-border-radius:2px;-moz-border-radius:2px;border-radius:2px}.rzslider .rz-bar-wrapper.rz-transparent .rz-bar{background:transparent}.rzslider .rz-bar-wrapper.rz-left-out-selection .rz-bar{background:#df002d}.rzslider .rz-bar-wrapper.rz-right-out-selection .rz-bar{background:#03a688}.rzslider .rz-selection{z-index:2;background:#0db9f0;-webkit-border-radius:2px;-moz-border-radius:2px;border-radius:2px;transition:background-color linear .3s}.rzslider .rz-restricted{z-index:3;background:#f00;-webkit-border-radius:2px;-moz-border-radius:2px;border-radius:2px}.rzslider .rz-pointer{top:-14px;z-index:3;width:32px;height:32px;cursor:pointer;background-color:#0db9f0;-webkit-border-radius:16px;-moz-border-radius:16px;border-radius:16px;transition:all linear .3s}.rzslider .rz-pointer:after{position:absolute;top:12px;left:12px;width:8px;height:8px;background:#fff;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px;content:''}.rzslider .rz-pointer:hover:after{background-color:#fff}.rzslider .rz-pointer.rz-active{z-index:4}.rzslider .rz-pointer.rz-active:after{background-color:#451aff}.rzslider .rz-bubble{bottom:16px;padding:1px 3px;color:#55637d;cursor:default;transition:all linear .3s}.rzslider .rz-bubble.rz-limit{color:#55637d;transition:none}.rzslider .rz-ticks{position:absolute;top:-3px;left:0;z-index:1;width:100%;height:0;margin:0;list-style:none;box-sizing:border-box}.rzslider .rz-ticks-values-under .rz-tick-value{top:auto;bottom:-32px}.rzslider .rz-tick{position:absolute;top:0;left:0;width:10px;height:10px;margin-left:11px;text-align:center;cursor:pointer;background:#d8e0f3;border-radius:50%;transition:background-color linear .3s}.rzslider .rz-tick.rz-selected{background:#0db9f0}.rzslider .rz-tick-value{position:absolute;top:-30px;transform:translate(-50%,0)}.rzslider .rz-tick-legend{position:absolute;top:24px;max-width:50px;white-space:normal;transform:translate(-50%,0)}.rzslider.rz-vertical{position:relative;width:4px;height:100%;padding:0;margin:0 20px;vertical-align:baseline}.rzslider.rz-vertical .rz-base{width:100%;height:100%;padding:0}.rzslider.rz-vertical .rz-bar-wrapper{top:auto;left:0;width:32px;height:100%;padding:0 0 0 16px;margin:0 0 0 -16px}.rzslider.rz-vertical .rz-bar{bottom:0;left:auto;width:4px;height:100%}.rzslider.rz-vertical .rz-pointer{top:auto;bottom:0;left:-14px!important}.rzslider.rz-vertical .rz-bubble{bottom:0;left:16px!important;margin-left:3px}.rzslider.rz-vertical .rz-ticks{top:0;left:-3px;z-index:1;width:0;height:100%}.rzslider.rz-vertical .rz-tick{margin-top:11px;margin-left:auto;vertical-align:middle}.rzslider.rz-vertical .rz-tick-value{top:auto;left:24px;transform:translate(0,-28%)}.rzslider.rz-vertical .rz-tick-legend{top:auto;right:24px;max-width:none;white-space:nowrap;transform:translate(0,-28%)}.rzslider.rz-vertical .rz-ticks-values-under .rz-tick-value{right:24px;bottom:auto;left:auto} \ No newline at end of file diff --git a/dist/rzslider.min.js b/dist/rzslider.min.js index bcea30d..e0e5927 100644 --- a/dist/rzslider.min.js +++ b/dist/rzslider.min.js @@ -1,3 +1,3 @@ -/*! angularjs-slider - v6.6.0 - (c) Rafal Zajac , Valentin Hervieu , Jussi Saarivirta , Angelin Sirbu - https://github.com/angular-slider/angularjs-slider - 2018-06-29 */ -!function(a,b){"use strict";if("function"==typeof define&&define.amd)define(["angular"],b);else if("object"==typeof module&&module.exports){var c=angular||require("angular");c&&c.module||"undefined"==typeof angular||(c=angular),module.exports=b(c)}else b(a.angular)}(this,function(a){"use strict";var b=a.module("rzModule",[]).factory("RzSliderOptions",function(){var b={floor:0,ceil:null,step:1,precision:0,minRange:null,maxRange:null,restrictedRange:null,pushRange:!1,minLimit:null,maxLimit:null,id:null,translate:null,getLegend:null,stepsArray:null,bindIndexForStepsArray:!1,draggableRange:!1,draggableRangeOnly:!1,showSelectionBar:!1,showSelectionBarEnd:!1,showSelectionBarFromValue:null,showOuterSelectionBars:!1,hidePointerLabels:!1,hideLimitLabels:!1,autoHideLimitLabels:!0,readOnly:!1,disabled:!1,interval:350,showTicks:!1,showTicksValues:!1,ticksArray:null,ticksTooltip:null,ticksValuesTooltip:null,vertical:!1,getSelectionBarColor:null,getTickColor:null,getPointerColor:null,keyboardSupport:!0,scale:1,enforceStep:!0,enforceRange:!1,noSwitching:!1,onlyBindHandles:!1,onStart:null,onChange:null,onEnd:null,rightToLeft:!1,reversedControls:!1,boundPointerLabels:!0,mergeRangeLabelsIfSame:!1,labelOverlapSeparator:" - ",customTemplateScope:null,logScale:!1,customValueToPosition:null,customPositionToValue:null,selectionBarGradient:null,ariaLabel:null,ariaLabelledBy:null,ariaLabelHigh:null,ariaLabelledByHigh:null},c={},d={};return d.options=function(b){a.extend(c,b)},d.getOptions=function(d){return a.extend({},b,c,d)},d}).factory("rzThrottle",["$timeout",function(a){return function(b,c,d){var e,f,g,h=Date.now||function(){return(new Date).getTime()},i=null,j=0;d=d||{};var k=function(){j=h(),i=null,g=b.apply(e,f),e=f=null};return function(){var l=h(),m=c-(l-j);return e=this,f=arguments,0>=m?(a.cancel(i),i=null,j=l,g=b.apply(e,f),e=f=null):i||d.trailing===!1||(i=a(k,m)),g}}}]).factory("RzSlider",["$timeout","$document","$window","$compile","RzSliderOptions","rzThrottle",function(b,c,d,e,f,g){var h=function(a,b){this.scope=a,this.lowValue=0,this.highValue=0,this.sliderElem=b,this.range=void 0!==this.scope.rzSliderModel&&void 0!==this.scope.rzSliderHigh,this.dragging={active:!1,value:0,difference:0,position:0,lowLimit:0,highLimit:0},this.positionProperty="left",this.dimensionProperty="width",this.handleHalfDim=0,this.maxPos=0,this.precision=0,this.step=1,this.tracking="",this.minValue=0,this.maxValue=0,this.valueRange=0,this.intermediateTicks=!1,this.initHasRun=!1,this.firstKeyDown=!1,this.internalChange=!1,this.cmbLabelShown=!1,this.currentFocusElement=null,this.fullBar=null,this.selBar=null,this.minH=null,this.maxH=null,this.flrLab=null,this.ceilLab=null,this.minLab=null,this.maxLab=null,this.cmbLab=null,this.ticks=null,this.init()};return h.prototype={init:function(){var b,c,e=this,f=function(){e.calcViewDimensions()};this.applyOptions(),this.syncLowValue(),this.range&&this.syncHighValue(),this.initElemHandles(),this.manageElementsStyle(),this.setDisabledState(),this.calcViewDimensions(),this.setMinAndMax(),this.updateRestrictionBar(),this.addAccessibility(),this.updateCeilLab(),this.updateFloorLab(),this.initHandles(),this.manageEventsBindings(),this.scope.$on("reCalcViewDimensions",f),a.element(d).on("resize",f),this.initHasRun=!0,b=g(function(){e.onLowHandleChange()},e.options.interval),c=g(function(){e.onHighHandleChange()},e.options.interval),this.scope.$on("rzSliderForceRender",function(){e.resetLabelsValue(),b(),e.range&&c(),e.resetSlider()}),this.scope.$watchCollection("rzSliderOptions()",function(a,b){a!==b&&(e.applyOptions(),e.syncLowValue(),e.range&&e.syncHighValue(),e.resetSlider())}),this.scope.$watch("rzSliderModel",function(a,c){e.internalChange||a!==c&&b()}),this.scope.$watch("rzSliderHigh",function(a,b){e.internalChange||a!==b&&(null!=a&&c(),(e.range&&null==a||!e.range&&null!=a)&&(e.applyOptions(),e.resetSlider()))}),this.scope.$on("$destroy",function(){e.unbindEvents(),a.element(d).off("resize",f),e.currentFocusElement=null})},findStepIndex:function(b){for(var c=0,d=0;d0&&0===b.rzsd)&&(f=!0,b.rzsv=e),g||b.html(e),this.scope[c+"Label"]=e,f&&this.getDimension(b)},setMinAndMax:function(){if(this.step=+this.options.step,this.precision=+this.options.precision,this.minValue=this.options.floor,this.options.logScale&&0===this.minValue)throw Error("Can't use floor=0 with logarithmic scale");this.options.enforceStep&&(this.lowValue=this.roundStep(this.lowValue),this.range&&(this.highValue=this.roundStep(this.highValue))),null!=this.options.ceil?this.maxValue=this.options.ceil:this.maxValue=this.options.ceil=this.range?this.highValue:this.lowValue,this.options.enforceRange&&(this.lowValue=this.sanitizeValue(this.lowValue),this.range&&(this.highValue=this.sanitizeValue(this.highValue))),this.applyLowValue(),this.range&&this.applyHighValue(),this.valueRange=this.maxValue-this.minValue},addAccessibility:function(){this.minH.attr("role","slider"),this.updateAriaAttributes(),!this.options.keyboardSupport||this.options.readOnly||this.options.disabled?this.minH.attr("tabindex",""):this.minH.attr("tabindex","0"),this.options.vertical&&this.minH.attr("aria-orientation","vertical"),this.options.ariaLabel?this.minH.attr("aria-label",this.options.ariaLabel):this.options.ariaLabelledBy&&this.minH.attr("aria-labelledby",this.options.ariaLabelledBy),this.range&&(this.maxH.attr("role","slider"),!this.options.keyboardSupport||this.options.readOnly||this.options.disabled?this.maxH.attr("tabindex",""):this.maxH.attr("tabindex","0"),this.options.vertical&&this.maxH.attr("aria-orientation","vertical"),this.options.ariaLabelHigh?this.maxH.attr("aria-label",this.options.ariaLabelHigh):this.options.ariaLabelledByHigh&&this.maxH.attr("aria-labelledby",this.options.ariaLabelledByHigh))},updateAriaAttributes:function(){this.minH.attr({"aria-valuenow":this.scope.rzSliderModel,"aria-valuetext":this.customTrFn(this.scope.rzSliderModel,this.options.id,"model"),"aria-valuemin":this.minValue,"aria-valuemax":this.maxValue}),this.range&&this.maxH.attr({"aria-valuenow":this.scope.rzSliderHigh,"aria-valuetext":this.customTrFn(this.scope.rzSliderHigh,this.options.id,"high"),"aria-valuemin":this.minValue,"aria-valuemax":this.maxValue})},calcViewDimensions:function(){var a=this.getDimension(this.minH);if(this.handleHalfDim=a/2,this.barDimension=this.getDimension(this.fullBar),this.maxPos=this.barDimension-a,this.getDimension(this.sliderElem),this.sliderElem.rzsp=this.sliderElem[0].getBoundingClientRect()[this.positionProperty],this.initHasRun){this.updateFloorLab(),this.updateCeilLab(),this.initHandles();var c=this;b(function(){c.updateTicksScale()})}},updateTicksScale:function(){if(this.options.showTicks){var a=this.options.ticksArray||this.getTicksArray(),b=this.options.vertical?"translateY":"translateX",c=this;this.options.rightToLeft&&a.reverse(),this.scope.ticks=a.map(function(a){var d=c.valueToPosition(a);c.options.vertical&&(d=c.maxPos-d);var e=b+"("+Math.round(d)+"px)",f={selected:c.isTickSelected(a),style:{"-webkit-transform":e,"-moz-transform":e,"-o-transform":e,"-ms-transform":e,transform:e}};if(f.selected&&c.options.getSelectionBarColor&&(f.style["background-color"]=c.getSelectionBarColor()),!f.selected&&c.options.getTickColor&&(f.style["background-color"]=c.getTickColor(a)),c.options.ticksTooltip&&(f.tooltip=c.options.ticksTooltip(a),f.tooltipPlacement=c.options.vertical?"right":"top"),(c.options.showTicksValues===!0||a%c.options.showTicksValues===0)&&(f.value=c.getDisplayValue(a,"tick-value"),c.options.ticksValuesTooltip&&(f.valueTooltip=c.options.ticksValuesTooltip(a),f.valueTooltipPlacement=c.options.vertical?"right":"top")),c.getLegend){var g=c.getLegend(a,c.options.id);g&&(f.legend=g)}return f})}},getTicksArray:function(){var a=this.step,b=[];this.intermediateTicks&&(a=this.options.showTicks);for(var c=this.minValue;c<=this.maxValue;c+=a)b.push(c);return b},isTickSelected:function(a){if(!this.range)if(null!==this.options.showSelectionBarFromValue){var b=this.options.showSelectionBarFromValue;if(this.lowValue>b&&a>=b&&a<=this.lowValue)return!0;if(this.lowValue=a&&a>=this.lowValue)return!0}else if(this.options.showSelectionBarEnd){if(a>=this.lowValue)return!0}else if(this.options.showSelectionBar&&a<=this.lowValue)return!0;return this.range&&a>=this.lowValue&&a<=this.highValue?!0:!1},updateFloorLab:function(){this.translateFn(this.minValue,this.flrLab,"floor"),this.getDimension(this.flrLab);var a=this.options.rightToLeft?this.barDimension-this.flrLab.rzsd:0;this.setPosition(this.flrLab,a)},updateCeilLab:function(){this.translateFn(this.maxValue,this.ceilLab,"ceil"),this.getDimension(this.ceilLab);var a=this.options.rightToLeft?0:this.barDimension-this.ceilLab.rzsd;this.setPosition(this.ceilLab,a)},updateHandles:function(a,b){"lowValue"===a?this.updateLowHandle(b):this.updateHighHandle(b),this.updateSelectionBar(),this.updateTicksScale(),this.range&&this.updateCmbLabel()},getHandleLabelPos:function(a,b){var c=this[a].rzsd,d=b-c/2+this.handleHalfDim,e=this.barDimension-c;return this.options.boundPointerLabels?this.options.rightToLeft&&"minLab"===a||!this.options.rightToLeft&&"maxLab"===a?Math.min(d,e):Math.min(Math.max(d,0),e):d},updateLowHandle:function(a){if(this.setPosition(this.minH,a),this.translateFn(this.lowValue,this.minLab,"model"),this.setPosition(this.minLab,this.getHandleLabelPos("minLab",a)),this.options.getPointerColor){var b=this.getPointerColor("min");this.scope.minPointerStyle={backgroundColor:b}}this.options.autoHideLimitLabels&&this.shFloorCeil()},updateHighHandle:function(a){if(this.setPosition(this.maxH,a),this.translateFn(this.highValue,this.maxLab,"high"),this.setPosition(this.maxLab,this.getHandleLabelPos("maxLab",a)),this.options.getPointerColor){var b=this.getPointerColor("max");this.scope.maxPointerStyle={backgroundColor:b}}this.options.autoHideLimitLabels&&this.shFloorCeil()},shFloorCeil:function(){if(!this.options.hidePointerLabels){var a=!1,b=!1,c=this.isLabelBelowFloorLab(this.minLab),d=this.isLabelAboveCeilLab(this.minLab),e=this.isLabelAboveCeilLab(this.maxLab),f=this.isLabelBelowFloorLab(this.cmbLab),g=this.isLabelAboveCeilLab(this.cmbLab);if(c?(a=!0,this.hideEl(this.flrLab)):(a=!1,this.showEl(this.flrLab)),d?(b=!0,this.hideEl(this.ceilLab)):(b=!1,this.showEl(this.ceilLab)),this.range){var h=this.cmbLabelShown?g:e,i=this.cmbLabelShown?f:c;h?this.hideEl(this.ceilLab):b||this.showEl(this.ceilLab),i?this.hideEl(this.flrLab):a||this.showEl(this.flrLab)}}},isLabelBelowFloorLab:function(a){var b=this.options.rightToLeft,c=a.rzsp,d=a.rzsd,e=this.flrLab.rzsp,f=this.flrLab.rzsd;return b?c+d>=e-2:e+f+2>=c},isLabelAboveCeilLab:function(a){var b=this.options.rightToLeft,c=a.rzsp,d=a.rzsd,e=this.ceilLab.rzsp,f=this.ceilLab.rzsd;return b?e+f+2>=c:c+d>=e-2},updateRestrictionBar:function(){var a=0,b=0;if(this.options.restrictedRange){var c=this.valueToPosition(this.options.restrictedRange.from),d=this.valueToPosition(this.options.restrictedRange.to);b=Math.abs(d-c),a=this.options.rightToLeft?d+this.handleHalfDim:c+this.handleHalfDim,this.setDimension(this.restrictedBar,b),this.setPosition(this.restrictedBar,a)}},updateSelectionBar:function(){var a=0,b=0,c=this.options.rightToLeft?!this.options.showSelectionBarEnd:this.options.showSelectionBarEnd,d=this.options.rightToLeft?this.maxH.rzsp+this.handleHalfDim:this.minH.rzsp+this.handleHalfDim;if(this.range)b=Math.abs(this.maxH.rzsp-this.minH.rzsp),a=d;else if(null!==this.options.showSelectionBarFromValue){var e=this.options.showSelectionBarFromValue,f=this.valueToPosition(e),g=this.options.rightToLeft?this.lowValue<=e:this.lowValue>e;g?(b=this.minH.rzsp-f,a=f+this.handleHalfDim):(b=f-this.minH.rzsp,a=this.minH.rzsp+this.handleHalfDim)}else c?(b=Math.abs(this.maxPos-this.minH.rzsp)+this.handleHalfDim,a=this.minH.rzsp+this.handleHalfDim):(b=this.minH.rzsp+this.handleHalfDim,a=0);if(this.setDimension(this.selBar,b),this.setPosition(this.selBar,a),this.range&&this.options.showOuterSelectionBars&&(this.options.rightToLeft?(this.setDimension(this.rightOutSelBar,a),this.setPosition(this.rightOutSelBar,0),this.setDimension(this.leftOutSelBar,this.getDimension(this.fullBar)-(a+b)),this.setPosition(this.leftOutSelBar,a+b)):(this.setDimension(this.leftOutSelBar,a),this.setPosition(this.leftOutSelBar,0),this.setDimension(this.rightOutSelBar,this.getDimension(this.fullBar)-(a+b)),this.setPosition(this.rightOutSelBar,a+b))),this.options.getSelectionBarColor){var h=this.getSelectionBarColor();this.scope.barStyle={backgroundColor:h}}else if(this.options.selectionBarGradient){var i=null!==this.options.showSelectionBarFromValue?this.valueToPosition(this.options.showSelectionBarFromValue):0,j=i-a>0^c,k=this.options.vertical?j?"bottom":"top":j?"left":"right";this.scope.barStyle={backgroundImage:"linear-gradient(to "+k+", "+this.options.selectionBarGradient.from+" 0%,"+this.options.selectionBarGradient.to+" 100%)"},this.options.vertical?(this.scope.barStyle.backgroundPosition="center "+(i+b+a+(j?-this.handleHalfDim:0))+"px",this.scope.barStyle.backgroundSize="100% "+(this.barDimension-this.handleHalfDim)+"px"):(this.scope.barStyle.backgroundPosition=i-a+(j?this.handleHalfDim:0)+"px center",this.scope.barStyle.backgroundSize=this.barDimension-this.handleHalfDim+"px 100%")}},getSelectionBarColor:function(){return this.range?this.options.getSelectionBarColor(this.scope.rzSliderModel,this.scope.rzSliderHigh):this.options.getSelectionBarColor(this.scope.rzSliderModel)},getPointerColor:function(a){return"max"===a?this.options.getPointerColor(this.scope.rzSliderHigh,a):this.options.getPointerColor(this.scope.rzSliderModel,a)},getTickColor:function(a){return this.options.getTickColor(a)},updateCmbLabel:function(){var a=null;if(a=this.options.rightToLeft?this.minLab.rzsp-this.minLab.rzsd-10<=this.maxLab.rzsp:this.minLab.rzsp+this.minLab.rzsd+10>=this.maxLab.rzsp){var b=this.getDisplayValue(this.lowValue,"model"),c=this.getDisplayValue(this.highValue,"high"),d="";d=this.options.mergeRangeLabelsIfSame&&b===c?b:this.options.rightToLeft?c+this.options.labelOverlapSeparator+b:b+this.options.labelOverlapSeparator+c,this.translateFn(d,this.cmbLab,"cmb",!1);var e=this.options.boundPointerLabels?Math.min(Math.max(this.selBar.rzsp+this.selBar.rzsd/2-this.cmbLab.rzsd/2,0),this.barDimension-this.cmbLab.rzsd):this.selBar.rzsp+this.selBar.rzsd/2-this.cmbLab.rzsd/2;this.setPosition(this.cmbLab,e),this.cmbLabelShown=!0,this.hideEl(this.minLab),this.hideEl(this.maxLab),this.showEl(this.cmbLab)}else this.cmbLabelShown=!1,this.updateHighHandle(this.valueToPosition(this.highValue)),this.updateLowHandle(this.valueToPosition(this.lowValue)),this.showEl(this.maxLab),this.showEl(this.minLab),this.hideEl(this.cmbLab);this.options.autoHideLimitLabels&&this.shFloorCeil()},getDisplayValue:function(a,b){return this.options.stepsArray&&!this.options.bindIndexForStepsArray&&(a=this.getStepValue(a)),this.customTrFn(a,this.options.id,b)},roundStep:function(a,b){var c=b?b:this.step,d=parseFloat((a-this.minValue)/c).toPrecision(12);d=Math.round(+d)*c;var e=(this.minValue+d).toFixed(this.precision);return+e},hideEl:function(a){return a.css({visibility:"hidden"})},showEl:function(a){return a.rzAlwaysHide?a:a.css({visibility:"visible"})},setPosition:function(a,b){a.rzsp=b;var c={};return c[this.positionProperty]=Math.round(b)+"px",a.css(c),b},getDimension:function(a){var b=a[0].getBoundingClientRect();return this.options.vertical?a.rzsd=(b.bottom-b.top)*this.options.scale:a.rzsd=(b.right-b.left)*this.options.scale,a.rzsd},setDimension:function(a,b){a.rzsd=b;var c={};return c[this.dimensionProperty]=Math.round(b)+"px",a.css(c),b},sanitizeValue:function(a){return Math.min(Math.max(a,this.minValue),this.maxValue)},valueToPosition:function(a){var b=this.linearValueToPosition;this.options.customValueToPosition?b=this.options.customValueToPosition:this.options.logScale&&(b=this.logValueToPosition),a=this.sanitizeValue(a);var c=b(a,this.minValue,this.maxValue)||0;return this.options.rightToLeft&&(c=1-c),c*this.maxPos},linearValueToPosition:function(a,b,c){var d=c-b;return(a-b)/d},logValueToPosition:function(a,b,c){a=Math.log(a),b=Math.log(b),c=Math.log(c);var d=c-b;return(a-b)/d},positionToValue:function(a){var b=a/this.maxPos;this.options.rightToLeft&&(b=1-b);var c=this.linearPositionToValue;return this.options.customPositionToValue?c=this.options.customPositionToValue:this.options.logScale&&(c=this.logPositionToValue),c(b,this.minValue,this.maxValue)||0},linearPositionToValue:function(a,b,c){return a*(c-b)+b},logPositionToValue:function(a,b,c){b=Math.log(b),c=Math.log(c);var d=a*(c-b)+b;return Math.exp(d)},getEventAttr:function(a,b){return void 0===a.originalEvent?a[b]:a.originalEvent[b]},getEventXY:function(a,b){var c=this.options.vertical?"clientY":"clientX";if(void 0!==a[c])return a[c];var d=this.getEventAttr(a,"touches");if(void 0!==b)for(var e=0;ec?this.minH:c>d?this.maxH:this.options.rightToLeft?b>this.minH.rzsp?this.minH:this.maxH:b=i?h=k:i>=this.maxPos?h=j:(h=this.positionToValue(i),h=d&&a.isNumber(this.options.showTicks)?this.roundStep(h,this.options.showTicks):this.roundStep(h)),this.positionTrackingHandle(h)}},onEnd:function(a,b){var d=this.getEventAttr(b,"changedTouches");if(!d||d[0].identifier===this.touchId){this.isDragging=!1,this.touchId=null,this.options.keyboardSupport||(this.minH.removeClass("rz-active"),this.maxH.removeClass("rz-active"),this.tracking=""),this.dragging.active=!1;var e=this.getEventNames(b);c.off(e.moveEvent,a),c.off(e.endEvent,this.endHandlerToBeRemovedOnEnd),this.endHandlerToBeRemovedOnEnd=null,this.callOnEnd()}},onTickClick:function(a,b){this.onMove(a,b,!0)},onPointerFocus:function(b,c){this.tracking=c,b.one("blur",a.bind(this,this.onPointerBlur,b)),b.on("keydown",a.bind(this,this.onKeyboardEvent)),b.on("keyup",a.bind(this,this.onKeyUp)),this.firstKeyDown=!0,b.addClass("rz-active"),this.currentFocusElement={pointer:b,ref:c}},onKeyUp:function(){this.firstKeyDown=!0,this.callOnEnd()},onPointerBlur:function(a){a.off("keydown"),a.off("keyup"),a.removeClass("rz-active"),this.isDragging||(this.tracking="",this.currentFocusElement=null)},getKeyActions:function(a){var b=a+this.step,c=a-this.step,d=a+this.valueRange/10,e=a-this.valueRange/10;this.options.reversedControls&&(b=a-this.step,c=a+this.step,d=a-this.valueRange/10,e=a+this.valueRange/10);var f={UP:b,DOWN:c,LEFT:c,RIGHT:b,PAGEUP:d,PAGEDOWN:e,HOME:this.options.reversedControls?this.maxValue:this.minValue,END:this.options.reversedControls?this.minValue:this.maxValue};return this.options.rightToLeft&&(f.LEFT=b,f.RIGHT=c,this.options.vertical&&(f.UP=c,f.DOWN=b)),f},onKeyboardEvent:function(a){var c=this[this.tracking],d=a.keyCode||a.which,e={38:"UP",40:"DOWN",37:"LEFT",39:"RIGHT",33:"PAGEUP",34:"PAGEDOWN",36:"HOME",35:"END"},f=this.getKeyActions(c),g=e[d],h=f[g];if(null!=h&&""!==this.tracking){a.preventDefault(),this.firstKeyDown&&(this.firstKeyDown=!1,this.callOnStart());var i=this;b(function(){var a=i.roundStep(i.sanitizeValue(h));if(i.options.draggableRangeOnly){var b,c,d=i.highValue-i.lowValue;"lowValue"===i.tracking?(b=a,c=a+d,c>i.maxValue&&(c=i.maxValue,b=c-d)):(c=a,b=a-d,b=k,h=k>=this.maxPos-e,g){if(0===i.rzsp)return;c=this.getValue("min",k,!0,!1),d=this.getValue("max",k,!0,!1)}else if(h){if(j.rzsp===this.maxPos)return;d=this.getValue("max",k,!0,!0),c=this.getValue("min",k,!0,!0)}else c=this.getValue("min",k,!1),d=this.getValue("max",k,!1);this.positionTrackingBar(c,d)},positionTrackingBar:function(a,b){null!=this.options.minLimit&&athis.options.maxLimit&&(b=this.options.maxLimit,a=b-this.dragging.difference),this.lowValue=a,this.highValue=b,this.applyLowValue(),this.range&&this.applyHighValue(),this.applyModel(!0),this.updateHandles("lowValue",this.valueToPosition(a)),this.updateHandles("highValue",this.valueToPosition(b))},positionTrackingHandle:function(a){var b=!1;a=this.applyMinMaxLimit(a),a=this.applyRestrictedRange(a),this.range&&(this.options.pushRange?(a=this.applyPushRange(a),b=!0):(this.options.noSwitching&&("lowValue"===this.tracking&&a>this.highValue?a=this.applyMinMaxRange(this.highValue):"highValue"===this.tracking&&athis.highValue?(this.lowValue=this.highValue,this.applyLowValue(),this.applyModel(),this.updateHandles(this.tracking,this.maxH.rzsp),this.updateAriaAttributes(),this.tracking="highValue",this.minH.removeClass("rz-active"),this.maxH.addClass("rz-active"),this.options.keyboardSupport&&this.focusElement(this.maxH), -b=!0):"highValue"===this.tracking&&athis.options.maxLimit?this.options.maxLimit:a},applyMinMaxRange:function(a){var b="lowValue"===this.tracking?this.highValue:this.lowValue,c=Math.abs(a-b);return null!=this.options.minRange&&cthis.options.maxRange?"lowValue"===this.tracking?this.highValue-this.options.maxRange:this.lowValue+this.options.maxRange:a},applyRestrictedRange:function(a){if(null!=this.options.restrictedRange&&a>this.options.restrictedRange.from&&athis.options.restrictedRange.from+b?this.options.restrictedRange.to:this.options.restrictedRange.from;if("highValue"===this.tracking)return ab?("lowValue"===this.tracking?(this.highValue=Math.min(a+c,this.maxValue),a=this.highValue-c,this.applyHighValue(),this.updateHandles("highValue",this.valueToPosition(this.highValue))):(this.lowValue=Math.max(a-c,this.minValue),a=this.lowValue+c,this.applyLowValue(),this.updateHandles("lowValue",this.valueToPosition(this.lowValue))),this.updateAriaAttributes()):null!==d&&b>d&&("lowValue"===this.tracking?(this.highValue=a+d,this.applyHighValue(),this.updateHandles("highValue",this.valueToPosition(this.highValue))):(this.lowValue=a-d,this.applyLowValue(),this.updateHandles("lowValue",this.valueToPosition(this.lowValue))),this.updateAriaAttributes()),a},applyModel:function(a){this.internalChange=!0,this.scope.$apply(),a&&this.callOnChange(),this.internalChange=!1},callOnStart:function(){if(this.options.onStart){var a=this,b="lowValue"===this.tracking?"min":"max";this.scope.$evalAsync(function(){a.options.onStart(a.options.id,a.scope.rzSliderModel,a.scope.rzSliderHigh,b)})}},callOnChange:function(){if(this.options.onChange){var a=this,b="lowValue"===this.tracking?"min":"max";this.scope.$evalAsync(function(){a.options.onChange(a.options.id,a.scope.rzSliderModel,a.scope.rzSliderHigh,b)})}},callOnEnd:function(){if(this.options.onEnd){var a=this,b="lowValue"===this.tracking?"min":"max";this.scope.$evalAsync(function(){a.options.onEnd(a.options.id,a.scope.rzSliderModel,a.scope.rzSliderHigh,b)})}this.scope.$emit("slideEnded")}},h}]).directive("rzslider",["RzSlider",function(a){return{restrict:"AE",replace:!0,scope:{rzSliderModel:"=?",rzSliderHigh:"=?",rzSliderOptions:"&?",rzSliderTplUrl:"@"},templateUrl:function(a,b){return b.rzSliderTplUrl||"rzSliderTpl.html"},link:function(b,c){b.slider=new a(b,c)}}}]);return b.run(["$templateCache",function(a){a.put("rzSliderTpl.html",'
  • {{ t.value }} {{ t.legend }}
')}]),b.name}); \ No newline at end of file +/*! angularjs-slider - v7.1.0 - (c) Rafal Zajac , Valentin Hervieu , Jussi Saarivirta , Angelin Sirbu - https://github.com/angular-slider/angularjs-slider - 2022-05-26 */ +!function(a,b){"use strict";if("function"==typeof define&&define.amd)define(["angular"],b);else if("object"==typeof module&&module.exports){var c=angular||require("angular");c&&c.module||"undefined"==typeof angular||(c=angular),module.exports=b(c)}else b(a.angular)}(this,function(a){"use strict";var b=a.module("rzSlider",[]).factory("RzSliderOptions",function(){var b={floor:0,ceil:null,step:1,precision:0,minRange:null,maxRange:null,restrictedRange:null,skipRestrictedRangesWithArrowKeys:null,pushRange:!1,minLimit:null,maxLimit:null,id:null,translate:null,getLegend:null,stepsArray:null,bindIndexForStepsArray:!1,draggableRange:!1,draggableRangeOnly:!1,showSelectionBar:!1,showSelectionBarEnd:!1,showSelectionBarFromValue:null,showOuterSelectionBars:!1,hidePointerLabels:!1,hideLimitLabels:!1,autoHideLimitLabels:!0,readOnly:!1,disabled:!1,interval:350,showTicks:!1,showTicksValues:!1,ticksArray:null,ticksTooltip:null,ticksValuesTooltip:null,vertical:!1,getSelectionBarColor:null,getTickColor:null,getPointerColor:null,keyboardSupport:!0,scale:1,enforceStep:!0,enforceRange:!1,noSwitching:!1,onlyBindHandles:!1,disableAnimation:!1,onStart:null,onChange:null,onEnd:null,rightToLeft:!1,reversedControls:!1,boundPointerLabels:!0,mergeRangeLabelsIfSame:!1,labelOverlapSeparator:" - ",customTemplateScope:null,logScale:!1,customValueToPosition:null,customPositionToValue:null,selectionBarGradient:null,ariaLabel:null,ariaLabelledBy:null,ariaLabelHigh:null,ariaLabelledByHigh:null},c={},d={};return d.options=function(b){a.extend(c,b)},d.getOptions=function(d){return a.extend({},b,c,d)},d}).factory("rzThrottle",["$timeout",function(a){return function(b,c,d){var e,f,g,h=Date.now||function(){return(new Date).getTime()},i=null,j=0;d=d||{};var k=function(){j=h(),i=null,g=b.apply(e,f),e=f=null};return function(){var l=h(),m=c-(l-j);return e=this,f=arguments,0>=m?(a.cancel(i),i=null,j=l,g=b.apply(e,f),e=f=null):i||d.trailing===!1||(i=a(k,m)),g}}}]).factory("RzSlider",["$timeout","$document","$window","$compile","RzSliderOptions","rzThrottle",function(b,c,d,e,f,g){var h=function(a,b){this.scope=a,this.lowValue=0,this.highValue=0,this.sliderElem=b,this.range=void 0!==this.scope.rzSliderModel&&void 0!==this.scope.rzSliderHigh,this.dragging={active:!1,value:0,difference:0,position:0,lowLimit:0,highLimit:0},this.positionProperty="left",this.dimensionProperty="width",this.handleHalfDim=0,this.maxPos=0,this.precision=0,this.step=1,this.tracking="",this.minValue=0,this.maxValue=0,this.valueRange=0,this.intermediateTicks=!1,this.initHasRun=!1,this.firstKeyDown=!1,this.internalChange=!1,this.cmbLabelShown=!1,this.currentFocusElement=null,this.moving=!1,this.fullBar=null,this.selBar=null,this.minH=null,this.maxH=null,this.flrLab=null,this.ceilLab=null,this.minLab=null,this.maxLab=null,this.cmbLab=null,this.ticks=null,this.init()};return h.prototype={init:function(){var b,c,e=this,f=function(){e.calcViewDimensions()};this.applyOptions(),this.syncLowValue(),this.range&&this.syncHighValue(),this.initElemHandles(),this.manageElementsStyle(),this.setDisabledState(),this.calcViewDimensions(),this.setMinAndMax(),this.updateRestrictionBar(),this.addAccessibility(),this.updateCeilLab(),this.updateFloorLab(),this.initHandles(),this.manageEventsBindings(),this.scope.$on("reCalcViewDimensions",f),a.element(d).on("resize",f),this.initHasRun=!0,this.options.disableAnimation&&this.sliderElem.addClass("noanimate"),b=g(function(){e.onLowHandleChange()},e.options.interval),c=g(function(){e.onHighHandleChange()},e.options.interval),this.scope.$on("rzSliderForceRender",function(){e.resetLabelsValue(),b(),e.range&&c(),e.resetSlider()}),this.scope.$watchCollection("rzSliderOptions()",function(a,b){a!==b&&(e.applyOptions(),e.syncLowValue(),e.range&&e.syncHighValue(),e.resetSlider())}),this.scope.$watch("rzSliderModel",function(a,c){e.internalChange||a!==c&&b()}),this.scope.$watch("rzSliderHigh",function(a,b){e.internalChange||a!==b&&(null!=a&&c(),(e.range&&null==a||!e.range&&null!=a)&&(e.applyOptions(),e.resetSlider()))}),this.scope.$on("$destroy",function(){e.unbindEvents(),a.element(d).off("resize",f),e.currentFocusElement=null})},findStepIndex:function(b){for(var c=0,d=0;d',d.appendChild(f),this.restrictedBar[e]=a.element(f)}}else b.style.visibility="hidden",this.restrictedBar=null},initElemHandles:function(){a.forEach(this.sliderElem.children(),function(b,c){var d=a.element(b);switch(c){case 0:this.leftOutSelBar=d;break;case 1:this.rightOutSelBar=d;break;case 2:this.fullBar=d;break;case 3:this.selBar=d;break;case 4:this.ensureRestrictedBarIsArray(b);break;case 5:this.minH=d;break;case 6:this.maxH=d;break;case 7:this.flrLab=d;break;case 8:this.ceilLab=d;break;case 9:this.minLab=d;break;case 10:this.maxLab=d;break;case 11:this.cmbLab=d;break;case 12:this.ticks=d}},this),this.selBar.rzsp=0,this.minH.rzsp=0,this.maxH.rzsp=0,this.flrLab.rzsp=0,this.ceilLab.rzsp=0,this.minLab.rzsp=0,this.maxLab.rzsp=0,this.cmbLab.rzsp=0},manageElementsStyle:function(){this.range?this.maxH.css("display",""):this.maxH.css("display","none"),this.alwaysHide(this.flrLab,this.options.showTicksValues||this.options.hideLimitLabels),this.alwaysHide(this.ceilLab,this.options.showTicksValues||this.options.hideLimitLabels);var a=this.options.showTicksValues&&!this.intermediateTicks;this.alwaysHide(this.minLab,a||this.options.hidePointerLabels),this.alwaysHide(this.maxLab,a||!this.range||this.options.hidePointerLabels),this.alwaysHide(this.cmbLab,a||!this.range||this.options.hidePointerLabels),this.alwaysHide(this.selBar,!this.range&&!this.options.showSelectionBar),this.alwaysHide(this.leftOutSelBar,!this.range||!this.options.showOuterSelectionBars);for(var b in this.restrictedBar)this.restrictedBar[b]&&this.alwaysHide(this.restrictedBar[b],!this.options.restrictedRange[b]);this.alwaysHide(this.rightOutSelBar,!this.range||!this.options.showOuterSelectionBars),this.range&&this.options.showOuterSelectionBars&&this.fullBar.addClass("rz-transparent"),this.options.vertical?this.sliderElem.addClass("rz-vertical"):this.sliderElem.removeClass("rz-vertical"),this.options.draggableRange?this.selBar.addClass("rz-draggable"):this.selBar.removeClass("rz-draggable"),this.intermediateTicks&&this.options.showTicksValues&&this.ticks.addClass("rz-ticks-values-under")},alwaysHide:function(a,b){a.rzAlwaysHide=b,b?this.hideEl(a):this.showEl(a)},manageEventsBindings:function(){this.options.disabled||this.options.readOnly?this.unbindEvents():this.bindEvents()},setDisabledState:function(){this.options.disabled?this.sliderElem.attr("disabled","disabled"):this.sliderElem.attr("disabled",null)},resetLabelsValue:function(){this.minLab.rzsv=void 0,this.maxLab.rzsv=void 0,this.flrLab.rzsv=void 0,this.ceilLab.rzsv=void 0,this.cmbLab.rzsv=void 0,this.resetPosition(this.flrLab),this.resetPosition(this.ceilLab),this.resetPosition(this.cmbLab),this.resetPosition(this.minLab),this.resetPosition(this.maxLab)},initHandles:function(){this.updateLowHandle(this.valueToPosition(this.lowValue)),this.range&&this.updateHighHandle(this.valueToPosition(this.highValue)),this.updateSelectionBar(),this.range&&this.updateCmbLabel(),this.updateTicksScale()},translateFn:function(a,b,c,d){d=void 0===d?!0:d;var e="",f=!1,g=b.hasClass("no-label-injection");d?(this.options.stepsArray&&!this.options.bindIndexForStepsArray&&(a=this.getStepValue(a)),e=String(this.customTrFn(a,this.options.id,c))):e=String(a),(void 0===b.rzsv||b.rzsv.length!==e.length||b.rzsv.length>0&&0===b.rzsd)&&(f=!0,b.rzsv=e),g||b.html(e),this.scope[c+"Label"]=e,f&&this.getDimension(b)},setMinAndMax:function(){if(this.step=+this.options.step,this.precision=+this.options.precision,this.minValue=this.options.floor,this.options.logScale&&0===this.minValue)throw Error("Can't use floor=0 with logarithmic scale");this.options.enforceStep&&(this.lowValue=this.roundStep(this.lowValue),this.range&&(this.highValue=this.roundStep(this.highValue))),null!=this.options.ceil?this.maxValue=this.options.ceil:this.maxValue=this.options.ceil=this.range?this.highValue:this.lowValue,this.options.enforceRange&&(this.lowValue=this.sanitizeValue(this.lowValue),this.range&&(this.highValue=this.sanitizeValue(this.highValue))),this.applyLowValue(),this.range&&this.applyHighValue(),this.valueRange=this.maxValue-this.minValue},addAccessibility:function(){this.minH.attr("role","slider"),this.updateAriaAttributes(),!this.options.keyboardSupport||this.options.readOnly||this.options.disabled?this.minH.attr("tabindex",""):this.minH.attr("tabindex","0"),this.options.vertical?this.minH.attr("aria-orientation","vertical"):this.minH.attr("aria-orientation","horizontal"),this.options.ariaLabel?this.minH.attr("aria-label",this.options.ariaLabel):this.options.ariaLabelledBy&&this.minH.attr("aria-labelledby",this.options.ariaLabelledBy),this.range&&(this.maxH.attr("role","slider"),!this.options.keyboardSupport||this.options.readOnly||this.options.disabled?this.maxH.attr("tabindex",""):this.maxH.attr("tabindex","0"),this.options.vertical?this.maxH.attr("aria-orientation","vertical"):this.maxH.attr("aria-orientation","horizontal"),this.options.ariaLabelHigh?this.maxH.attr("aria-label",this.options.ariaLabelHigh):this.options.ariaLabelledByHigh&&this.maxH.attr("aria-labelledby",this.options.ariaLabelledByHigh))},updateAriaAttributes:function(){this.minH.attr({"aria-valuenow":this.scope.rzSliderModel,"aria-valuetext":this.customTrFn(this.scope.rzSliderModel,this.options.id,"model"),"aria-valuemin":this.minValue,"aria-valuemax":this.maxValue}),this.range&&this.maxH.attr({"aria-valuenow":this.scope.rzSliderHigh,"aria-valuetext":this.customTrFn(this.scope.rzSliderHigh,this.options.id,"high"),"aria-valuemin":this.minValue,"aria-valuemax":this.maxValue})},calcViewDimensions:function(){var a=this.getDimension(this.minH);if(this.handleHalfDim=a/2,this.barDimension=this.getDimension(this.fullBar),this.maxPos=this.barDimension-a,this.getDimension(this.sliderElem),this.sliderElem.rzsp=this.sliderElem[0].getBoundingClientRect()[this.positionProperty],this.initHasRun){this.updateFloorLab(),this.updateCeilLab(),this.initHandles();var c=this;b(function(){c.updateTicksScale()})}},updateTicksScale:function(){if(this.options.showTicks){var b=this.options.ticksArray||this.getTicksArray(),c=this.options.vertical?"translateY":"translateX",d=this;this.options.rightToLeft&&b.reverse(),this.scope.ticks=b.map(function(b){var e=null;a.isObject(b)&&(e=b.legend,b=b.value);var f=d.valueToPosition(b);d.options.vertical&&(f=d.maxPos-f);var g=c+"("+Math.round(f)+"px)",h={legend:e,selected:d.isTickSelected(b),style:{"-webkit-transform":g,"-moz-transform":g,"-o-transform":g,"-ms-transform":g,transform:g}};return h.selected&&d.options.getSelectionBarColor&&(h.style["background-color"]=d.getSelectionBarColor()),!h.selected&&d.options.getTickColor&&(h.style["background-color"]=d.getTickColor(b)),d.options.ticksTooltip&&(h.tooltip=d.options.ticksTooltip(b),h.tooltipPlacement=d.options.vertical?"right":"top"),(d.options.showTicksValues===!0||b%d.options.showTicksValues===0)&&(h.value=d.getDisplayValue(b,"tick-value"),d.options.ticksValuesTooltip&&(h.valueTooltip=d.options.ticksValuesTooltip(b),h.valueTooltipPlacement=d.options.vertical?"right":"top")),d.getLegend&&(e=d.getLegend(b,d.options.id),e&&(h.legend=e)),h})}},getTicksArray:function(){var a=this.step,b=[];this.intermediateTicks&&(a=this.options.showTicks);for(var c=this.minValue;c<=this.maxValue;c+=a)b.push(c);return b},isTickSelected:function(a){if(!this.range)if(null!==this.options.showSelectionBarFromValue){var b=this.options.showSelectionBarFromValue;if(this.lowValue>b&&a>=b&&a<=this.lowValue)return!0;if(this.lowValue=a&&a>=this.lowValue)return!0}else if(this.options.showSelectionBarEnd){if(a>=this.lowValue)return!0}else if(this.options.showSelectionBar&&a<=this.lowValue)return!0;return this.range&&a>=this.lowValue&&a<=this.highValue?!0:!1},updateFloorLab:function(){this.translateFn(this.minValue,this.flrLab,"floor"),this.getDimension(this.flrLab);var a=this.options.rightToLeft?this.barDimension-this.flrLab.rzsd:0;this.setPosition(this.flrLab,a)},updateCeilLab:function(){this.translateFn(this.maxValue,this.ceilLab,"ceil"),this.getDimension(this.ceilLab);var a=this.options.rightToLeft?0:this.barDimension-this.ceilLab.rzsd;this.setPosition(this.ceilLab,a)},updateHandles:function(a,b){"lowValue"===a?this.updateLowHandle(b):this.updateHighHandle(b),this.updateSelectionBar(),this.updateTicksScale(),this.range&&this.updateCmbLabel()},getHandleLabelPos:function(a,b){var c=this[a].rzsd,d=b-c/2+this.handleHalfDim,e=this.barDimension-c;return this.options.boundPointerLabels?this.options.rightToLeft&&"minLab"===a||!this.options.rightToLeft&&"maxLab"===a?Math.min(d,e):Math.min(Math.max(d,0),e):d},updateLowHandle:function(a){if(this.setPosition(this.minH,a),this.translateFn(this.lowValue,this.minLab,"model"),this.setPosition(this.minLab,this.getHandleLabelPos("minLab",a)),this.options.getPointerColor){var b=this.getPointerColor("min");this.scope.minPointerStyle={backgroundColor:b}}this.options.autoHideLimitLabels&&this.shFloorCeil()},updateHighHandle:function(a){if(this.setPosition(this.maxH,a),this.translateFn(this.highValue,this.maxLab,"high"),this.setPosition(this.maxLab,this.getHandleLabelPos("maxLab",a)),this.options.getPointerColor){var b=this.getPointerColor("max");this.scope.maxPointerStyle={backgroundColor:b}}this.options.autoHideLimitLabels&&this.shFloorCeil()},shFloorCeil:function(){if(!this.options.hidePointerLabels){var a=!1,b=!1,c=this.isLabelBelowFloorLab(this.minLab),d=this.isLabelAboveCeilLab(this.minLab),e=this.isLabelAboveCeilLab(this.maxLab),f=this.isLabelBelowFloorLab(this.cmbLab),g=this.isLabelAboveCeilLab(this.cmbLab);if(c?(a=!0,this.hideEl(this.flrLab)):(a=!1,this.showEl(this.flrLab)),d?(b=!0,this.hideEl(this.ceilLab)):(b=!1,this.showEl(this.ceilLab)),this.range){var h=this.cmbLabelShown?g:e,i=this.cmbLabelShown?f:c;h?this.hideEl(this.ceilLab):b||this.showEl(this.ceilLab),i?this.hideEl(this.flrLab):a||this.showEl(this.flrLab)}}},isLabelBelowFloorLab:function(a){var b=this.options.rightToLeft,c=a.rzsp,d=a.rzsd,e=this.flrLab.rzsp,f=this.flrLab.rzsd;return b?c+d>=e-2:e+f+2>=c},isLabelAboveCeilLab:function(a){var b=this.options.rightToLeft,c=a.rzsp,d=a.rzsd,e=this.ceilLab.rzsp,f=this.ceilLab.rzsd;return b?e+f+2>=c:c+d>=e-2},updateRestrictionBar:function(){var a=0,b=0;if(this.options.restrictedRange){this.options.restrictedRange=Array.isArray(this.options.restrictedRange)?this.options.restrictedRange:[this.options.restrictedRange];for(var c in this.options.restrictedRange){var d=this.valueToPosition(this.options.restrictedRange[c].from),e=this.valueToPosition(this.options.restrictedRange[c].to);b=Math.abs(e-d),a=this.options.rightToLeft?e+this.handleHalfDim:d+this.handleHalfDim,this.setDimension(this.restrictedBar[c],b),this.setPosition(this.restrictedBar[c],a)}}},updateSelectionBar:function(){var a=0,b=0,c=this.options.rightToLeft?!this.options.showSelectionBarEnd:this.options.showSelectionBarEnd,d=this.options.rightToLeft?this.maxH.rzsp+this.handleHalfDim:this.minH.rzsp+this.handleHalfDim;if(this.range)b=Math.abs(this.maxH.rzsp-this.minH.rzsp),a=d;else if(null!==this.options.showSelectionBarFromValue){var e=this.options.showSelectionBarFromValue,f=this.valueToPosition(e),g=this.options.rightToLeft?this.lowValue<=e:this.lowValue>e;g?(b=this.minH.rzsp-f,a=f+this.handleHalfDim):(b=f-this.minH.rzsp,a=this.minH.rzsp+this.handleHalfDim)}else c?(b=Math.abs(this.maxPos-this.minH.rzsp)+this.handleHalfDim,a=this.minH.rzsp+this.handleHalfDim):(b=this.minH.rzsp+this.handleHalfDim,a=0);if(this.setDimension(this.selBar,b),this.setPosition(this.selBar,a),this.range&&this.options.showOuterSelectionBars&&(this.options.rightToLeft?(this.setDimension(this.rightOutSelBar,a),this.setPosition(this.rightOutSelBar,0),this.setDimension(this.leftOutSelBar,this.getDimension(this.fullBar)-(a+b)),this.setPosition(this.leftOutSelBar,a+b)):(this.setDimension(this.leftOutSelBar,a),this.setPosition(this.leftOutSelBar,0),this.setDimension(this.rightOutSelBar,this.getDimension(this.fullBar)-(a+b)),this.setPosition(this.rightOutSelBar,a+b))),this.options.getSelectionBarColor){var h=this.getSelectionBarColor();this.scope.barStyle={backgroundColor:h}}else if(this.options.selectionBarGradient){var i=null!==this.options.showSelectionBarFromValue?this.valueToPosition(this.options.showSelectionBarFromValue):0,j=i-a>0^c,k=this.options.vertical?j?"bottom":"top":j?"left":"right";this.scope.barStyle={backgroundImage:"linear-gradient(to "+k+", "+this.options.selectionBarGradient.from+" 0%,"+this.options.selectionBarGradient.to+" 100%)"},this.options.vertical?(this.scope.barStyle.backgroundPosition="center "+(i+b+a+(j?-this.handleHalfDim:0))+"px",this.scope.barStyle.backgroundSize="100% "+(this.barDimension-this.handleHalfDim)+"px"):(this.scope.barStyle.backgroundPosition=i-a+(j?this.handleHalfDim:0)+"px center",this.scope.barStyle.backgroundSize=this.barDimension-this.handleHalfDim+"px 100%")}},getSelectionBarColor:function(){return this.range?this.options.getSelectionBarColor(this.scope.rzSliderModel,this.scope.rzSliderHigh):this.options.getSelectionBarColor(this.scope.rzSliderModel)},getPointerColor:function(a){return"max"===a?this.options.getPointerColor(this.scope.rzSliderHigh,a):this.options.getPointerColor(this.scope.rzSliderModel,a)},getTickColor:function(a){return this.options.getTickColor(a)},updateCmbLabel:function(){var a=null;if(a=this.options.rightToLeft?this.minLab.rzsp-this.minLab.rzsd-10<=this.maxLab.rzsp:this.minLab.rzsp+this.minLab.rzsd+10>=this.maxLab.rzsp){var b=this.getDisplayValue(this.lowValue,"model"),c=this.getDisplayValue(this.highValue,"high"),d="";d=this.options.mergeRangeLabelsIfSame&&b===c?b:this.options.rightToLeft?c+this.options.labelOverlapSeparator+b:b+this.options.labelOverlapSeparator+c,this.translateFn(d,this.cmbLab,"cmb",!1);var e=this.options.boundPointerLabels?Math.min(Math.max(this.selBar.rzsp+this.selBar.rzsd/2-this.cmbLab.rzsd/2,0),this.barDimension-this.cmbLab.rzsd):this.selBar.rzsp+this.selBar.rzsd/2-this.cmbLab.rzsd/2;this.setPosition(this.cmbLab,e),this.cmbLabelShown=!0,this.hideEl(this.minLab),this.hideEl(this.maxLab),this.showEl(this.cmbLab)}else this.cmbLabelShown=!1,this.updateHighHandle(this.valueToPosition(this.highValue)),this.updateLowHandle(this.valueToPosition(this.lowValue)),this.showEl(this.maxLab),this.showEl(this.minLab),this.hideEl(this.cmbLab);this.options.autoHideLimitLabels&&this.shFloorCeil()},getDisplayValue:function(a,b){return this.options.stepsArray&&!this.options.bindIndexForStepsArray&&(a=this.getStepValue(a)),this.customTrFn(a,this.options.id,b)},roundStep:function(a,b){var c=b?b:this.step,d=parseFloat((a-this.minValue)/c).toPrecision(12);d=Math.round(+d)*c;var e=(this.minValue+d).toFixed(this.precision);return+e},hideEl:function(a){return a.css({visibility:"hidden"})},showEl:function(a){return a.rzAlwaysHide?a:a.css({visibility:"visible"})},setPosition:function(a,b){a.rzsp=b;var c={};return c[this.positionProperty]=Math.round(b)+"px",a.css(c),b},resetPosition:function(a){a.css({left:null,bottom:null})},getDimension:function(a){var b=a[0].getBoundingClientRect();return this.options.vertical?a.rzsd=(b.bottom-b.top)*this.options.scale:a.rzsd=(b.right-b.left)*this.options.scale,a.rzsd},setDimension:function(a,b){a.rzsd=b;var c={};return c[this.dimensionProperty]=Math.round(b)+"px",a.css(c),b},sanitizeValue:function(a){return Math.min(Math.max(a,this.minValue),this.maxValue)},valueToPosition:function(a){var b=this.linearValueToPosition;this.options.customValueToPosition?b=this.options.customValueToPosition:this.options.logScale&&(b=this.logValueToPosition),a=this.sanitizeValue(a);var c=b(a,this.minValue,this.maxValue)||0;return this.options.rightToLeft&&(c=1-c),c*this.maxPos},linearValueToPosition:function(a,b,c){var d=c-b;return(a-b)/d},logValueToPosition:function(a,b,c){a=Math.log(a),b=Math.log(b),c=Math.log(c);var d=c-b;return(a-b)/d},positionToValue:function(a){var b=a/this.maxPos;this.options.rightToLeft&&(b=1-b);var c=this.linearPositionToValue;return this.options.customPositionToValue?c=this.options.customPositionToValue:this.options.logScale&&(c=this.logPositionToValue),c(b,this.minValue,this.maxValue)||0},linearPositionToValue:function(a,b,c){return a*(c-b)+b},logPositionToValue:function(a,b,c){b=Math.log(b),c=Math.log(c);var d=a*(c-b)+b;return Math.exp(d)},getEventAttr:function(a,b){return void 0===a.originalEvent?a[b]:a.originalEvent[b]},getEventXY:function(a,b){var c=this.options.vertical?"clientY":"clientX";if(void 0!==a[c])return a[c];var d=this.getEventAttr(a,"touches");if(void 0!==b)for(var e=0;ec?this.minH:c>d?this.maxH:this.options.rightToLeft?b>this.minH.rzsp?this.minH:this.maxH:b=i?h=k:i>=this.maxPos?h=j:(h=this.positionToValue(i),h=d&&a.isNumber(this.options.showTicks)?this.roundStep(h,this.options.showTicks):this.roundStep(h)),this.positionTrackingHandle(h)}},onEnd:function(a,b){this.moving=!1,this.options.disableAnimation||this.sliderElem.removeClass("noanimate");var d=this.getEventAttr(b,"changedTouches");if(!d||d[0].identifier===this.touchId){this.isDragging=!1,this.touchId=null,this.options.keyboardSupport||(this.minH.removeClass("rz-active"),this.maxH.removeClass("rz-active"),this.tracking=""),this.dragging.active=!1;var e=this.getEventNames(b);c.off(e.moveEvent,a),c.off(e.endEvent,this.endHandlerToBeRemovedOnEnd),this.endHandlerToBeRemovedOnEnd=null,this.callOnEnd()}},onTickClick:function(a,b){this.onMove(a,b,!0)},onPointerFocus:function(b,c){this.tracking=c,b.one("blur",a.bind(this,this.onPointerBlur,b)),b.on("keydown",a.bind(this,this.onKeyboardEvent)),b.on("keyup",a.bind(this,this.onKeyUp)),this.firstKeyDown=!0,b.addClass("rz-active"),this.currentFocusElement={pointer:b,ref:c}},onKeyUp:function(){this.firstKeyDown=!0,this.callOnEnd()},onPointerBlur:function(a){a.off("keydown"),a.off("keyup"),a.removeClass("rz-active"),this.isDragging||(this.tracking="",this.currentFocusElement=null)},skipRestrictedRanges:function(a,b){if(this.options.restrictedRange&&Array.isArray(this.options.restrictedRange))for(var c in this.options.restrictedRange){var d=this.options.restrictedRange[c];if(0===d.from&&0===b&&[37,40].includes(a)||d.to>=this.options.restrictedRange[this.options.restrictedRange.length-1].to&&b>=this.options.restrictedRange[this.options.restrictedRange.length-1].to&&[38,39].includes(a))return b;d.to>b&&b>d.from&&(b=Math.abs(d.to-b)>Math.abs(d.from-b)?d.to:d.from)}return b},getKeyActions:function(a){var b=a+this.step,c=a-this.step,d=a+this.valueRange/10,e=a-this.valueRange/10;this.options.reversedControls&&(b=a-this.step,c=a+this.step,d=a-this.valueRange/10,e=a+this.valueRange/10);var f={UP:b,DOWN:c,LEFT:c,RIGHT:b,PAGEUP:d,PAGEDOWN:e,HOME:this.options.reversedControls?this.maxValue:this.minValue,END:this.options.reversedControls?this.minValue:this.maxValue};return this.options.rightToLeft&&(f.LEFT=b,f.RIGHT=c,this.options.vertical&&(f.UP=c,f.DOWN=b)),f},onKeyboardEvent:function(a){var c=a.keyCode||a.which,d=this[this.tracking],e={38:"UP",40:"DOWN",37:"LEFT",39:"RIGHT",33:"PAGEUP",34:"PAGEDOWN",36:"HOME",35:"END"},f=this.getKeyActions(d),g=e[c],h=f[g];if(null!=h&&""!==this.tracking){a.preventDefault(),this.firstKeyDown&&(this.firstKeyDown=!1,this.callOnStart());var i=this;b(function(){var a=i.roundStep(i.sanitizeValue(h));if(a=i.options.skipRestrictedRangesWithArrowKeys?i.skipRestrictedRanges(c,a):a,i.options.draggableRangeOnly){var b,d,e=i.highValue-i.lowValue;"lowValue"===i.tracking?(b=a,d=a+e,d>i.maxValue&&(d=i.maxValue,b=d-e)):(d=a,b=a-e,b=k,h=k>=this.maxPos-e,g){if(0===i.rzsp)return;c=this.getValue("min",k,!0,!1),d=this.getValue("max",k,!0,!1)}else if(h){if(j.rzsp===this.maxPos)return;d=this.getValue("max",k,!0,!0),c=this.getValue("min",k,!0,!0)}else c=this.getValue("min",k,!1),d=this.getValue("max",k,!1);this.positionTrackingBar(c,d)},positionTrackingBar:function(a,b){null!=this.options.minLimit&&athis.options.maxLimit&&(b=this.options.maxLimit,a=b-this.dragging.difference),this.lowValue=a,this.highValue=b,this.applyLowValue(),this.range&&this.applyHighValue(),this.applyModel(!0),this.updateHandles("lowValue",this.valueToPosition(a)),this.updateHandles("highValue",this.valueToPosition(b))},positionTrackingHandle:function(a){var b=!1;a=this.applyMinMaxLimit(a),a=this.applyRestrictedRange(a),this.range&&(this.options.pushRange?(a=this.applyPushRange(a),b=!0):(this.options.noSwitching&&("lowValue"===this.tracking&&a>this.highValue?a=this.applyMinMaxRange(this.highValue):"highValue"===this.tracking&&athis.highValue?(this.lowValue=this.highValue,this.applyLowValue(),this.applyModel(),this.updateHandles(this.tracking,this.maxH.rzsp),this.updateAriaAttributes(),this.tracking="highValue",this.minH.removeClass("rz-active"),this.maxH.addClass("rz-active"),this.options.keyboardSupport&&this.focusElement(this.maxH),b=!0):"highValue"===this.tracking&&athis.options.maxLimit?this.options.maxLimit:a},applyMinMaxRange:function(a){var b="lowValue"===this.tracking?this.highValue:this.lowValue,c=Math.abs(a-b);return null!=this.options.minRange&&cthis.options.maxRange?"lowValue"===this.tracking?this.highValue-this.options.maxRange:this.lowValue+this.options.maxRange:a},applyRestrictedRange:function(a){for(var b in this.options.restrictedRange)if(null!=this.options.restrictedRange[b]&&a>this.options.restrictedRange[b].from&&athis.options.restrictedRange[b].from+c?this.options.restrictedRange[b].to:this.options.restrictedRange[b].from;if("highValue"===this.tracking)return ab?("lowValue"===this.tracking?(this.highValue=Math.min(a+c,this.maxValue),a=this.highValue-c,this.applyHighValue(),this.updateHandles("highValue",this.valueToPosition(this.highValue))):(this.lowValue=Math.max(a-c,this.minValue),a=this.lowValue+c,this.applyLowValue(),this.updateHandles("lowValue",this.valueToPosition(this.lowValue))),this.updateAriaAttributes()):null!==d&&b>d&&("lowValue"===this.tracking?(this.highValue=a+d,this.applyHighValue(),this.updateHandles("highValue",this.valueToPosition(this.highValue))):(this.lowValue=a-d,this.applyLowValue(),this.updateHandles("lowValue",this.valueToPosition(this.lowValue))),this.updateAriaAttributes()),a},applyModel:function(a){this.internalChange=!0,this.scope.$apply(),a&&this.callOnChange(),this.internalChange=!1},callOnStart:function(){if(this.options.onStart){var a=this,b="lowValue"===this.tracking?"min":"max";this.scope.$evalAsync(function(){a.options.onStart(a.options.id,a.scope.rzSliderModel,a.scope.rzSliderHigh,b)})}},callOnChange:function(){if(this.options.onChange){var a=this,b="lowValue"===this.tracking?"min":"max";this.scope.$evalAsync(function(){a.options.onChange(a.options.id,a.scope.rzSliderModel,a.scope.rzSliderHigh,b)})}},callOnEnd:function(){if(this.options.onEnd){var a=this,b="lowValue"===this.tracking?"min":"max";this.scope.$evalAsync(function(){a.options.onEnd(a.options.id,a.scope.rzSliderModel,a.scope.rzSliderHigh,b)})}this.scope.$emit("slideEnded")}},h}]).directive("rzslider",["RzSlider",function(a){return{restrict:"AE",replace:!0,scope:{rzSliderModel:"=?",rzSliderHigh:"=?",rzSliderOptions:"&?",rzSliderTplUrl:"@"},templateUrl:function(a,b){return b.rzSliderTplUrl||"rzSliderTpl.html"},link:function(b,c){b.slider=new a(b,c)}}}]);return b.run(["$templateCache",function(a){a.put("rzSliderTpl.html",'
  • {{ t.value }} {{ t.legend }}
')}]),b.name}); \ No newline at end of file diff --git a/dist/rzslider.scss b/dist/rzslider.scss index 3b954d7..5f60607 100644 --- a/dist/rzslider.scss +++ b/dist/rzslider.scss @@ -1,7 +1,7 @@ -/*! angularjs-slider - v6.6.0 - - (c) Rafal Zajac , Valentin Hervieu , Jussi Saarivirta , Angelin Sirbu - +/*! angularjs-slider - v7.1.0 - + (c) Rafal Zajac , Valentin Hervieu , Jussi Saarivirta , Angelin Sirbu - https://github.com/angular-slider/angularjs-slider - - 2018-06-29 */ + 2022-05-26 */ .rzslider { position: relative; display: inline-block; @@ -15,6 +15,10 @@ user-select: none; } +.rzslider.noanimate * { + transition: none !important; +} + .rzslider.with-legend { margin-bottom: 40px; } @@ -64,6 +68,7 @@ padding-top: 16px; margin-top: -16px; box-sizing: border-box; + transition: all linear 0.3s; } .rzslider .rz-draggable { @@ -95,6 +100,7 @@ z-index: 2; background: #0db9f0; border-radius: 2px; + transition: background-color linear 0.3s; } .rzslider .rz-restricted { @@ -111,6 +117,7 @@ cursor: pointer; background-color: #0db9f0; border-radius: 16px; + transition: all linear 0.3s; } .rzslider .rz-pointer:after { @@ -141,10 +148,12 @@ padding: 1px 3px; color: #55637d; cursor: default; + transition: all linear 0.3s; } .rzslider .rz-bubble.rz-limit { color: #55637d; + transition: none; } .rzslider .rz-ticks { @@ -175,6 +184,7 @@ cursor: pointer; background: #d8e0f3; border-radius: 50%; + transition: background-color linear 0.3s; } .rzslider .rz-tick.rz-selected { @@ -271,4 +281,4 @@ bottom: auto; left: auto; } -/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInJ6c2xpZGVyLmNzcyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQTs7O2NBR2M7QUFDZDtFQUNFLG1CQUFtQjtFQUNuQixzQkFBc0I7RUFDdEIsWUFBWTtFQUNaLFlBQVk7RUFDWixzQkFBc0I7RUFDdEIsdUJBQXVCO0VBQ3ZCLDBCQUFrQjtLQUFsQix1QkFBa0I7TUFBbEIsc0JBQWtCO1VBQWxCLGtCQUFrQjtDQUNuQjs7QUFFRDtFQUNFLG9CQUFvQjtDQUNyQjs7QUFFRDtFQUNFLG9CQUFvQjtDQUNyQjs7QUFFRDtFQUNFLG9CQUFvQjtFQUNwQiwwQkFBMEI7Q0FDM0I7O0FBRUQ7RUFDRSxvQkFBb0I7Q0FDckI7O0FBRUQ7RUFDRSxvQkFBb0I7Q0FDckI7O0FBRUQ7RUFDRSxvQkFBb0I7Q0FDckI7O0FBRUQ7RUFDRSxvQkFBb0I7Q0FDckI7O0FBRUQ7RUFDRSxtQkFBbUI7RUFDbkIsc0JBQXNCO0VBQ3RCLG9CQUFvQjtDQUNyQjs7QUFFRDtFQUN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HRvbTogYXV0bztcbiAgbGVmdDogYXV0bztcbn0iXX0= */ \ No newline at end of file diff --git a/issue_template.md b/issue_template.md deleted file mode 100644 index b99c3b9..0000000 --- a/issue_template.md +++ /dev/null @@ -1,12 +0,0 @@ -### Steps to reproduce -1. -2. -3. - -Demo: http://jsfiddle.net/cwhgLcjv/ (fork this example and update the link) - -### Expected behaviour -Tell us what should happen - -### Actual behaviour -Tell us what happens instead diff --git a/package.json b/package.json index 036f8d4..104e3ba 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "angularjs-slider", - "version": "6.6.0", + "version": "7.1.0", "description": "AngularJS slider directive with no external dependencies. Mobile friendly!.", "main": "dist/rzslider.js", "types": "dist/rzslider.d.ts", @@ -12,6 +12,9 @@ "angular", "slider" ], + "publishConfig": { + "registry": "https://registry.npmjs.org/" + }, "scripts": { "start": "http-server ./ -c-1", "commit": "git-cz", @@ -19,7 +22,7 @@ "test": "grunt test", "report-coverage": "cat ./tests/coverage/lcov.info | codecov", "format": "prettier --write \"{src,tests,demo}/{,!(lib)/**}/*.{js,less,css}\"", - "precommit": "lint-staged", + "precommit": "npm run build && git add dist && lint-staged", "e2e": "npm start & cypress run", "cypress:open": "cypress open" }, @@ -43,6 +46,7 @@ "cz-conventional-changelog": "^1.1.5", "grunt": "~0.4.2", "grunt-angular-templates": "^0.5.7", + "grunt-cli": "^1.2.0", "grunt-contrib-concat": "^0.5.1", "grunt-contrib-copy": "^1.0.0", "grunt-contrib-mincss": "~0.3.2", @@ -72,10 +76,12 @@ "recess": "~1.1.9", "sinon": "^1.17.2" }, - "author": "Rafal Zajac , Valentin Hervieu , Jussi Saarivirta , Angelin Sirbu ", + "author": "Rafal Zajac , Valentin Hervieu , Jussi Saarivirta , Angelin Sirbu ", "license": "MIT", "readmeFilename": "README.md", - "czConfig": { - "path": "node_modules/cz-conventional-changelog" + "config": { + "commitizen": { + "path": "node_modules/cz-conventional-changelog" + } } } diff --git a/rzslider.d.ts b/rzslider.d.ts index c26c9ed..e9ec697 100644 --- a/rzslider.d.ts +++ b/rzslider.d.ts @@ -25,7 +25,14 @@ declare module "angular" { minLimit?: number; /** Number (defaults to null): The maximum value authorized on the slider. */ maxLimit?: number; - /** Number (defaults to null): The minimum range authorized on the slider. Applies to range slider only. */ + /** + * Object(defaults to null): Has two _Number_ properties, _from_ and _to_ that determine + * the bounds of an area that is not authorized for values. _Applies to range slider only._ + */ + restrictedRange?: { from: number, to: number } | Array<{from: number, to: number}>; + /** Number (defaults to null): The minimum range authorized on the slider. Applies to range slider only. Can also use an array.*/ + skipRestrictedRangesWithArrowKeys?: boolean + /** Set to true to skip restricted ranges with arrow keys. */ minRange?: number; /** Number (defaults to null): The maximum range authorized on the slider. Applies to range slider only. */ maxRange?: number; @@ -70,7 +77,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). @@ -126,8 +133,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. */ @@ -203,6 +210,8 @@ declare module "angular" { ariaLabelledBy?: string; /** String(default to null): Use instead of ariaLabel and ariaLabelHigh to reference the id of an element which will be used to label the slider(s). Adds the aria-labelledby attribute. */ ariaLabelledByHigh?: string; + /** Boolean (defaults to false): Set to true to disable slider animation. */ + disableAnimation?: boolean; } } } diff --git a/src/rzslider.js b/src/rzslider.js index 636a774..8b10560 100644 --- a/src/rzslider.js +++ b/src/rzslider.js @@ -31,7 +31,7 @@ })(this, function(angular) { 'use strict' var module = angular - .module('rzModule', []) + .module('rzSlider', []) .factory('RzSliderOptions', function() { var defaultOptions = { floor: 0, @@ -41,6 +41,7 @@ minRange: null, maxRange: null, restrictedRange: null, + skipRestrictedRangesWithArrowKeys: null, pushRange: false, minLimit: null, maxLimit: null, @@ -76,6 +77,7 @@ enforceRange: false, noSwitching: false, onlyBindHandles: false, + disableAnimation: false, onStart: null, onChange: null, onEnd: null, @@ -101,7 +103,7 @@ * `options({})` allows global configuration of all sliders in the * application. * - * var app = angular.module( 'App', ['rzModule'], function( RzSliderOptions ) { + * var app = angular.module( 'App', ['rzSlider'], function( RzSliderOptions ) { * // show ticks for all sliders * RzSliderOptions.options( { showTicks: true } ); * }); @@ -336,6 +338,11 @@ */ this.currentFocusElement = null + /** + * Internal variable to know if we are already moving + */ + this.moving = false + // Slider DOM elements wrapped in jqLite this.fullBar = null // The whole slider bar this.selBar = null // Highlight between two handles @@ -391,6 +398,10 @@ this.initHasRun = true + if (this.options.disableAnimation) { + this.sliderElem.addClass('noanimate') + } + // Watch for changes to the model thrLow = rzThrottle(function() { self.onLowHandleChange() @@ -514,8 +525,8 @@ }, /* - * Reflow the slider when the low handle changes (called with throttle) - */ + * Reflow the slider when the low handle changes (called with throttle) + */ onLowHandleChange: function() { this.syncLowValue() if (this.range) this.syncHighValue() @@ -530,8 +541,8 @@ }, /* - * Reflow the slider when the high handle changes (called with throttle) - */ + * Reflow the slider when the high handle changes (called with throttle) + */ onHighHandleChange: function() { this.syncLowValue() this.syncHighValue() @@ -598,6 +609,9 @@ if (this.options.vertical) { this.positionProperty = 'bottom' this.dimensionProperty = 'height' + } else { + this.positionProperty = 'left' + this.dimensionProperty = 'width' } if (this.options.customTemplateScope) @@ -632,6 +646,7 @@ * @returns {undefined} */ resetSlider: function() { + this.resetLabelsValue() this.manageElementsStyle() this.addAccessibility() this.setMinAndMax() @@ -655,6 +670,40 @@ } }, + /** + * Check if the restrictedRange option using multiple or not + * + * Run only once during initialization and only in case 4 + * + * @returns {undefined} + */ + + ensureRestrictedBarIsArray: function(elem) { + var jElem = angular.element(elem) + this.restrictedBar = [] + if (this.options.restrictedRange) { + // this.options.restrictedRange converting to an array even if it's not entered as array. + this.options.restrictedRange = !Array.isArray( + this.options.restrictedRange + ) + ? [this.options.restrictedRange] + : this.options.restrictedRange + this.restrictedBar[0] = jElem + var mainDiv = elem.parentElement + for (var i = 1; i < this.options.restrictedRange.length; i++) { + var sp = document.createElement('span') + sp.setAttribute('class', 'rz-bar-wrapper') + sp.innerHTML = + '' + mainDiv.appendChild(sp) + this.restrictedBar[i] = angular.element(sp) + } + } else { + elem.style.visibility = 'hidden' + this.restrictedBar = null + } + }, + /** * Set the slider children to variables for easy access * @@ -683,7 +732,7 @@ this.selBar = jElem break case 4: - this.restrictedBar = jElem + this.ensureRestrictedBarIsArray(elem) break case 5: this.minH = jElem @@ -763,7 +812,16 @@ this.leftOutSelBar, !this.range || !this.options.showOuterSelectionBars ) - this.alwaysHide(this.restrictedBar, !this.options.restrictedRange) + + // this.restrictedBar is everytime an array + for (var r in this.restrictedBar) { + if (this.restrictedBar[r]) + this.alwaysHide( + this.restrictedBar[r], + !this.options.restrictedRange[r] + ) + } + this.alwaysHide( this.rightOutSelBar, !this.range || !this.options.showOuterSelectionBars @@ -773,7 +831,11 @@ this.fullBar.addClass('rz-transparent') } - if (this.options.vertical) this.sliderElem.addClass('rz-vertical') + if (this.options.vertical) { + this.sliderElem.addClass('rz-vertical') + } else { + this.sliderElem.removeClass('rz-vertical') + } if (this.options.draggableRange) this.selBar.addClass('rz-draggable') else this.selBar.removeClass('rz-draggable') @@ -820,6 +882,14 @@ resetLabelsValue: function() { this.minLab.rzsv = undefined this.maxLab.rzsv = undefined + this.flrLab.rzsv = undefined + this.ceilLab.rzsv = undefined + this.cmbLab.rzsv = undefined + this.resetPosition(this.flrLab) + this.resetPosition(this.ceilLab) + this.resetPosition(this.cmbLab) + this.resetPosition(this.minLab) + this.resetPosition(this.maxLab) }, /** @@ -939,8 +1009,11 @@ ) this.minH.attr('tabindex', '0') else this.minH.attr('tabindex', '') - if (this.options.vertical) + if (this.options.vertical) { this.minH.attr('aria-orientation', 'vertical') + } else { + this.minH.attr('aria-orientation', 'horizontal') + } if (this.options.ariaLabel) this.minH.attr('aria-label', this.options.ariaLabel) else if (this.options.ariaLabelledBy) @@ -956,6 +1029,7 @@ else this.maxH.attr('tabindex', '') if (this.options.vertical) this.maxH.attr('aria-orientation', 'vertical') + else this.maxH.attr('aria-orientation', 'horizontal') if (this.options.ariaLabelHigh) this.maxH.attr('aria-label', this.options.ariaLabelHigh) else if (this.options.ariaLabelledByHigh) @@ -1037,12 +1111,19 @@ if (this.options.rightToLeft) ticksArray.reverse() this.scope.ticks = ticksArray.map(function(value) { + var legend = null + if (angular.isObject(value)) { + legend = value.legend + value = value.value + } + var position = self.valueToPosition(value) if (self.options.vertical) position = self.maxPos - position var translation = translate + '(' + Math.round(position) + 'px)' var tick = { + legend: legend, selected: self.isTickSelected(value), style: { '-webkit-transform': translation, @@ -1075,7 +1156,7 @@ } } if (self.getLegend) { - var legend = self.getLegend(value, self.options.id) + legend = self.getLegend(value, self.options.id) if (legend) tick.legend = legend } return tick @@ -1325,14 +1406,23 @@ var position = 0, dimension = 0 if (this.options.restrictedRange) { - var from = this.valueToPosition(this.options.restrictedRange.from), - to = this.valueToPosition(this.options.restrictedRange.to) - dimension = Math.abs(to - from) - position = this.options.rightToLeft - ? to + this.handleHalfDim - : from + this.handleHalfDim - this.setDimension(this.restrictedBar, dimension) - this.setPosition(this.restrictedBar, position) + this.options.restrictedRange = !Array.isArray( + this.options.restrictedRange + ) + ? [this.options.restrictedRange] + : this.options.restrictedRange + for (var i in this.options.restrictedRange) { + var from = this.valueToPosition( + this.options.restrictedRange[i].from + ), + to = this.valueToPosition(this.options.restrictedRange[i].to) + dimension = Math.abs(to - from) + position = this.options.rightToLeft + ? to + this.handleHalfDim + : from + this.handleHalfDim + this.setDimension(this.restrictedBar[i], dimension) + this.setPosition(this.restrictedBar[i], position) + } } }, @@ -1414,8 +1504,8 @@ ? 'bottom' : 'top' : reversed - ? 'left' - : 'right' + ? 'left' + : 'right' this.scope.barStyle = { backgroundImage: 'linear-gradient(to ' + @@ -1619,6 +1709,13 @@ return pos }, + resetPosition: function(elem) { + elem.css({ + left: null, + bottom: null, + }) + }, + /** * Get element width/height depending on whether slider is horizontal or vertical * @@ -2033,6 +2130,12 @@ * @returns {undefined} */ onMove: function(pointer, event, fromTick) { + if (!this.options.disableAnimation) { + if (this.moving) { + this.sliderElem.addClass('noanimate') + } + } + this.moving = true var changedTouches = this.getEventAttr(event, 'changedTouches') var touchForThisSlider if (changedTouches) { @@ -2079,6 +2182,10 @@ * @returns {undefined} */ onEnd: function(ehMove, event) { + this.moving = false + if (!this.options.disableAnimation) { + this.sliderElem.removeClass('noanimate') + } var changedTouches = this.getEventAttr(event, 'changedTouches') if (changedTouches && changedTouches[0].identifier !== this.touchId) { return @@ -2133,6 +2240,55 @@ } }, + /** + * Skip restricted range function when arrow keys use + * + * @param {number} currentValue value of the slider + * @param {number} key arrow key used + * + * @returns {number} currentValue value of the slider + */ + + skipRestrictedRanges: function(key, currentValue) { + if ( + this.options.restrictedRange && + Array.isArray(this.options.restrictedRange) + ) { + for (var i in this.options.restrictedRange) { + var range = this.options.restrictedRange[i] + // if it first or last value + if ( + (range.from === 0 && + currentValue === 0 && + [37, 40].includes(key)) || // LEFT or DOWN + (range.to >= + this.options.restrictedRange[ + this.options.restrictedRange.length - 1 + ].to && + currentValue >= + this.options.restrictedRange[ + this.options.restrictedRange.length - 1 + ].to && + [38, 39].includes(key)) // UP or RIGHT + ) { + return currentValue + } + if (range.to > currentValue && currentValue > range.from) { + if ( + Math.abs(range.to - currentValue) > + Math.abs(range.from - currentValue) + ) { + currentValue = range.to + } else { + currentValue = range.from + } + } + } + } + + return currentValue + }, + /** * Key actions helper function * @@ -2178,9 +2334,9 @@ }, onKeyboardEvent: function(event) { - var currentValue = this[this.tracking], - keyCode = event.keyCode || event.which, - keys = { + var keyCode = event.keyCode || event.which + var currentValue = this[this.tracking] + var keys = { 38: 'UP', 40: 'DOWN', 37: 'LEFT', @@ -2204,6 +2360,9 @@ var self = this $timeout(function() { var newValue = self.roundStep(self.sanitizeValue(action)) + newValue = self.options.skipRestrictedRangesWithArrowKeys + ? self.skipRestrictedRanges(keyCode, newValue) + : newValue if (!self.options.draggableRangeOnly) { self.positionTrackingHandle(newValue) } else { @@ -2325,6 +2484,12 @@ * @returns {undefined} */ onDragMove: function(pointer, event) { + if (!this.options.disableAnimation) { + if (this.moving) { + this.sliderElem.addClass('noanimate') + } + } + this.moving = true var newPos = this.getEventPosition(event), newMinValue, newMaxValue, @@ -2492,26 +2657,30 @@ }, applyRestrictedRange: function(newValue) { - if ( - this.options.restrictedRange != null && - newValue > this.options.restrictedRange.from && - newValue < this.options.restrictedRange.to - ) { - var halfWidth = - (this.options.restrictedRange.to - - this.options.restrictedRange.from) / - 2 - if (this.tracking === 'lowValue') { - return newValue > this.options.restrictedRange.from + halfWidth - ? this.options.restrictedRange.to - : this.options.restrictedRange.from - } - if (this.tracking === 'highValue') { - return newValue < this.options.restrictedRange.to - halfWidth - ? this.options.restrictedRange.from - : this.options.restrictedRange.to + for (var i in this.options.restrictedRange) { + if ( + this.options.restrictedRange[i] != null && + newValue > this.options.restrictedRange[i].from && + newValue < this.options.restrictedRange[i].to + ) { + var halfWidth = + (this.options.restrictedRange[i].to - + this.options.restrictedRange[i].from) / + 2 + if (this.tracking === 'lowValue') { + return newValue > + this.options.restrictedRange[i].from + halfWidth + ? this.options.restrictedRange[i].to + : this.options.restrictedRange[i].from + } + if (this.tracking === 'highValue') { + return newValue < this.options.restrictedRange[i].to - halfWidth + ? this.options.restrictedRange[i].from + : this.options.restrictedRange[i].to + } } } + return newValue }, diff --git a/src/rzslider.less b/src/rzslider.less index 294b2d7..171bdfa 100644 --- a/src/rzslider.less +++ b/src/rzslider.less @@ -18,6 +18,10 @@ vertical-align: middle; user-select: none; + &.noanimate * { + transition: none !important; + } + &.with-legend { margin-bottom: @withLegendMargin; } @@ -57,11 +61,12 @@ .rz-bar-wrapper { left: 0; box-sizing: border-box; - margin-top: -@handleSize / 2; - padding-top: @handleSize / 2; + margin-top: (-@handleSize / 2); + padding-top: (@handleSize / 2); width: 100%; height: @handleSize; z-index: 1; + transition: all linear @animationDuration; } .rz-draggable { @@ -74,7 +79,7 @@ height: @barDimension; z-index: 1; background: @barNormalColor; - .rounded(@barDimension / 2); + .rounded((@barDimension / 2)); } .rz-bar-wrapper.rz-transparent .rz-bar { @@ -90,36 +95,34 @@ .rz-selection { z-index: 2; background: @barFillColor; - .rounded(@barDimension / 2); + .rounded((@barDimension / 2)); + transition: background-color linear @animationDuration; } .rz-restricted { z-index: 3; background: @restrictedBarColor; - .rounded(@barDimension / 2); + .rounded((@barDimension / 2)); } .rz-pointer { cursor: pointer; width: @handleSize; height: @handleSize; - top: -@handleSize / 2 + @barDimension / 2; + top: (-@handleSize / 2 + @barDimension / 2); background-color: @handleBgColor; z-index: 3; - .rounded(@handleSize / 2); - // -webkit-transition:all linear 0.15s; - // -moz-transition:all linear 0.15s; - // -o-transition:all linear 0.15s; - // transition:all linear 0.15s; + .rounded((@handleSize / 2)); + transition: all linear @animationDuration; &:after { content: ''; width: @handlePointerSize; height: @handlePointerSize; position: absolute; - top: @handleSize / 2 - @handlePointerSize / 2; - left: @handleSize / 2 - @handlePointerSize / 2; - .rounded(@handlePointerSize / 2); + top: (@handleSize / 2 - @handlePointerSize / 2); + left: (@handleSize / 2 - @handlePointerSize / 2); + .rounded((@handlePointerSize / 2)); background: @handleInnerColor; } &:hover:after { @@ -135,11 +138,13 @@ .rz-bubble { cursor: default; - bottom: @handleSize / 2; + bottom: (@handleSize / 2); padding: @bubblePadding; color: @labelTextColor; + transition: all linear @animationDuration; &.rz-limit { color: @limitLabelTextColor; + transition: none; } } @@ -149,7 +154,7 @@ height: 0; position: absolute; left: 0; - top: -(@ticksHeight - @barDimension) / 2; + top: (-(@ticksHeight - @barDimension) / 2); margin: 0; z-index: 1; list-style: none; @@ -158,7 +163,7 @@ .rz-ticks-values-under { .rz-tick-value { top: auto; - bottom: @ticksValuePosition - 2; + bottom: (@ticksValuePosition - 2); } } @@ -172,7 +177,8 @@ position: absolute; top: 0; left: 0; - margin-left: @handleSize / 2 - @ticksWidth / 2; // for centering + margin-left: (@handleSize / 2 - @ticksWidth / 2); // for centering + transition: background-color linear @animationDuration; &.rz-selected { background: @selectedTicksColor; } @@ -209,8 +215,8 @@ .rz-bar-wrapper { top: auto; left: 0; - margin: 0 0 0 -@handleSize / 2; - padding: 0 0 0 @handleSize / 2; + margin: 0 0 0 (-@handleSize / 2); + padding: 0 0 0 (@handleSize / 2); height: 100%; width: @handleSize; } @@ -223,13 +229,13 @@ } .rz-pointer { - left: -@handleSize / 2 + @barDimension / 2 !important; + left: (-@handleSize / 2 + @barDimension / 2) !important; top: auto; bottom: 0; } .rz-bubble { - left: @handleSize / 2 !important; + left: (@handleSize / 2) !important; margin-left: 3px; bottom: 0; } @@ -237,14 +243,14 @@ .rz-ticks { height: 100%; width: 0; - left: -(@ticksHeight - @barDimension) / 2; + left: (-(@ticksHeight - @barDimension) / 2); top: 0; z-index: 1; } .rz-tick { vertical-align: middle; margin-left: auto; - margin-top: @handleSize / 2 - @ticksWidth / 2; // for centering + margin-top: (@handleSize / 2 - @ticksWidth / 2); // for centering } .rz-tick-value { left: @ticksValuePositionOnVertical; diff --git a/src/variables.less b/src/variables.less index ae10377..a8422a9 100644 --- a/src/variables.less +++ b/src/variables.less @@ -32,3 +32,5 @@ @barDimension: 4px; @withLegendMargin: 40px; + +@animationDuration: 0.3s; diff --git a/tests/specs/helper.js b/tests/specs/helper.js index 69820ab..505d058 100644 --- a/tests/specs/helper.js +++ b/tests/specs/helper.js @@ -1,6 +1,6 @@ ;(function() { 'use strict' - var helperModule = angular.module('test-helper', ['rzModule', 'appTemplates']) + var helperModule = angular.module('test-helper', ['rzSlider', 'appTemplates']) helperModule.factory('TestHelper', function( RzSlider, diff --git a/tests/specs/options-handling-test.js b/tests/specs/options-handling-test.js index adc2d0b..e64bc4d 100644 --- a/tests/specs/options-handling-test.js +++ b/tests/specs/options-handling-test.js @@ -373,6 +373,7 @@ floor: 0, ceil: 10, showSelectionBar: true, + disableAnimation: true, }, } helper.createSlider(sliderConf) @@ -392,6 +393,7 @@ floor: 0, ceil: 10, showSelectionBarEnd: true, + disableAnimation: true, }, } helper.createSlider(sliderConf) @@ -418,6 +420,7 @@ floor: 0, ceil: 20, showSelectionBarFromValue: 10, + disableAnimation: true, }, } helper.createSlider(sliderConf) @@ -440,6 +443,7 @@ floor: 0, ceil: 20, showSelectionBarFromValue: 10, + disableAnimation: true, }, } helper.createSlider(sliderConf) @@ -601,6 +605,7 @@ options: { floor: 0, ceil: 10, + disableAnimation: true, }, } helper.createRangeSlider(sliderConf) @@ -1243,6 +1248,7 @@ ceil: 10, showSelectionBar: true, rightToLeft: true, + disableAnimation: true, }, } helper.createSlider(sliderConf) @@ -1268,6 +1274,7 @@ ceil: 10, showSelectionBarEnd: true, rightToLeft: true, + disableAnimation: true, }, } helper.createSlider(sliderConf) @@ -1312,6 +1319,7 @@ ceil: 20, showSelectionBarFromValue: 10, rightToLeft: true, + disableAnimation: true, }, } helper.createSlider(sliderConf) @@ -1359,6 +1367,7 @@ options: { floor: 0, ceil: 10, + disableAnimation: true, }, rightToLeft: true, } diff --git a/tests/specs/ticks-test.js b/tests/specs/ticks-test.js index 6e281dc..4379fd1 100644 --- a/tests/specs/ticks-test.js +++ b/tests/specs/ticks-test.js @@ -263,6 +263,39 @@ expect(lastTick.text()).to.equal('100') }) + it('should create the correct number of ticks when ticksArray is used as array of objects', function() { + var sliderConf = { + value: 50, + options: { + floor: 0, + ceil: 100, + step: 10, + ticksArray: [ + { value: 0, legend: 'Bad' }, + { value: 50, legend: 'Average' }, + { value: 100, legend: 'Excellent' }, + ], + }, + } + helper.createSlider(sliderConf) + expect(helper.element[0].querySelectorAll('.rz-tick')).to.have.length(3) + expect( + helper.element[0].querySelectorAll('.rz-tick-value') + ).to.have.length(0) + + expect( + helper.element[0].querySelectorAll('.rz-tick-legend') + ).to.have.length(3) + var firstLegend = angular.element( + helper.element[0].querySelectorAll('.rz-tick-legend')[0] + ) + expect(firstLegend.text()).to.equal('Bad') + var lastLegend = angular.element( + helper.element[0].querySelectorAll('.rz-tick-legend')[2] + ) + expect(lastLegend.text()).to.equal('Excellent') + }) + it('should create the correct number of legend items when getLegend is defined', function() { var sliderConf = { value: 50,