ember-cli-nouislider
Advanced tools
Comparing version 0.4.2 to 0.5.0
import Ember from 'ember'; | ||
import noUiSlider from 'noUiSlider'; | ||
export default Ember.Component.extend({ | ||
slider: null, | ||
@@ -25,3 +27,5 @@ start: undefined, | ||
didInsertElement: function() { | ||
this.slider = this.$().noUiSlider({ | ||
let $this = this.$().get(0); | ||
noUiSlider.create($this, { | ||
start: this.get('start'), | ||
@@ -39,8 +43,8 @@ step: this.get('step'), | ||
var _this = this, | ||
elem = this.$(); | ||
let slider = $this.noUiSlider; | ||
this.set('slider', slider); | ||
elem.on("change", function() { | ||
Ember.run(function () { | ||
_this.sendAction('change', _this.slider.val()); | ||
slider.on("change", () => { | ||
Ember.run(this, function () { | ||
this.sendAction('change', this.get('slider').get()); | ||
}); | ||
@@ -50,5 +54,5 @@ }); | ||
if ( !Ember.isEmpty(this.get('slide')) ) { | ||
elem.on("slide", function() { | ||
Ember.run(function () { | ||
_this.sendAction('slide', _this.slider.val()); | ||
slider.on("slide", () => { | ||
Ember.run(this, function () { | ||
this.sendAction('slide', this.get('slider').get()); | ||
}); | ||
@@ -60,11 +64,13 @@ }); | ||
willDestroyElement: function() { | ||
this.slider[0].destroy(); | ||
this.get('slider').destroy(); | ||
}, | ||
setVal: Ember.observer('start', function() { | ||
if (this.slider) { | ||
let slider = this.get('slider'); | ||
if (slider) { | ||
var val = this.get('start'); | ||
this.slider.val( val ); | ||
slider.set( val ); | ||
} | ||
}) | ||
}); |
@@ -5,4 +5,4 @@ module.exports = { | ||
afterInstall: function(options) { | ||
return this.addBowerPackageToProject('nouislider', '^7.0.10'); // is a promise | ||
return this.addBowerPackageToProject('nouislider', '^8.0.1'); // is a promise | ||
} | ||
}; |
## master | ||
## 0.5.0 2015-07-02 | ||
* Upgrade to nouislider 8.0.1 (#10 - @blimmer) | ||
* Documentation improvements (#10 - @blimmer) | ||
* Toolchain upgrades and tlc (#10 - @blimmer) | ||
Thanks Ben Limmer for doing all this work! | ||
## 0.4.2 2015-07-02 | ||
@@ -4,0 +12,0 @@ |
@@ -10,5 +10,9 @@ /* jshint node: true */ | ||
app.import(app.bowerDirectory + '/nouislider/distribute/jquery.nouislider.all.js'); | ||
app.import(app.bowerDirectory + '/nouislider/distribute/jquery.nouislider.min.css'); | ||
app.import(app.bowerDirectory + '/nouislider/distribute/nouislider.min.js'); | ||
app.import(app.bowerDirectory + '/nouislider/distribute/nouislider.min.css'); | ||
app.import('vendor/nouislider/shim.js', { | ||
exports: { 'noUiSlider': ['default'] } | ||
}); | ||
} | ||
}; |
{ | ||
"name": "ember-cli-nouislider", | ||
"version": "0.4.2", | ||
"version": "0.5.0", | ||
"description": "Ember range-slider component powered by nouislider", | ||
@@ -23,15 +23,14 @@ "directories": { | ||
"broccoli-asset-rev": "^2.0.2", | ||
"ember-cli": "0.2.3", | ||
"ember-cli": "0.2.7", | ||
"ember-cli-app-version": "0.3.3", | ||
"ember-cli-content-security-policy": "0.4.0", | ||
"ember-cli-dependency-checker": "0.0.8", | ||
"ember-cli-dependency-checker": "^1.0.0", | ||
"ember-cli-ic-ajax": "0.1.1", | ||
"ember-cli-inject-live-reload": "^1.3.0", | ||
"ember-cli-qunit": "0.3.10", | ||
"ember-cli-qunit": "0.3.13", | ||
"ember-cli-sass": "4.0.0-beta.5", | ||
"ember-cli-uglify": "1.0.1", | ||
"ember-data": "1.0.0-beta.16.1", | ||
"ember-cli-uglify": "^1.0.1", | ||
"ember-disable-prototype-extensions": "^1.0.0", | ||
"ember-export-application-global": "^1.0.2", | ||
"ember-try": "0.0.4", | ||
"ember-try": "0.0.6", | ||
"ember-watson": "^0.4.1" | ||
@@ -49,3 +48,3 @@ }, | ||
"ember-cli-babel": "^5.0.0", | ||
"ember-cli-htmlbars": "0.7.4" | ||
"ember-cli-htmlbars": "0.7.6" | ||
}, | ||
@@ -52,0 +51,0 @@ "ember-addon": { |
@@ -36,3 +36,5 @@ # ember-cli-nouislider | ||
Once the installation is done, you'll need to generate your own component and re-export | ||
You have the opportunity to customize if needed. | ||
To do this, generate your own component and re-export | ||
the one provided: | ||
@@ -51,4 +53,2 @@ | ||
You have the opportunity to customize if needed. | ||
Include the slider into your views like this: | ||
@@ -55,0 +55,0 @@ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
Uses eval
Supply chain riskPackage uses dynamic code execution (e.g., eval()), which is a dangerous practice. This can prevent the code from running in certain environments and increases the risk that the code may contain exploits or malicious behavior.
Found 1 instance in 1 package
Dynamic require
Supply chain riskDynamic require can indicate the package is performing dangerous or unsafe dynamic code execution.
Found 1 instance in 1 package
Minified code
QualityThis package contains minified code. This may be harmless in some cases where minified code is included in packaged libraries, however packages on npm should not minify code.
Found 1 instance in 1 package
14
2
1
1
22358
20
283
+ Addedember-cli-htmlbars@0.7.6(transitive)
- Removedember-cli-htmlbars@0.7.4(transitive)
Updatedember-cli-htmlbars@0.7.6