Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More β†’
Socket
Sign inDemoInstall
Socket

ng2-nouislider

Package Overview
Dependencies
Maintainers
2
Versions
54
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ng2-nouislider - npm Package Compare versions

Comparing version 1.8.2 to 2.0.0-beta.0

esm2015/lib/ngx-nouislider.component.js

632

bundles/ng2-nouislider.umd.js
(function (global, factory) {
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('nouislider'), require('@angular/core'), require('@angular/forms')) :
typeof define === 'function' && define.amd ? define(['exports', 'nouislider', '@angular/core', '@angular/forms'], factory) :
(factory((global['ng2-nouislider'] = {}),global.noUiSlider,global.ng.core,global.ng.forms));
}(this, (function (exports,nouislider,core,forms) { 'use strict';
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('nouislider'), require('@angular/core'), require('@angular/forms')) :
typeof define === 'function' && define.amd ? define('ng2-nouislider', ['exports', 'nouislider', '@angular/core', '@angular/forms'], factory) :
(global = global || self, factory(global['ng2-nouislider'] = {}, global.noUiSlider, global.ng.core, global.ng.forms));
}(this, function (exports, nouislider, core, forms) { 'use strict';
var DefaultFormatter = (function () {
function DefaultFormatter() {
/*! *****************************************************************************
Copyright (c) Microsoft Corporation. All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use
this file except in compliance with the License. You may obtain a copy of the
License at http://www.apache.org/licenses/LICENSE-2.0
THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
MERCHANTABLITY OR NON-INFRINGEMENT.
See the Apache Version 2.0 License for specific language governing permissions
and limitations under the License.
***************************************************************************** */
function __decorate(decorators, target, key, desc) {
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
return c > 3 && r && Object.defineProperty(target, key, r), r;
}
/**
* @param {?} value
* @return {?}
*/
DefaultFormatter.prototype.to = function (value) {
// formatting with http://stackoverflow.com/a/26463364/478584
return String(parseFloat(parseFloat(String(value)).toFixed(2)));
};
/**
* @param {?} value
* @return {?}
*/
DefaultFormatter.prototype.from = function (value) {
return parseFloat(value);
};
return DefaultFormatter;
}());
var NouisliderComponent = (function () {
/**
* @param {?} el
* @param {?} renderer
*/
function NouisliderComponent(el, renderer) {
var _this = this;
this.el = el;
this.renderer = renderer;
this.config = {};
this.change = new core.EventEmitter(true);
this.update = new core.EventEmitter(true);
this.slide = new core.EventEmitter(true);
this.set = new core.EventEmitter(true);
this.start = new core.EventEmitter(true);
this.end = new core.EventEmitter(true);
this.onChange = Function.prototype;
this.onTouched = Function.prototype;
this.eventHandler = function (emitter, values, handle, unencoded) {
var /** @type {?} */ v = _this.toValues(values);
var /** @type {?} */ emitEvents = false;
if (_this.value === undefined) {
_this.value = v;
return;
function __metadata(metadataKey, metadataValue) {
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(metadataKey, metadataValue);
}
function __values(o) {
var m = typeof Symbol === "function" && o[Symbol.iterator], i = 0;
if (m) return m.call(o);
return {
next: function () {
if (o && i >= o.length) o = void 0;
return { value: o && o[i++], done: !o };
}
if (Array.isArray(v) && _this.value[handle] != v[handle]) {
emitEvents = true;
}
if (!Array.isArray(v) && _this.value != v) {
emitEvents = true;
}
if (emitEvents) {
emitter.emit(v);
_this.onChange(v);
}
if (Array.isArray(v)) {
_this.value[handle] = v[handle];
}
else {
_this.value = v;
}
};
this.defaultKeyHandler = function (e) {
var /** @type {?} */ stepSize = _this.slider.steps();
var /** @type {?} */ index = parseInt(((e.target)).getAttribute('data-handle'));
var /** @type {?} */ sign = 1;
var /** @type {?} */ multiplier = 1;
var /** @type {?} */ step = 0;
var /** @type {?} */ delta = 0;
switch (e.which) {
case 34:// PageDown
multiplier = _this.config.pageSteps;
case 40: // ArrowDown
case 37:// ArrowLeft
sign = -1;
step = stepSize[index][0];
e.preventDefault();
break;
case 33:// PageUp
multiplier = _this.config.pageSteps;
case 38: // ArrowUp
case 39:// ArrowRight
step = stepSize[index][1];
e.preventDefault();
break;
default:
break;
}
delta = sign * multiplier * step;
var /** @type {?} */ newValue;
if (Array.isArray(_this.value)) {
newValue = [].concat(_this.value);
newValue[index] = newValue[index] + delta;
}
else {
newValue = _this.value + delta;
}
_this.slider.set(newValue);
}
var DefaultFormatter = /** @class */ (function () {
function DefaultFormatter() {
}
DefaultFormatter.prototype.to = function (value) {
// formatting with http://stackoverflow.com/a/26463364/478584
return String(parseFloat(parseFloat(String(value)).toFixed(2)));
};
}
/**
* @return {?}
*/
NouisliderComponent.prototype.ngOnInit = function () {
var _this = this;
var /** @type {?} */ inputsConfig = JSON.parse(JSON.stringify({
behaviour: this.behaviour,
connect: this.connect,
limit: this.limit,
start: this.formControl !== undefined ? this.formControl.value : this.ngModel,
step: this.step,
pageSteps: this.pageSteps,
keyboard: this.keyboard,
onKeydown: this.onKeydown,
range: this.range || this.config.range || { min: this.min, max: this.max },
tooltips: this.tooltips,
snap: this.snap,
animate: this.animate
}));
inputsConfig.tooltips = this.tooltips || this.config.tooltips;
inputsConfig.format = this.format || this.config.format || new DefaultFormatter();
this.slider = nouislider.create(this.el.nativeElement.querySelector('div'), Object.assign(this.config, inputsConfig));
this.handles = [].slice.call(this.el.nativeElement.querySelectorAll('.noUi-handle'));
if (this.config.keyboard) {
if (this.config.pageSteps === undefined) {
this.config.pageSteps = 10;
}
var _loop_1 = function (handle) {
handle.setAttribute('tabindex', 0);
handle.addEventListener('click', function () {
handle.focus();
});
if (this_1.config.onKeydown === undefined) {
handle.addEventListener('keydown', this_1.defaultKeyHandler);
DefaultFormatter.prototype.from = function (value) {
return parseFloat(value);
};
return DefaultFormatter;
}());
var NouisliderComponent = /** @class */ (function () {
function NouisliderComponent(el, renderer) {
var _this = this;
this.el = el;
this.renderer = renderer;
this.config = {};
this.change = new core.EventEmitter(true);
this.update = new core.EventEmitter(true);
this.slide = new core.EventEmitter(true);
this.set = new core.EventEmitter(true);
this.start = new core.EventEmitter(true);
this.end = new core.EventEmitter(true);
this.onChange = Function.prototype;
this.onTouched = Function.prototype;
this.eventHandler = function (emitter, values, handle, unencoded) {
var v = _this.toValues(values);
var emitEvents = false;
if (_this.value === undefined) {
_this.value = v;
return;
}
// tslint:disable triple-equals
if (Array.isArray(v) && _this.value[handle] != v[handle]) {
emitEvents = true;
}
if (!Array.isArray(v) && _this.value != v) {
emitEvents = true;
}
// tslint:enable triple-equals
if (emitEvents) {
emitter.emit(v);
_this.onChange(v);
}
if (Array.isArray(v)) {
_this.value[handle] = v[handle];
}
else {
handle.addEventListener('keydown', this_1.config.onKeydown);
_this.value = v;
}
};
var this_1 = this;
for (var _i = 0, _a = this.handles; _i < _a.length; _i++) {
var handle = _a[_i];
_loop_1(/** @type {?} */ handle);
this.defaultKeyHandler = function (e) {
var stepSize = _this.slider.steps();
var index = parseInt(e.target.getAttribute('data-handle'), 10);
var sign = 1;
var multiplier = 1;
var step = 0;
var delta = 0;
switch (e['which']) {
case 34: // PageDown
multiplier = _this.config.pageSteps;
case 40: // ArrowDown
case 37: // ArrowLeft
sign = -1;
step = stepSize[index][0];
e.preventDefault();
break;
case 33: // PageUp
multiplier = _this.config.pageSteps;
case 38: // ArrowUp
case 39: // ArrowRight
step = stepSize[index][1];
e.preventDefault();
break;
default:
break;
}
delta = sign * multiplier * step;
var newValue;
if (Array.isArray(_this.value)) {
newValue = [].concat(_this.value);
newValue[index] = newValue[index] + delta;
}
else {
newValue = _this.value + delta;
}
_this.slider.set(newValue);
};
}
NouisliderComponent_1 = NouisliderComponent;
NouisliderComponent.prototype.ngOnInit = function () {
var _this = this;
var e_1, _a;
var inputsConfig = JSON.parse(JSON.stringify({
behaviour: this.behaviour,
connect: this.connect,
limit: this.limit,
start: this.formControl !== undefined ? this.formControl.value : this.ngModel,
step: this.step,
pageSteps: this.pageSteps,
keyboard: this.keyboard,
onKeydown: this.onKeydown,
range: this.range || this.config.range || { min: this.min, max: this.max },
tooltips: this.tooltips,
snap: this.snap,
animate: this.animate
}));
inputsConfig.tooltips = this.tooltips || this.config.tooltips;
inputsConfig.format = this.format || this.config.format || new DefaultFormatter();
this.slider = nouislider.create(this.el.nativeElement.querySelector('div'), Object.assign(this.config, inputsConfig));
this.handles = [].slice.call(this.el.nativeElement.querySelectorAll('.noUi-handle'));
if (this.config.keyboard) {
if (this.config.pageSteps === undefined) {
this.config.pageSteps = 10;
}
var _loop_1 = function (handle) {
handle.setAttribute('tabindex', 0);
handle.addEventListener('click', function () {
handle.focus();
});
if (this_1.config.onKeydown === undefined) {
handle.addEventListener('keydown', this_1.defaultKeyHandler);
}
else {
handle.addEventListener('keydown', this_1.config.onKeydown);
}
};
var this_1 = this;
try {
for (var _b = __values(this.handles), _c = _b.next(); !_c.done; _c = _b.next()) {
var handle = _c.value;
_loop_1(handle);
}
}
catch (e_1_1) { e_1 = { error: e_1_1 }; }
finally {
try {
if (_c && !_c.done && (_a = _b.return)) _a.call(_b);
}
finally { if (e_1) throw e_1.error; }
}
}
}
this.slider.on('set', function (values, handle, unencoded) {
_this.eventHandler(_this.set, values, handle, unencoded);
});
this.slider.on('update', function (values, handle, unencoded) {
_this.update.emit(_this.toValues(values));
});
this.slider.on('change', function (values, handle, unencoded) {
_this.change.emit(_this.toValues(values));
});
this.slider.on('slide', function (values, handle, unencoded) {
_this.eventHandler(_this.slide, values, handle, unencoded);
});
this.slider.on('start', function (values, handle, unencoded) {
_this.start.emit(_this.toValues(values));
});
this.slider.on('end', function (values, handle, unencoded) {
_this.end.emit(_this.toValues(values));
});
};
/**
* @param {?} changes
* @return {?}
*/
NouisliderComponent.prototype.ngOnChanges = function (changes) {
var _this = this;
if (this.slider && (changes.min || changes.max || changes.step || changes.range)) {
setTimeout(function () {
_this.slider.updateOptions({
range: Object.assign({}, {
min: _this.min,
max: _this.max
}, _this.range || {}),
step: _this.step
});
this.slider.on('set', function (values, handle, unencoded) {
_this.eventHandler(_this.set, values, handle, unencoded);
});
}
};
/**
* @param {?} values
* @return {?}
*/
NouisliderComponent.prototype.toValues = function (values) {
var /** @type {?} */ v = values.map(this.config.format.from);
return (v.length == 1 ? v[0] : v);
};
/**
* @param {?} value
* @return {?}
*/
NouisliderComponent.prototype.writeValue = function (value) {
var _this = this;
if (this.slider) {
setTimeout(function () {
_this.slider.set(value);
this.slider.on('update', function (values, handle, unencoded) {
_this.update.emit(_this.toValues(values));
});
}
};
/**
* @param {?} fn
* @return {?}
*/
NouisliderComponent.prototype.registerOnChange = function (fn) {
this.onChange = fn;
};
/**
* @param {?} fn
* @return {?}
*/
NouisliderComponent.prototype.registerOnTouched = function (fn) {
this.onTouched = fn;
};
/**
* @param {?} isDisabled
* @return {?}
*/
NouisliderComponent.prototype.setDisabledState = function (isDisabled) {
isDisabled
? this.renderer.setAttribute(this.el.nativeElement.childNodes[0], 'disabled', 'true')
: this.renderer.removeAttribute(this.el.nativeElement.childNodes[0], 'disabled');
};
return NouisliderComponent;
}());
NouisliderComponent.decorators = [
{ type: core.Component, args: [{
this.slider.on('change', function (values, handle, unencoded) {
_this.change.emit(_this.toValues(values));
});
this.slider.on('slide', function (values, handle, unencoded) {
_this.eventHandler(_this.slide, values, handle, unencoded);
});
this.slider.on('start', function (values, handle, unencoded) {
_this.start.emit(_this.toValues(values));
});
this.slider.on('end', function (values, handle, unencoded) {
_this.end.emit(_this.toValues(values));
});
};
NouisliderComponent.prototype.ngOnChanges = function (changes) {
var _this = this;
if (this.slider && (changes.min || changes.max || changes.step || changes.range)) {
setTimeout(function () {
_this.slider.updateOptions({
range: Object.assign({}, {
min: _this.min,
max: _this.max
}, _this.range || {}),
step: _this.step
});
});
}
};
NouisliderComponent.prototype.toValues = function (values) {
var v = values.map(this.config.format.from);
return (v.length === 1 ? v[0] : v);
};
NouisliderComponent.prototype.writeValue = function (value) {
var _this = this;
if (this.slider) {
setTimeout(function () {
_this.slider.set(value);
});
}
};
NouisliderComponent.prototype.registerOnChange = function (fn) {
this.onChange = fn;
};
NouisliderComponent.prototype.registerOnTouched = function (fn) {
this.onTouched = fn;
};
NouisliderComponent.prototype.setDisabledState = function (isDisabled) {
isDisabled
? this.renderer.setAttribute(this.el.nativeElement.childNodes[0], 'disabled', 'true')
: this.renderer.removeAttribute(this.el.nativeElement.childNodes[0], 'disabled');
};
var NouisliderComponent_1;
__decorate([
core.Input(),
__metadata("design:type", Boolean)
], NouisliderComponent.prototype, "disabled", void 0);
__decorate([
core.Input(),
__metadata("design:type", String)
], NouisliderComponent.prototype, "behaviour", void 0);
__decorate([
core.Input(),
__metadata("design:type", Array)
], NouisliderComponent.prototype, "connect", void 0);
__decorate([
core.Input(),
__metadata("design:type", Number)
], NouisliderComponent.prototype, "limit", void 0);
__decorate([
core.Input(),
__metadata("design:type", Number)
], NouisliderComponent.prototype, "min", void 0);
__decorate([
core.Input(),
__metadata("design:type", Number)
], NouisliderComponent.prototype, "max", void 0);
__decorate([
core.Input(),
__metadata("design:type", Boolean)
], NouisliderComponent.prototype, "snap", void 0);
__decorate([
core.Input(),
__metadata("design:type", Object)
], NouisliderComponent.prototype, "animate", void 0);
__decorate([
core.Input(),
__metadata("design:type", Object)
], NouisliderComponent.prototype, "range", void 0);
__decorate([
core.Input(),
__metadata("design:type", Number)
], NouisliderComponent.prototype, "step", void 0);
__decorate([
core.Input(),
__metadata("design:type", Object)
], NouisliderComponent.prototype, "format", void 0);
__decorate([
core.Input(),
__metadata("design:type", Number)
], NouisliderComponent.prototype, "pageSteps", void 0);
__decorate([
core.Input(),
__metadata("design:type", Object)
], NouisliderComponent.prototype, "config", void 0);
__decorate([
core.Input(),
__metadata("design:type", Object)
], NouisliderComponent.prototype, "ngModel", void 0);
__decorate([
core.Input(),
__metadata("design:type", Boolean)
], NouisliderComponent.prototype, "keyboard", void 0);
__decorate([
core.Input(),
__metadata("design:type", Object)
], NouisliderComponent.prototype, "onKeydown", void 0);
__decorate([
core.Input(),
__metadata("design:type", forms.FormControl)
], NouisliderComponent.prototype, "formControl", void 0);
__decorate([
core.Input(),
__metadata("design:type", Array)
], NouisliderComponent.prototype, "tooltips", void 0);
__decorate([
core.Output(),
__metadata("design:type", core.EventEmitter)
], NouisliderComponent.prototype, "change", void 0);
__decorate([
core.Output(),
__metadata("design:type", core.EventEmitter)
], NouisliderComponent.prototype, "update", void 0);
__decorate([
core.Output(),
__metadata("design:type", core.EventEmitter)
], NouisliderComponent.prototype, "slide", void 0);
__decorate([
core.Output(),
__metadata("design:type", core.EventEmitter)
], NouisliderComponent.prototype, "set", void 0);
__decorate([
core.Output(),
__metadata("design:type", core.EventEmitter)
], NouisliderComponent.prototype, "start", void 0);
__decorate([
core.Output(),
__metadata("design:type", core.EventEmitter)
], NouisliderComponent.prototype, "end", void 0);
NouisliderComponent = NouisliderComponent_1 = __decorate([
core.Component({
selector: 'nouislider',

@@ -242,68 +347,35 @@ host: {

template: '<div [attr.disabled]="disabled ? true : undefined"></div>',
styles: ["\n :host {\n display: block;\n margin-top: 1rem;\n margin-bottom: 1rem;\n }\n "],
providers: [
{
provide: forms.NG_VALUE_ACCESSOR,
useExisting: core.forwardRef(function () { return NouisliderComponent; }),
useExisting: core.forwardRef(function () { return NouisliderComponent_1; }),
multi: true
}
]
},] },
];
/**
* @nocollapse
*/
NouisliderComponent.ctorParameters = function () { return [
{ type: core.ElementRef, },
{ type: core.Renderer2, },
]; };
NouisliderComponent.propDecorators = {
'disabled': [{ type: core.Input },],
'behaviour': [{ type: core.Input },],
'connect': [{ type: core.Input },],
'limit': [{ type: core.Input },],
'min': [{ type: core.Input },],
'max': [{ type: core.Input },],
'snap': [{ type: core.Input },],
'animate': [{ type: core.Input },],
'range': [{ type: core.Input },],
'step': [{ type: core.Input },],
'format': [{ type: core.Input },],
'pageSteps': [{ type: core.Input },],
'config': [{ type: core.Input },],
'ngModel': [{ type: core.Input },],
'keyboard': [{ type: core.Input },],
'onKeydown': [{ type: core.Input },],
'formControl': [{ type: core.Input },],
'tooltips': [{ type: core.Input },],
'change': [{ type: core.Output },],
'update': [{ type: core.Output },],
'slide': [{ type: core.Output },],
'set': [{ type: core.Output },],
'start': [{ type: core.Output },],
'end': [{ type: core.Output },],
};
var NouisliderModule = (function () {
function NouisliderModule() {
}
return NouisliderModule;
}());
NouisliderModule.decorators = [
{ type: core.NgModule, args: [{
exports: [NouisliderComponent],
],
styles: ["\n :host {\n display: block;\n margin-top: 1rem;\n margin-bottom: 1rem;\n }\n "]
}),
__metadata("design:paramtypes", [core.ElementRef, core.Renderer2])
], NouisliderComponent);
return NouisliderComponent;
}());
var NouisliderModule = /** @class */ (function () {
function NouisliderModule() {
}
NouisliderModule = __decorate([
core.NgModule({
declarations: [NouisliderComponent],
},] },
];
/**
* @nocollapse
*/
NouisliderModule.ctorParameters = function () { return []; };
exports: [NouisliderComponent]
})
], NouisliderModule);
return NouisliderModule;
}());
exports.DefaultFormatter = DefaultFormatter;
exports.NouisliderComponent = NouisliderComponent;
exports.NouisliderModule = NouisliderModule;
exports.DefaultFormatter = DefaultFormatter;
exports.NouisliderComponent = NouisliderComponent;
exports.NouisliderModule = NouisliderModule;
Object.defineProperty(exports, '__esModule', { value: true });
Object.defineProperty(exports, '__esModule', { value: true });
})));
}));
//# sourceMappingURL=ng2-nouislider.umd.js.map

@@ -1,2 +0,2 @@

!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports,require("nouislider"),require("@angular/core"),require("@angular/forms")):"function"==typeof define&&define.amd?define(["exports","nouislider","@angular/core","@angular/forms"],e):e(t["ng2-nouislider"]={},t.noUiSlider,t.ng.core,t.ng.forms)}(this,function(t,s,n,e){"use strict";var a=(i.prototype.to=function(t){return String(parseFloat(parseFloat(String(t)).toFixed(2)))},i.prototype.from=function(t){return parseFloat(t)},i);function i(){}var r=(o.prototype.ngOnInit=function(){var i=this,t=JSON.parse(JSON.stringify({behaviour:this.behaviour,connect:this.connect,limit:this.limit,start:this.formControl!==undefined?this.formControl.value:this.ngModel,step:this.step,pageSteps:this.pageSteps,keyboard:this.keyboard,onKeydown:this.onKeydown,range:this.range||this.config.range||{min:this.min,max:this.max},tooltips:this.tooltips,snap:this.snap,animate:this.animate}));if(t.tooltips=this.tooltips||this.config.tooltips,t.format=this.format||this.config.format||new a,this.slider=s.create(this.el.nativeElement.querySelector("div"),Object.assign(this.config,t)),this.handles=[].slice.call(this.el.nativeElement.querySelectorAll(".noUi-handle")),this.config.keyboard){this.config.pageSteps===undefined&&(this.config.pageSteps=10);for(var e=function(t){t.setAttribute("tabindex",0),t.addEventListener("click",function(){t.focus()}),n.config.onKeydown===undefined?t.addEventListener("keydown",n.defaultKeyHandler):t.addEventListener("keydown",n.config.onKeydown)},n=this,r=0,o=this.handles;r<o.length;r++)e(o[r])}this.slider.on("set",function(t,e,n){i.eventHandler(i.set,t,e,n)}),this.slider.on("update",function(t,e,n){i.update.emit(i.toValues(t))}),this.slider.on("change",function(t,e,n){i.change.emit(i.toValues(t))}),this.slider.on("slide",function(t,e,n){i.eventHandler(i.slide,t,e,n)}),this.slider.on("start",function(t,e,n){i.start.emit(i.toValues(t))}),this.slider.on("end",function(t,e,n){i.end.emit(i.toValues(t))})},o.prototype.ngOnChanges=function(t){var e=this;this.slider&&(t.min||t.max||t.step||t.range)&&setTimeout(function(){e.slider.updateOptions({range:Object.assign({},{min:e.min,max:e.max},e.range||{}),step:e.step})})},o.prototype.toValues=function(t){var e=t.map(this.config.format.from);return 1==e.length?e[0]:e},o.prototype.writeValue=function(t){var e=this;this.slider&&setTimeout(function(){e.slider.set(t)})},o.prototype.registerOnChange=function(t){this.onChange=t},o.prototype.registerOnTouched=function(t){this.onTouched=t},o.prototype.setDisabledState=function(t){t?this.renderer.setAttribute(this.el.nativeElement.childNodes[0],"disabled","true"):this.renderer.removeAttribute(this.el.nativeElement.childNodes[0],"disabled")},o);function o(t,e){var u=this;this.el=t,this.renderer=e,this.config={},this.change=new n.EventEmitter(!0),this.update=new n.EventEmitter(!0),this.slide=new n.EventEmitter(!0),this.set=new n.EventEmitter(!0),this.start=new n.EventEmitter(!0),this.end=new n.EventEmitter(!0),this.onChange=Function.prototype,this.onTouched=Function.prototype,this.eventHandler=function(t,e,n,i){var r=u.toValues(e),o=!1;u.value!==undefined?(Array.isArray(r)&&u.value[n]!=r[n]&&(o=!0),Array.isArray(r)||u.value==r||(o=!0),o&&(t.emit(r),u.onChange(r)),Array.isArray(r)?u.value[n]=r[n]:u.value=r):u.value=r},this.defaultKeyHandler=function(t){var e,n,i=u.slider.steps(),r=parseInt(t.target.getAttribute("data-handle")),o=1,s=1,a=0;switch(t.which){case 34:s=u.config.pageSteps;case 40:case 37:o=-1,a=i[r][0],t.preventDefault();break;case 33:s=u.config.pageSteps;case 38:case 39:a=i[r][1],t.preventDefault()}e=o*s*a,Array.isArray(u.value)?(n=[].concat(u.value))[r]=n[r]+e:n=u.value+e,u.slider.set(n)}}r.decorators=[{type:n.Component,args:[{selector:"nouislider",host:{"[class.ng2-nouislider]":"true"},template:'<div [attr.disabled]="disabled ? true : undefined"></div>',styles:["\n :host {\n display: block;\n margin-top: 1rem;\n margin-bottom: 1rem;\n }\n "],providers:[{provide:e.NG_VALUE_ACCESSOR,useExisting:n.forwardRef(function(){return r}),multi:!0}]}]}],r.ctorParameters=function(){return[{type:n.ElementRef},{type:n.Renderer2}]},r.propDecorators={disabled:[{type:n.Input}],behaviour:[{type:n.Input}],connect:[{type:n.Input}],limit:[{type:n.Input}],min:[{type:n.Input}],max:[{type:n.Input}],snap:[{type:n.Input}],animate:[{type:n.Input}],range:[{type:n.Input}],step:[{type:n.Input}],format:[{type:n.Input}],pageSteps:[{type:n.Input}],config:[{type:n.Input}],ngModel:[{type:n.Input}],keyboard:[{type:n.Input}],onKeydown:[{type:n.Input}],formControl:[{type:n.Input}],tooltips:[{type:n.Input}],change:[{type:n.Output}],update:[{type:n.Output}],slide:[{type:n.Output}],set:[{type:n.Output}],start:[{type:n.Output}],end:[{type:n.Output}]};var u=function p(){};u.decorators=[{type:n.NgModule,args:[{exports:[r],declarations:[r]}]}],u.ctorParameters=function(){return[]},t.DefaultFormatter=a,t.NouisliderComponent=r,t.NouisliderModule=u,Object.defineProperty(t,"__esModule",{value:!0})});
//# sourceMappingURL=ng2-nouislider.umd.min.js.map
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("nouislider"),require("@angular/core"),require("@angular/forms")):"function"==typeof define&&define.amd?define("ng2-nouislider",["exports","nouislider","@angular/core","@angular/forms"],t):t((e=e||self)["ng2-nouislider"]={},e.noUiSlider,e.ng.core,e.ng.forms)}(this,function(e,t,n,i){"use strict";function o(e,t,n,i){var o,r=arguments.length,s=r<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,i);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,n,s):o(t,n))||s);return r>3&&s&&Object.defineProperty(t,n,s),s}function r(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}var s=function(){function e(){}return e.prototype.to=function(e){return String(parseFloat(parseFloat(String(e)).toFixed(2)))},e.prototype.from=function(e){return parseFloat(e)},e}(),a=function(){function e(e,t){var i=this;this.el=e,this.renderer=t,this.config={},this.change=new n.EventEmitter(!0),this.update=new n.EventEmitter(!0),this.slide=new n.EventEmitter(!0),this.set=new n.EventEmitter(!0),this.start=new n.EventEmitter(!0),this.end=new n.EventEmitter(!0),this.onChange=Function.prototype,this.onTouched=Function.prototype,this.eventHandler=function(e,t,n,o){var r=i.toValues(t),s=!1;i.value!==undefined?(Array.isArray(r)&&i.value[n]!=r[n]&&(s=!0),Array.isArray(r)||i.value==r||(s=!0),s&&(e.emit(r),i.onChange(r)),Array.isArray(r)?i.value[n]=r[n]:i.value=r):i.value=r},this.defaultKeyHandler=function(e){var t,n,o=i.slider.steps(),r=parseInt(e.target.getAttribute("data-handle"),10),s=1,a=1,p=0;switch(e.which){case 34:a=i.config.pageSteps;case 40:case 37:s=-1,p=o[r][0],e.preventDefault();break;case 33:a=i.config.pageSteps;case 38:case 39:p=o[r][1],e.preventDefault()}t=s*a*p,Array.isArray(i.value)?(n=[].concat(i.value))[r]=n[r]+t:n=i.value+t,i.slider.set(n)}}var a;return a=e,e.prototype.ngOnInit=function(){var e,n,i=this,o=JSON.parse(JSON.stringify({behaviour:this.behaviour,connect:this.connect,limit:this.limit,start:this.formControl!==undefined?this.formControl.value:this.ngModel,step:this.step,pageSteps:this.pageSteps,keyboard:this.keyboard,onKeydown:this.onKeydown,range:this.range||this.config.range||{min:this.min,max:this.max},tooltips:this.tooltips,snap:this.snap,animate:this.animate}));if(o.tooltips=this.tooltips||this.config.tooltips,o.format=this.format||this.config.format||new s,this.slider=t.create(this.el.nativeElement.querySelector("div"),Object.assign(this.config,o)),this.handles=[].slice.call(this.el.nativeElement.querySelectorAll(".noUi-handle")),this.config.keyboard){this.config.pageSteps===undefined&&(this.config.pageSteps=10);var r=function(e){e.setAttribute("tabindex",0),e.addEventListener("click",function(){e.focus()}),a.config.onKeydown===undefined?e.addEventListener("keydown",a.defaultKeyHandler):e.addEventListener("keydown",a.config.onKeydown)},a=this;try{for(var p=function(e){var t="function"==typeof Symbol&&e[Symbol.iterator],n=0;return t?t.call(e):{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}}}(this.handles),d=p.next();!d.done;d=p.next()){r(d.value)}}catch(u){e={error:u}}finally{try{d&&!d.done&&(n=p["return"])&&n.call(p)}finally{if(e)throw e.error}}}this.slider.on("set",function(e,t,n){i.eventHandler(i.set,e,t,n)}),this.slider.on("update",function(e,t,n){i.update.emit(i.toValues(e))}),this.slider.on("change",function(e,t,n){i.change.emit(i.toValues(e))}),this.slider.on("slide",function(e,t,n){i.eventHandler(i.slide,e,t,n)}),this.slider.on("start",function(e,t,n){i.start.emit(i.toValues(e))}),this.slider.on("end",function(e,t,n){i.end.emit(i.toValues(e))})},e.prototype.ngOnChanges=function(e){var t=this;this.slider&&(e.min||e.max||e.step||e.range)&&setTimeout(function(){t.slider.updateOptions({range:Object.assign({},{min:t.min,max:t.max},t.range||{}),step:t.step})})},e.prototype.toValues=function(e){var t=e.map(this.config.format.from);return 1===t.length?t[0]:t},e.prototype.writeValue=function(e){var t=this;this.slider&&setTimeout(function(){t.slider.set(e)})},e.prototype.registerOnChange=function(e){this.onChange=e},e.prototype.registerOnTouched=function(e){this.onTouched=e},e.prototype.setDisabledState=function(e){e?this.renderer.setAttribute(this.el.nativeElement.childNodes[0],"disabled","true"):this.renderer.removeAttribute(this.el.nativeElement.childNodes[0],"disabled")},o([n.Input(),r("design:type",Boolean)],e.prototype,"disabled",void 0),o([n.Input(),r("design:type",String)],e.prototype,"behaviour",void 0),o([n.Input(),r("design:type",Array)],e.prototype,"connect",void 0),o([n.Input(),r("design:type",Number)],e.prototype,"limit",void 0),o([n.Input(),r("design:type",Number)],e.prototype,"min",void 0),o([n.Input(),r("design:type",Number)],e.prototype,"max",void 0),o([n.Input(),r("design:type",Boolean)],e.prototype,"snap",void 0),o([n.Input(),r("design:type",Object)],e.prototype,"animate",void 0),o([n.Input(),r("design:type",Object)],e.prototype,"range",void 0),o([n.Input(),r("design:type",Number)],e.prototype,"step",void 0),o([n.Input(),r("design:type",Object)],e.prototype,"format",void 0),o([n.Input(),r("design:type",Number)],e.prototype,"pageSteps",void 0),o([n.Input(),r("design:type",Object)],e.prototype,"config",void 0),o([n.Input(),r("design:type",Object)],e.prototype,"ngModel",void 0),o([n.Input(),r("design:type",Boolean)],e.prototype,"keyboard",void 0),o([n.Input(),r("design:type",Object)],e.prototype,"onKeydown",void 0),o([n.Input(),r("design:type",i.FormControl)],e.prototype,"formControl",void 0),o([n.Input(),r("design:type",Array)],e.prototype,"tooltips",void 0),o([n.Output(),r("design:type",n.EventEmitter)],e.prototype,"change",void 0),o([n.Output(),r("design:type",n.EventEmitter)],e.prototype,"update",void 0),o([n.Output(),r("design:type",n.EventEmitter)],e.prototype,"slide",void 0),o([n.Output(),r("design:type",n.EventEmitter)],e.prototype,"set",void 0),o([n.Output(),r("design:type",n.EventEmitter)],e.prototype,"start",void 0),o([n.Output(),r("design:type",n.EventEmitter)],e.prototype,"end",void 0),e=a=o([n.Component({selector:"nouislider",host:{"[class.ng2-nouislider]":"true"},template:'<div [attr.disabled]="disabled ? true : undefined"></div>',providers:[{provide:i.NG_VALUE_ACCESSOR,useExisting:n.forwardRef(function(){return a}),multi:!0}],styles:["\n :host {\n display: block;\n margin-top: 1rem;\n margin-bottom: 1rem;\n }\n "]}),r("design:paramtypes",[n.ElementRef,n.Renderer2])],e)}(),p=function(){function e(){}return e=o([n.NgModule({declarations:[a],exports:[a]})],e)}();e.DefaultFormatter=s,e.NouisliderComponent=a,e.NouisliderModule=p,Object.defineProperty(e,"__esModule",{value:!0})});
//# sourceMappingURL=ng2-nouislider.umd.min.js.map
/**
* Generated bundle index. Do not edit.
*/
export * from './public_api';
export * from './public-api';

@@ -1,1 +0,1 @@

{"__symbolic":"module","version":3,"metadata":{"NouiFormatter":{"__symbolic":"interface"},"DefaultFormatter":{"__symbolic":"class","members":{"to":[{"__symbolic":"method"}],"from":[{"__symbolic":"method"}]}},"NouisliderComponent":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Component"},"arguments":[{"selector":"nouislider","host":{"[class.ng2-nouislider]":"true"},"template":"<div [attr.disabled]=\"disabled ? true : undefined\"></div>","styles":["\n :host {\n display: block;\n margin-top: 1rem;\n margin-bottom: 1rem;\n }\n "],"providers":[{"provide":{"__symbolic":"reference","module":"@angular/forms","name":"NG_VALUE_ACCESSOR"},"useExisting":{"__symbolic":"reference","name":"NouisliderComponent"},"multi":true}]}]}],"members":{"disabled":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"behaviour":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"connect":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"limit":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"min":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"max":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"snap":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"animate":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"range":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"step":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"format":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"pageSteps":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"config":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"ngModel":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"keyboard":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"onKeydown":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"formControl":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"tooltips":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"change":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Output"}}]}],"update":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Output"}}]}],"slide":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Output"}}]}],"set":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Output"}}]}],"start":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Output"}}]}],"end":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Output"}}]}],"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","module":"@angular/core","name":"ElementRef"},{"__symbolic":"reference","module":"@angular/core","name":"Renderer2"}]}],"ngOnInit":[{"__symbolic":"method"}],"ngOnChanges":[{"__symbolic":"method"}],"toValues":[{"__symbolic":"method"}],"writeValue":[{"__symbolic":"method"}],"registerOnChange":[{"__symbolic":"method"}],"registerOnTouched":[{"__symbolic":"method"}],"setDisabledState":[{"__symbolic":"method"}]}},"NouisliderModule":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"NgModule"},"arguments":[{"exports":[{"__symbolic":"reference","name":"NouisliderComponent"}],"declarations":[{"__symbolic":"reference","name":"NouisliderComponent"}]}]}],"members":{}}},"origins":{"NouiFormatter":"./ng2-nouislider.component","DefaultFormatter":"./ng2-nouislider.component","NouisliderComponent":"./ng2-nouislider.component","NouisliderModule":"./ng2-nouislider.module"},"importAs":"ng2-nouislider"}
{"__symbolic":"module","version":4,"metadata":{"NouiFormatter":{"__symbolic":"interface"},"DefaultFormatter":{"__symbolic":"class","members":{"to":[{"__symbolic":"method"}],"from":[{"__symbolic":"method"}]}},"NouisliderComponent":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Component","line":34,"character":1},"arguments":[{"selector":"nouislider","host":{"[class.ng2-nouislider]":"true","$quoted$":["[class.ng2-nouislider]"]},"template":"<div [attr.disabled]=\"disabled ? true : undefined\"></div>","styles":["\n :host {\n display: block;\n margin-top: 1rem;\n margin-bottom: 1rem;\n }\n "],"providers":[{"provide":{"__symbolic":"reference","module":"@angular/forms","name":"NG_VALUE_ACCESSOR","line":49,"character":15},"useExisting":{"__symbolic":"reference","name":"NouisliderComponent"},"multi":true}]}]}],"members":{"disabled":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":59,"character":3}}]}],"behaviour":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":60,"character":3}}]}],"connect":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":61,"character":3}}]}],"limit":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":62,"character":3}}]}],"min":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":63,"character":3}}]}],"max":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":64,"character":3}}]}],"snap":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":65,"character":3}}]}],"animate":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":66,"character":3}}]}],"range":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":67,"character":3}}]}],"step":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":68,"character":3}}]}],"format":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":69,"character":3}}]}],"pageSteps":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":70,"character":3}}]}],"config":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":71,"character":3}}]}],"ngModel":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":72,"character":3}}]}],"keyboard":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":73,"character":3}}]}],"onKeydown":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":74,"character":3}}]}],"formControl":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":75,"character":3}}]}],"tooltips":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":76,"character":3}}]}],"change":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Output","line":77,"character":3}}]}],"update":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Output","line":78,"character":3}}]}],"slide":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Output","line":79,"character":3}}]}],"set":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Output","line":80,"character":3}}]}],"start":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Output","line":81,"character":3}}]}],"end":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Output","line":82,"character":3}}]}],"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","module":"@angular/core","name":"ElementRef","line":87,"character":26},{"__symbolic":"reference","module":"@angular/core","name":"Renderer2","line":87,"character":56}]}],"ngOnInit":[{"__symbolic":"method"}],"ngOnChanges":[{"__symbolic":"method"}],"toValues":[{"__symbolic":"method"}],"writeValue":[{"__symbolic":"method"}],"registerOnChange":[{"__symbolic":"method"}],"registerOnTouched":[{"__symbolic":"method"}],"setDisabledState":[{"__symbolic":"method"}]}},"NouisliderModule":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"NgModule","line":3,"character":1},"arguments":[{"declarations":[{"__symbolic":"reference","name":"NouisliderComponent"}],"exports":[{"__symbolic":"reference","name":"NouisliderComponent"}]}]}],"members":{}}},"origins":{"NouiFormatter":"./lib/ngx-nouislider.component","DefaultFormatter":"./lib/ngx-nouislider.component","NouisliderComponent":"./lib/ngx-nouislider.component","NouisliderModule":"./lib/ngx-nouislider.module"},"importAs":"ng2-nouislider"}

@@ -1,1 +0,78 @@

{"name":"ng2-nouislider","version":"1.8.2","description":"Angular2 noUiSlider component","scripts":{"contributors":"all-contributors generate","lint":"tslint src/public_api.ts","build":"npm run lint && ng-packagr -p ng-package.json","start":"npm run build && webpack-dev-server --host 0.0.0.0","deploy":"NODE_ENV=prod npm run build && NODE_ENV=prod webpack && gh-pages -d demo","test":"NODE_ENV=test karma start","test:ci":"NODE_ENV=test karma start --singleRun"},"keywords":["angular2","ng2","nouislider","slider","range","component","directive"],"author":"Tomasz Bak <t.bak@selleo.com>","license":"MIT","repository":{"type":"git","url":"https://github.com/tb/ng2-nouislider"},"bugs":{"url":"https://github.com/tb/ng2-nouislider/issues"},"devDependencies":{"@angular/animations":"4.4.1","@angular/common":"4.4.1","@angular/compiler":"4.4.1","@angular/compiler-cli":"4.4.1","@angular/core":"4.4.1","@angular/forms":"4.4.1","@angular/platform-browser":"4.4.1","@angular/platform-browser-dynamic":"4.4.1","@angular/platform-server":"4.4.1","@types/jasmine":"2.5.41","@types/node":"6.0.88","@types/nouislider":"^9.0.1","all-contributors-cli":"^4.4.0","css-loader":"^0.23.1","es6-shim":"^0.35.0","gh-pages":"^0.11.0","http-server":"^0.9.0","jasmine-core":"^2.4.1","karma":"1.1.2","karma-jasmine":"^1.0.2","karma-phantomjs-launcher":"^1.0.0","karma-sourcemap-loader":"^0.3.7","karma-webpack":"1.7.0","ng-packagr":"^1.7.0","node-sass":"^3.7.0","nouislider":"^11.0.0","raw-loader":"^0.5.1","reflect-metadata":"^0.1.3","rxjs":"5.5.2","sass-loader":"^3.2.0","style-loader":"^0.13.1","ts-helpers":"^1.1.1","ts-loader":"^3.5.0","tslint":"^3.9.0","tslint-loader":"^2.1.4","typescript":"2.4.2","webpack":"^1.12.14","webpack-dev-server":"^1.14.1","zone.js":"0.8.17"},"peerDependencies":{"@angular/common":">=2.x","@angular/core":">=2.x","nouislider":">=9.x"},"main":"bundles/ng2-nouislider.umd.js","module":"ng2-nouislider.es5.js","es2015":"ng2-nouislider.js","typings":"ng2-nouislider.d.ts","metadata":"ng2-nouislider.metadata.json"}
{
"name": "ng2-nouislider",
"version": "2.0.0-beta.0",
"description": "Angular2 noUiSlider component",
"keywords": [
"angular2",
"ng2",
"nouislider",
"slider",
"range",
"component",
"directive"
],
"author": "Tomasz Bak <t.bak@selleo.com>",
"license": "MIT",
"repository": {
"type": "git",
"url": "https://github.com/tb/ng2-nouislider"
},
"bugs": {
"url": "https://github.com/tb/ng2-nouislider/issues"
},
"devDependencies": {
"@angular-devkit/build-angular": "^0.800.0",
"@angular-devkit/build-ng-packagr": "^0.800.0",
"@angular/animations": "^8.0.0",
"@angular/cli": "^8.0.0",
"@angular/common": "^8.0.0",
"@angular/compiler": "^8.0.0",
"@angular/compiler-cli": "^8.0.0",
"@angular/core": "^8.0.0",
"@angular/forms": "^8.0.0",
"@angular/language-service": "^8.0.0",
"@angular/platform-browser": "^8.0.0",
"@angular/platform-browser-dynamic": "^8.0.0",
"@angular/router": "^8.0.0",
"@types/jasmine": "^3.3.8",
"@types/jasminewd2": "^2.0.3",
"@types/node": "^12.0.4",
"all-contributors-cli": "^5.11.0",
"angular-cli-ghpages": "^0.5.3",
"codelyzer": "^5.0.0",
"copyfiles": "^2.1.0",
"jasmine-core": "^3.4.0",
"jasmine-spec-reporter": "^4.2.1",
"karma": "^4.1.0",
"karma-chrome-launcher": "^2.2.0",
"karma-coverage-istanbul-reporter": "^2.0.1",
"karma-jasmine": "^2.0.1",
"karma-jasmine-html-reporter": "^1.4.0",
"ng-packagr": "^5.1.0",
"nouislider": "^13.1.5",
"rxjs": "^6.5.2",
"ts-node": "^8.2.0",
"tslib": "^1.9.0",
"tslint": "^5.17.0",
"typescript": "~3.4.3",
"zone.js": "^0.9.1"
},
"peerDependencies": {
"@angular/common": ">=8.0.0",
"@angular/core": ">=8.0.0",
"nouislider": ">=9.x"
},
"main": "bundles/ng2-nouislider.umd.js",
"module": "fesm5/ng2-nouislider.js",
"es2015": "fesm2015/ng2-nouislider.js",
"esm5": "esm5/ng2-nouislider.js",
"esm2015": "esm2015/ng2-nouislider.js",
"fesm5": "fesm5/ng2-nouislider.js",
"fesm2015": "fesm2015/ng2-nouislider.js",
"typings": "ng2-nouislider.d.ts",
"metadata": "ng2-nouislider.metadata.json",
"sideEffects": false,
"dependencies": {
"tslib": "^1.9.0"
}
}

@@ -1,81 +0,24 @@

# ng2-nouislider
# NgxNouislider
[![Build Status](https://travis-ci.org/tb/ng2-nouislider.svg?branch=master)](https://travis-ci.org/tb/ng2-nouislider)
[![npm version](https://badge.fury.io/js/ng2-nouislider.svg)](http://badge.fury.io/js/ng2-nouislider)
[![Downloads](http://img.shields.io/npm/dm/ng2-nouislider.svg)](https://npmjs.org/package/ng2-nouislider)
[![All Contributors](https://img.shields.io/badge/all_contributors-18-orange.svg?style=flat-square)](#contributors)
This library was generated with [Angular CLI](https://github.com/angular/angular-cli) version 8.0.0.
Angular2 nouislider component
## Code scaffolding
See [demos](http://tb.github.io/ng2-nouislider/)
Run `ng generate component component-name --project ngx-nouislider` to generate a new component. You can also use `ng generate directive|pipe|service|class|guard|interface|enum|module --project ngx-nouislider`.
> Note: Don't forget to add `--project ngx-nouislider` or else it will be added to the default project in your `angular.json` file.
## Install
## Build
npm i --save nouislider ng2-nouislider
Run `ng build ngx-nouislider` to build the project. The build artifacts will be stored in the `dist/` directory.
## Import
## Publishing
import { NouisliderModule } from 'ng2-nouislider';
After building your library with `ng build ngx-nouislider`, go to the dist folder `cd dist/ngx-nouislider` and run `npm publish`.
### Styles
## Running unit tests
@import "~nouislider/distribute/nouislider.min.css";
Run `ng test ngx-nouislider` to execute the unit tests via [Karma](https://karma-runner.github.io).
### SystemJS config
## Further help
Add to map:
'nouislider': 'node_modules/nouislider',
'ng2-nouislider': 'node_modules/ng2-nouislider',
Add to packages:
'nouislider': { main: 'distribute/nouislider.js', defaultExtension: 'js' },
'ng2-nouislider': { main: 'src/nouislider.js', defaultExtension: 'js' },
## Usage
### Using ngModel
<nouislider [connect]="true" [min]="0" [max]="15" [(ngModel)]="someRange"></nouislider>
### Within reactive forms
```js
this.form1 = this.formBuilder.group({ 'single': [ 10 ] });
```
```html
<form [formGroup]="form">
<nouislider [min]="0" [max]="20" [step]="0.5" [formControl]="form.controls.single"></nouislider>
</form>
```
## Nouislider documentation
This component is based on [nouislider](https://refreshless.com/nouislider/). Documentation about additional settings (passed in [config] @Input) can be found [here](https://refreshless.com/nouislider/slider-options/).
## Start development
npm i
npm start
open http://localhost:8080
## Contributors
Thanks goes to these wonderful people ([emoji key](https://github.com/kentcdodds/all-contributors#emoji-key)):
<!-- ALL-CONTRIBUTORS-LIST:START - Do not remove or modify this section -->
<!-- prettier-ignore -->
| [<img src="https://avatars2.githubusercontent.com/u/71683?v=4" width="100px;"/><br /><sub><b>Tomasz Bak</b></sub>](http://twitter.com/tomaszbak)<br />[πŸ’»](https://github.com/tb/ng2-nouislider/commits?author=tb "Code") [πŸ‘€](#review-tb "Reviewed Pull Requests") | [<img src="https://avatars2.githubusercontent.com/u/18688794?v=4" width="100px;"/><br /><sub><b>Giacomo Mazzamuto</b></sub>](https://github.com/gmazzamuto)<br />[πŸ’»](https://github.com/tb/ng2-nouislider/commits?author=gmazzamuto "Code") [πŸ‘€](#review-gmazzamuto "Reviewed Pull Requests") | [<img src="https://avatars3.githubusercontent.com/u/7102450?v=4" width="100px;"/><br /><sub><b>Ryan Morris</b></sub>](https://github.com/ryan-morris)<br />[πŸ’»](https://github.com/tb/ng2-nouislider/commits?author=ryan-morris "Code") | [<img src="https://avatars2.githubusercontent.com/u/2569015?v=4" width="100px;"/><br /><sub><b>Sven Flickinger</b></sub>](https://github.com/naeramarth7)<br />[πŸ’»](https://github.com/tb/ng2-nouislider/commits?author=naeramarth7 "Code") | [<img src="https://avatars0.githubusercontent.com/u/8615481?v=4" width="100px;"/><br /><sub><b>Riku Kallio</b></sub>](https://github.com/RichieRock)<br />[πŸ’»](https://github.com/tb/ng2-nouislider/commits?author=RichieRock "Code") | [<img src="https://avatars3.githubusercontent.com/u/5350861?v=4" width="100px;"/><br /><sub><b>John Pinkster</b></sub>](https://github.com/jpinkster)<br />[πŸ’»](https://github.com/tb/ng2-nouislider/commits?author=jpinkster "Code") | [<img src="https://avatars1.githubusercontent.com/u/477298?v=4" width="100px;"/><br /><sub><b>Oleg Romanovskyi</b></sub>](https://olg.io/)<br />[πŸ’»](https://github.com/tb/ng2-nouislider/commits?author=shedar "Code") |
| :---: | :---: | :---: | :---: | :---: | :---: | :---: |
| [<img src="https://avatars1.githubusercontent.com/u/5629145?v=4" width="100px;"/><br /><sub><b>ATeal</b></sub>](http://www.alexrteal.com)<br />[πŸ’»](https://github.com/tb/ng2-nouislider/commits?author=ATeal "Code") | [<img src="https://avatars1.githubusercontent.com/u/2158235?v=4" width="100px;"/><br /><sub><b>JΓ©rΓ©my Leherpeur</b></sub>](https://github.com/amenophis)<br />[πŸ’»](https://github.com/tb/ng2-nouislider/commits?author=amenophis "Code") | [<img src="https://avatars1.githubusercontent.com/u/6425649?v=4" width="100px;"/><br /><sub><b>Matt Lewis</b></sub>](https://mattlewis.me/)<br />[πŸ’»](https://github.com/tb/ng2-nouislider/commits?author=mattlewis92 "Code") | [<img src="https://avatars1.githubusercontent.com/u/5819263?v=4" width="100px;"/><br /><sub><b>anysite</b></sub>](https://github.com/anysite)<br />[πŸ“–](https://github.com/tb/ng2-nouislider/commits?author=anysite "Documentation") | [<img src="https://avatars1.githubusercontent.com/u/3389712?v=4" width="100px;"/><br /><sub><b>flmg</b></sub>](https://github.com/flmg)<br />[πŸ’»](https://github.com/tb/ng2-nouislider/commits?author=flmg "Code") | [<img src="https://avatars2.githubusercontent.com/u/8425921?v=4" width="100px;"/><br /><sub><b>SirWojtek</b></sub>](https://github.com/SirWojtek)<br />[πŸ“–](https://github.com/tb/ng2-nouislider/commits?author=SirWojtek "Documentation") | [<img src="https://avatars1.githubusercontent.com/u/596580?v=4" width="100px;"/><br /><sub><b>RubΓ©n Trujillo</b></sub>](http://bi4group.com)<br />[πŸ’»](https://github.com/tb/ng2-nouislider/commits?author=rubentrf "Code") |
| [<img src="https://avatars1.githubusercontent.com/u/12625792?v=4" width="100px;"/><br /><sub><b>Olena Horal</b></sub>](https://github.com/sharlatta)<br />[πŸ’»](https://github.com/tb/ng2-nouislider/commits?author=sharlatta "Code") [πŸ’‘](#example-sharlatta "Examples") | [<img src="https://avatars1.githubusercontent.com/u/316541?v=4" width="100px;"/><br /><sub><b>Jeremy Fry</b></sub>](http://www.jeremyfry.com)<br />[πŸ’»](https://github.com/tb/ng2-nouislider/commits?author=jeremyfry "Code") | [<img src="https://avatars0.githubusercontent.com/u/9978922?v=4" width="100px;"/><br /><sub><b>Tadeusz</b></sub>](https://github.com/mkp05)<br />[πŸ’»](https://github.com/tb/ng2-nouislider/commits?author=mkp05 "Code") | [<img src="https://avatars0.githubusercontent.com/u/2358714?v=4" width="100px;"/><br /><sub><b>Philippe Roy</b></sub>](http://philipperoy.github.io)<br />[πŸ’»](https://github.com/tb/ng2-nouislider/commits?author=PhilippeRoy "Code") |
<!-- ALL-CONTRIBUTORS-LIST:END -->
This project follows the [all-contributors](https://github.com/kentcdodds/all-contributors) specification.
Contributions of any kind are welcome!
## License
MIT
To get more help on the Angular CLI use `ng help` or go check out the [Angular CLI README](https://github.com/angular/angular-cli/blob/master/README.md).

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚑️ by Socket Inc