GULP DIST
This commit is contained in:
222
dist/assets/vendor/nouislider/CHANGELOG.MD
vendored
222
dist/assets/vendor/nouislider/CHANGELOG.MD
vendored
@@ -1,222 +0,0 @@
|
||||
# Changelog
|
||||
|
||||
### 15.5.0 (*2021-01-09*)
|
||||
- Fixed: Compositing issues in Safari (note that this updates the stylesheet!) (#987, #998, #1029, #1154);
|
||||
- Changed: divisibility of `margin`, `padding` and `limit` by `step` is no longer enforced (#1163);
|
||||
|
||||
### 15.4.0 (*2021-08-14*)
|
||||
- Added: `handleAttributes` option (#1019);
|
||||
- Added: `drag-all` behaviour (#756, #841, #1116);
|
||||
- Added: ESM/ES6 module distribution `dist/nouislider.mjs` (#1149);
|
||||
- Added: support for ranges where `min` = `max` (#236, #359, #578, #633, #676, #790);
|
||||
- Added: `getPositions` method;
|
||||
- Fixed: Duplicate change/set events when using `snap` behaviour (#1106);
|
||||
|
||||
### 15.3.0 (*2021-08-10*)
|
||||
- Added: `keyboardMultiplier` option (#1151);
|
||||
|
||||
### 15.2.0 (*2021-06-15*)
|
||||
- Added: `unencoded` boolean argument to `get` method to return raw slider values (#1145);
|
||||
- Added: support for "partial" formatters in `pips.format`, `ariaFormat` and `tooltips` options (#1140);
|
||||
|
||||
### 15.1.1 (*2021-05-09*)
|
||||
- Fixed: `tooltips` option accepts one `Formatter` for all tooltips (#1101);
|
||||
|
||||
### 15.1.0 (*2021-05-09*)
|
||||
- Added: `drag` event when dragging connecting elements (#887, #1135);
|
||||
|
||||
### 15.0.0 (*2021-05-02*)
|
||||
- noUiSlider is now written and distributed as TypeScript;
|
||||
- Types are now provided. If you are currently using [@types/nouislider](https://www.npmjs.com/package/@types/nouislider), this should be replaced;
|
||||
- The distributed files have moved from `distribute` to `dist` in the NPM package, and are no longer in the repository; You may need to change the path to the noUiSlider CSS file if you are importing it using a package manager;
|
||||
- Fixed: Slider now properly works in multiple layers of Shadow DOM (#1121);
|
||||
- Removed: `version` from exceptions and export;
|
||||
- Removed: Bower support;
|
||||
|
||||
### 14.7.0 (*2021-04-06*)
|
||||
- noUiSlider is now build with TypeScript. This release contains no further changes.
|
||||
|
||||
### 14.6.4 (*2021-03-18*)
|
||||
- Fixed: Fixed `updateOptions` with falsy value for `start` (#1127);
|
||||
|
||||
### 14.6.3 (*2020-11-19*)
|
||||
- Fixed: Fixed removing namespaced event listeners, internal listeners getting removed (#1109);
|
||||
|
||||
### 14.6.2 (*2020-09-16*)
|
||||
- Fixed: Ignore erroneous mouse events on taps for iOS 13.4 (#1095);
|
||||
- Added: `exactInput` argument to `set` and `setHandle` methods (#436, #1094);
|
||||
|
||||
### 14.6.1 (*2020-08-17*)
|
||||
- Fixed: Pips in count mode ignores pip at end of range (#1088);
|
||||
|
||||
### 14.6.0 (*2020-06-27*)
|
||||
- Added: `keyboardPageMultiplier` and `keyboardDefaultStep` options (#1083);
|
||||
- Fixed: Ignore erroneous tap events for iOS (#1057, #1079);
|
||||
|
||||
### 14.5.0 (*2020-05-20*)
|
||||
- Added: Support for `margin`, `padding` and `limit` on non-linear sliders (#911, #1030, #1031, #1071);
|
||||
|
||||
### 14.4.0 (*2020-05-06*)
|
||||
- Added: `getOrigins` and `getTooltips` methods;
|
||||
- Added: Default styling to support merging overlapping tooltips (#1032);
|
||||
|
||||
### 14.3.0 (*2020-05-05*)
|
||||
- Added: Default `cssClasses` are now exposed and can be modified;
|
||||
- Fixed: Destroying sliders with multiple classes in `cssClasses` fails (#1069);
|
||||
|
||||
### 14.2.0 (*2020-03-27*)
|
||||
- Added: Slider api as event parameter (#1058);
|
||||
- Added: Allow multiple classes in `cssClasses` option (#1054);
|
||||
- Fixed: Slider not working within shadow DOM (#1060);
|
||||
- Fixed: Last pip not rendered if it is also the first and at the slider edge (#1063);
|
||||
|
||||
### 14.1.1 (*2019-12-15*)
|
||||
- Fixed: Text direction is not correctly determined when the slider is not in the DOM (#1038);
|
||||
|
||||
### 14.1.0 (*2019-12-04*)
|
||||
- Fixed: Styling requires a root `html` node, so noUiSlider can't be used in shadow dom (#1035);
|
||||
- Added: Support for PageUp/PageDown and Home/End keys in keyboard support (#1036);
|
||||
|
||||
### 14.0.3 (*2019-10-10*)
|
||||
- Fixed: Initialising handle values near the slider edge does not always respect `margin` (#1009);
|
||||
|
||||
### 14.0.2 (*2019-06-28*)
|
||||
- Fixed: Keyboard interaction uses formatter when it does not need to (#1000);
|
||||
|
||||
### 14.0.1 (*2019-06-21*)
|
||||
- Fixed: Visual regression in Safari caused by fixing #987 (#998);
|
||||
|
||||
### 14.0.0 (*2019-06-20*)
|
||||
- Fixed: `change` & `slide` events should fire on keyboard control (#994);
|
||||
- Fixed: `.noUi-origin` overflows document on vertical sliders (#987);
|
||||
- Fixed: Clicking to right of handle doesn't move it when it's at the same point as another (#965);
|
||||
- Added: Additional documentation on number formatting (#978, #985);
|
||||
|
||||
### 13.1.5 (*2019-04-24*)
|
||||
- Fixed: Full-range padding (#880);
|
||||
|
||||
### 13.1.4 (*2019-03-20*)
|
||||
- Fixed: Keyboard interaction does not work with `snap` option (#961);
|
||||
|
||||
### 13.1.3 (*2019-03-15*)
|
||||
- Fixed: Keyboard interaction allows handles to "push" other handles (#960);
|
||||
- Fixed: Update event fires for all handles during keyboard interaction (#960);
|
||||
|
||||
### 13.1.2 (*2019-03-13*)
|
||||
- Fixed: Handle disappears in Safari on tap (#927);
|
||||
- Fixed: Disabled slider still accepts keyboard interaction (#953);
|
||||
|
||||
### 13.1.1 (*2019-02-14*)
|
||||
- Fixed: Slider hang when using a zero-length range (#948);
|
||||
|
||||
### 13.1.0 (*2019-02-08*)
|
||||
- Fixed: Updating `pips` using `updateOptions` (#933);
|
||||
- Added: Updating `tooltips` using `updateOptions` (#946);
|
||||
|
||||
### 13.0.0 (*2019-02-06*)
|
||||
noUiSlider 13 does not include any breaking API changes.
|
||||
Keyboard support is now built-in, so any custom implementations should be removed when upgrading.
|
||||
Alternatively, built-in keyboard support can be disabled using `keyboardSupport: false`.
|
||||
- Added: Built-in keyboard support (#724);
|
||||
- Added: `.noUi-touch-area` element (#924);
|
||||
- Fixed: Dragging a range does not check for handle disabled state (#938);
|
||||
- Fixed: Incorrect CSS transform in pips (#931);
|
||||
|
||||
### 12.1.0 (*2018-10-25*)
|
||||
- Added: `unconstrained` behaviour (#747, #815, #913);
|
||||
- Added: `setHandle` API (#917);
|
||||
- Changed: point to `nouislider.js` in `package.json`.`main` (#921);
|
||||
|
||||
### 12.0.0 (*2018-09-14*)
|
||||
- Change: License changed to MIT;
|
||||
- Change: Build process is now based on NPM scripts, phasing out the Grunt task runner.
|
||||
- Fixed: Aria values are now as per spec (#889);
|
||||
- Change: Pips formatting are now written as HTML (#875);
|
||||
- Change: The `filter` option is now called for all pips (#754);
|
||||
- Added: The `filter` option can now return `-1` to hide a pip (#754);
|
||||
- Added: `keyboardSupport` option (#867, #895);
|
||||
- Added: `documentElement` option (#821);
|
||||
|
||||
### 11.1.0 (*2018-04-02*)
|
||||
- Change: `null` options are now handled consistently (#856);
|
||||
- Fixed: Missing transform origin in IE9 (#870);
|
||||
- Fixed: `padding` on one side of the slider could not exceed `50%` (#865);
|
||||
|
||||
### 11.0.3 (*2018-01-21*)
|
||||
Refactor of source code. There are no meaningful changes in the distributed files;
|
||||
|
||||
### 11.0.2 (*2018-01-20*)
|
||||
- Fixed: Slider ignores clicks on `.noUi-target` outside of `.noUi-base` (#842);
|
||||
- Fixed: `.noUi-origin` moving out of the page causes horizontal scrolling (#852);
|
||||
- Fixed: Relative `.noUi-handle` has unintended margin (#854);
|
||||
|
||||
### 11.0.0 (*2018-01-12*)
|
||||
noUiSlider 11 does not include any breaking API changes.
|
||||
Unless major changes were made to the stylesheet or you specifically depend
|
||||
on the handle/connect order in the DOM, there should be no issues upgrading.
|
||||
- Change: Use CSS transforms for handle movement, resulting in a massive performance improvement (#718);
|
||||
- Change: Support multitouch by default;
|
||||
- Change: Handle stacking is now on `.noUi-origin` instead of `.noUi-handle`;
|
||||
- Added: A `.noUi-connects` element holding all `.noUi-connect` elements;
|
||||
- Added: `[data-value]` property for `.noUi-value` in pips (#733);
|
||||
- Added: `padding` option can now take an array for different padding values at both sides of a slider (#822);
|
||||
- Removed: `useRequestAnimationFrame` option. No longer needed with CSS transforms;
|
||||
- Removed: `multitouch` option. Now enabled by default;
|
||||
- Fixed: Slider could ignore end events it should handle (#704, #805, #834);
|
||||
- Fixed: Stop depending on array type (#801);
|
||||
- Fixed: `set` method might bypass margin option (#823);
|
||||
- Fixed: Alignment of pips for RTL sliders (#795);
|
||||
- Fixed: Several issues regarding pips (#812, #826, #832);
|
||||
|
||||
### 10.1.0 (*2017-07-26*)
|
||||
- Added: `multitouch` option (#793);
|
||||
|
||||
### 10.0.0 (*2017-05-28*)
|
||||
- Change: Change event listeners to be passive (#785);
|
||||
- Fixed: Pips are now updated when calling `updateOptions` (#669);
|
||||
- Fixed: Content Security Policy issue with pips;
|
||||
- Added: `removePips` method;
|
||||
- Added: aria support (#685);
|
||||
- Added: `ariaFormat` option (controls `aria-valuetext`);
|
||||
- Fixed: throw a better error when mistakenly trying to initialize noUiSlider with `null` (#658);
|
||||
- Fixed: Made order of events consistent and documented it (#775);
|
||||
- Fixed: Border radius of connect bar, white space wrapping of tooltips (#773, #774);
|
||||
- Fixed: Slider now uses `ownerDocument` instead of `document` (#767);
|
||||
|
||||
### 9.2.0 (*2017-01-17*)
|
||||
- Added: Version number to exceptions;
|
||||
- Added: `noUiSlider.version` holds current version number;
|
||||
- Added: Throw exception on invalid `pips` configuration (#721);
|
||||
- Added: Merged pull request that uses less preprocessor to generate CSS (#735);
|
||||
|
||||
### 9.1.0 (*2016-12-10*)
|
||||
- Fixed: Slider not properly handling multitouch (#700, #704);
|
||||
- Fixed: Removed a querySelector for the currently active handle (#720);
|
||||
- Fixed: Removed iOS/webkit flashes on tap;
|
||||
- Fixed: Incorrect error when using margin/limit with a step smaller than 0 (#736);
|
||||
- Fixed: Drag option using incorrect cursor arrows (#681);
|
||||
- Added: New `padding` option (#711);
|
||||
- Added: Re-introduced `.noUi-handle-lower` and `.noUi-handle-upper` classes removed in 9.0.0;
|
||||
- Added: Compatibility for legacy `connect` options removed in 9.0.0;
|
||||
|
||||
### 9.0.0 (*2016-09-26*)
|
||||
- Added: Support for **more than 2 handles**;
|
||||
- Added: `format` option can be updated (#641);
|
||||
- Added: `reset` method the return slider to start values (#673);
|
||||
- Change: `connect` option is now implemented as a separate node;
|
||||
- Change: all event arguments, including the handle number, are now in slider order;
|
||||
- Change: `updateOptions` now **modifies the original options** object. The reference in `slider.noUiSlider.options` remains up to date (#678);
|
||||
- Change: more events fire when using various `behaviour` options (#664);
|
||||
- Change: on `rtl` sliders, handles are now visually positioned from the sliders `right`/`bottom` edge;
|
||||
- Change: events for `rtl` sliders now fire in the same order as for `ltr` sliders (with incremental handleNumbers);
|
||||
- Change: internal `Spectrum` component is no longer `direction` aware;
|
||||
- Change: `limit` and `margin` must be divisible by `step` (if set);
|
||||
- Removed: `.noUi-stacking` class. Handles now stack themselves;
|
||||
- ~~Removed~~ (returned in 9.1.0): `.noUi-handle-lower` and `.noUi-handle-upper` classes;
|
||||
- Removed: `.noUi-background`. Use `.noUi-target` instead;
|
||||
- ~~Removed~~ (backward compatibility in 9.1.0): `connect: 'lower'` and `connect: 'upper'`. These settings are replaced by `connect: [true, false]`;
|
||||
- Fixed: default tooltip color (#687);
|
||||
- Fixed: `margin` and `limit` calculated improperly after calling `updateOptions` with a new `range` option;
|
||||
- Fixed: `range` option was required in update, even when not updating it (#682);
|
||||
- Fixed: Cursor styling is now consistent for disabled handles and sliders (#644);
|
||||
- Fixed: Sliders now ignore touches when the screen is touched multiple times (#649, #663, #668);
|
||||
62
dist/assets/vendor/nouislider/dist/nouislider.js
vendored
62
dist/assets/vendor/nouislider/dist/nouislider.js
vendored
@@ -2,7 +2,7 @@
|
||||
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) :
|
||||
typeof define === 'function' && define.amd ? define(['exports'], factory) :
|
||||
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global.noUiSlider = {}));
|
||||
}(this, (function (exports) { 'use strict';
|
||||
})(this, (function (exports) { 'use strict';
|
||||
|
||||
exports.PipsMode = void 0;
|
||||
(function (PipsMode) {
|
||||
@@ -127,7 +127,7 @@
|
||||
: doc.body.scrollTop;
|
||||
return {
|
||||
x: x,
|
||||
y: y
|
||||
y: y,
|
||||
};
|
||||
}
|
||||
// we provide a function to compute constants instead
|
||||
@@ -140,18 +140,18 @@
|
||||
? {
|
||||
start: "pointerdown",
|
||||
move: "pointermove",
|
||||
end: "pointerup"
|
||||
end: "pointerup",
|
||||
}
|
||||
: window.navigator.msPointerEnabled
|
||||
? {
|
||||
start: "MSPointerDown",
|
||||
move: "MSPointerMove",
|
||||
end: "MSPointerUp"
|
||||
end: "MSPointerUp",
|
||||
}
|
||||
: {
|
||||
start: "mousedown touchstart",
|
||||
move: "mousemove touchmove",
|
||||
end: "mouseup touchend"
|
||||
end: "mouseup touchend",
|
||||
};
|
||||
}
|
||||
// https://github.com/WICG/EventListenerOptions/blob/gh-pages/explainer.md
|
||||
@@ -163,7 +163,7 @@
|
||||
var opts = Object.defineProperty({}, "passive", {
|
||||
get: function () {
|
||||
supportsPassive = true;
|
||||
}
|
||||
},
|
||||
});
|
||||
// @ts-ignore
|
||||
window.addEventListener("test", null, opts);
|
||||
@@ -384,18 +384,18 @@
|
||||
stepBefore: {
|
||||
startValue: this.xVal[j - 2],
|
||||
step: this.xNumSteps[j - 2],
|
||||
highestStep: this.xHighestCompleteStep[j - 2]
|
||||
highestStep: this.xHighestCompleteStep[j - 2],
|
||||
},
|
||||
thisStep: {
|
||||
startValue: this.xVal[j - 1],
|
||||
step: this.xNumSteps[j - 1],
|
||||
highestStep: this.xHighestCompleteStep[j - 1]
|
||||
highestStep: this.xHighestCompleteStep[j - 1],
|
||||
},
|
||||
stepAfter: {
|
||||
startValue: this.xVal[j],
|
||||
step: this.xNumSteps[j],
|
||||
highestStep: this.xHighestCompleteStep[j]
|
||||
}
|
||||
highestStep: this.xHighestCompleteStep[j],
|
||||
},
|
||||
};
|
||||
};
|
||||
Spectrum.prototype.countStepDecimals = function () {
|
||||
@@ -481,7 +481,7 @@
|
||||
to: function (value) {
|
||||
return value === undefined ? "" : value.toFixed(2);
|
||||
},
|
||||
from: Number
|
||||
from: Number,
|
||||
};
|
||||
var cssClasses = {
|
||||
target: "target",
|
||||
@@ -519,12 +519,12 @@
|
||||
valueVertical: "value-vertical",
|
||||
valueNormal: "value-normal",
|
||||
valueLarge: "value-large",
|
||||
valueSub: "value-sub"
|
||||
valueSub: "value-sub",
|
||||
};
|
||||
// Namespaces of internal event listeners
|
||||
var INTERNAL_EVENT_NS = {
|
||||
tooltips: ".__tooltips",
|
||||
aria: ".__aria"
|
||||
aria: ".__aria",
|
||||
};
|
||||
//endregion
|
||||
function testStep(parsed, entry) {
|
||||
@@ -731,7 +731,7 @@
|
||||
fixed: fixed,
|
||||
snap: snap,
|
||||
hover: hover,
|
||||
unconstrained: unconstrained
|
||||
unconstrained: unconstrained,
|
||||
};
|
||||
}
|
||||
function testTooltips(parsed, entry) {
|
||||
@@ -817,7 +817,7 @@
|
||||
animate: true,
|
||||
animationDuration: 300,
|
||||
ariaFormat: defaultFormatter,
|
||||
format: defaultFormatter
|
||||
format: defaultFormatter,
|
||||
};
|
||||
// Tests are executed in the order they are presented here.
|
||||
var tests = {
|
||||
@@ -844,7 +844,7 @@
|
||||
documentElement: { r: false, t: testDocumentElement },
|
||||
cssPrefix: { r: true, t: testCssPrefix },
|
||||
cssClasses: { r: true, t: testCssClasses },
|
||||
handleAttributes: { r: false, t: testHandleAttributes }
|
||||
handleAttributes: { r: false, t: testHandleAttributes },
|
||||
};
|
||||
var defaults = {
|
||||
connect: false,
|
||||
@@ -856,7 +856,7 @@
|
||||
cssClasses: cssClasses,
|
||||
keyboardPageMultiplier: 5,
|
||||
keyboardMultiplier: 1,
|
||||
keyboardDefaultStep: 10
|
||||
keyboardDefaultStep: 10,
|
||||
};
|
||||
// AriaFormat defaults to regular format, if any.
|
||||
if (options.format && !options.ariaFormat) {
|
||||
@@ -888,7 +888,7 @@
|
||||
// Pips don't move, so we can place them using left/top.
|
||||
var styles = [
|
||||
["left", "top"],
|
||||
["right", "bottom"]
|
||||
["right", "bottom"],
|
||||
];
|
||||
parsed.style = styles[parsed.dir][parsed.ort];
|
||||
return parsed;
|
||||
@@ -1273,7 +1273,7 @@
|
||||
var format = pips.format || {
|
||||
to: function (value) {
|
||||
return String(Math.round(value));
|
||||
}
|
||||
},
|
||||
};
|
||||
scope_Pips = scope_Target.appendChild(addMarking(spread, filter, format));
|
||||
return scope_Pips;
|
||||
@@ -1509,21 +1509,21 @@
|
||||
pageOffset: event.pageOffset,
|
||||
handleNumbers: data.handleNumbers,
|
||||
buttonsProperty: event.buttons,
|
||||
locations: scope_Locations.slice()
|
||||
locations: scope_Locations.slice(),
|
||||
});
|
||||
var endEvent = attachEvent(actions.end, scope_DocumentElement, eventEnd, {
|
||||
target: event.target,
|
||||
handle: handle,
|
||||
listeners: listeners,
|
||||
doNotReject: true,
|
||||
handleNumbers: data.handleNumbers
|
||||
handleNumbers: data.handleNumbers,
|
||||
});
|
||||
var outEvent = attachEvent("mouseout", scope_DocumentElement, documentLeave, {
|
||||
target: event.target,
|
||||
handle: handle,
|
||||
listeners: listeners,
|
||||
doNotReject: true,
|
||||
handleNumbers: data.handleNumbers
|
||||
handleNumbers: data.handleNumbers,
|
||||
});
|
||||
// We want to make sure we pushed the listeners in the listener list rather than creating
|
||||
// a new one as it has already been passed to the event handlers.
|
||||
@@ -1668,7 +1668,7 @@
|
||||
// These events are only bound to the visual handle
|
||||
// element, not the 'real' origin element.
|
||||
attachEvent(actions.start, handle.children[0], eventStart, {
|
||||
handleNumbers: [index]
|
||||
handleNumbers: [index],
|
||||
});
|
||||
});
|
||||
}
|
||||
@@ -1679,7 +1679,7 @@
|
||||
// Fire hover events
|
||||
if (behaviour.hover) {
|
||||
attachEvent(actions.move, scope_Base, eventHover, {
|
||||
hover: true
|
||||
hover: true,
|
||||
});
|
||||
}
|
||||
// Make the range draggable.
|
||||
@@ -1710,7 +1710,7 @@
|
||||
attachEvent(actions.start, eventHolder, eventStart, {
|
||||
handles: handlesToDrag,
|
||||
handleNumbers: handleNumbersToDrag,
|
||||
connect: connect
|
||||
connect: connect,
|
||||
});
|
||||
});
|
||||
});
|
||||
@@ -2059,7 +2059,7 @@
|
||||
if (options.snap) {
|
||||
return [
|
||||
value - nearbySteps.stepBefore.startValue || null,
|
||||
nearbySteps.stepAfter.startValue - value || null
|
||||
nearbySteps.stepAfter.startValue - value || null,
|
||||
];
|
||||
}
|
||||
// If the next value in this step moves into the next step,
|
||||
@@ -2118,7 +2118,7 @@
|
||||
"step",
|
||||
"format",
|
||||
"pips",
|
||||
"tooltips"
|
||||
"tooltips",
|
||||
];
|
||||
// Only change options that we're actually passed to update.
|
||||
updateAble.forEach(function (name) {
|
||||
@@ -2203,7 +2203,7 @@
|
||||
getOrigins: function () {
|
||||
return scope_Handles;
|
||||
},
|
||||
pips: pips // Issue #594
|
||||
pips: pips, // Issue #594
|
||||
};
|
||||
return scope_Self;
|
||||
}
|
||||
@@ -2228,13 +2228,13 @@
|
||||
// A reference to the default classes, allows global changes.
|
||||
// Use the cssClasses option for changes to one slider.
|
||||
cssClasses: cssClasses,
|
||||
create: initialize
|
||||
create: initialize,
|
||||
};
|
||||
|
||||
exports.create = initialize;
|
||||
exports.cssClasses = cssClasses;
|
||||
exports['default'] = nouislider;
|
||||
exports["default"] = nouislider;
|
||||
|
||||
Object.defineProperty(exports, '__esModule', { value: true });
|
||||
|
||||
})));
|
||||
}));
|
||||
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -122,7 +122,7 @@ function getPageOffset(doc) {
|
||||
: doc.body.scrollTop;
|
||||
return {
|
||||
x: x,
|
||||
y: y
|
||||
y: y,
|
||||
};
|
||||
}
|
||||
// we provide a function to compute constants instead
|
||||
@@ -135,18 +135,18 @@ function getActions() {
|
||||
? {
|
||||
start: "pointerdown",
|
||||
move: "pointermove",
|
||||
end: "pointerup"
|
||||
end: "pointerup",
|
||||
}
|
||||
: window.navigator.msPointerEnabled
|
||||
? {
|
||||
start: "MSPointerDown",
|
||||
move: "MSPointerMove",
|
||||
end: "MSPointerUp"
|
||||
end: "MSPointerUp",
|
||||
}
|
||||
: {
|
||||
start: "mousedown touchstart",
|
||||
move: "mousemove touchmove",
|
||||
end: "mouseup touchend"
|
||||
end: "mouseup touchend",
|
||||
};
|
||||
}
|
||||
// https://github.com/WICG/EventListenerOptions/blob/gh-pages/explainer.md
|
||||
@@ -158,7 +158,7 @@ function getSupportsPassive() {
|
||||
var opts = Object.defineProperty({}, "passive", {
|
||||
get: function () {
|
||||
supportsPassive = true;
|
||||
}
|
||||
},
|
||||
});
|
||||
// @ts-ignore
|
||||
window.addEventListener("test", null, opts);
|
||||
@@ -379,18 +379,18 @@ var Spectrum = /** @class */ (function () {
|
||||
stepBefore: {
|
||||
startValue: this.xVal[j - 2],
|
||||
step: this.xNumSteps[j - 2],
|
||||
highestStep: this.xHighestCompleteStep[j - 2]
|
||||
highestStep: this.xHighestCompleteStep[j - 2],
|
||||
},
|
||||
thisStep: {
|
||||
startValue: this.xVal[j - 1],
|
||||
step: this.xNumSteps[j - 1],
|
||||
highestStep: this.xHighestCompleteStep[j - 1]
|
||||
highestStep: this.xHighestCompleteStep[j - 1],
|
||||
},
|
||||
stepAfter: {
|
||||
startValue: this.xVal[j],
|
||||
step: this.xNumSteps[j],
|
||||
highestStep: this.xHighestCompleteStep[j]
|
||||
}
|
||||
highestStep: this.xHighestCompleteStep[j],
|
||||
},
|
||||
};
|
||||
};
|
||||
Spectrum.prototype.countStepDecimals = function () {
|
||||
@@ -476,7 +476,7 @@ var defaultFormatter = {
|
||||
to: function (value) {
|
||||
return value === undefined ? "" : value.toFixed(2);
|
||||
},
|
||||
from: Number
|
||||
from: Number,
|
||||
};
|
||||
var cssClasses = {
|
||||
target: "target",
|
||||
@@ -514,12 +514,12 @@ var cssClasses = {
|
||||
valueVertical: "value-vertical",
|
||||
valueNormal: "value-normal",
|
||||
valueLarge: "value-large",
|
||||
valueSub: "value-sub"
|
||||
valueSub: "value-sub",
|
||||
};
|
||||
// Namespaces of internal event listeners
|
||||
var INTERNAL_EVENT_NS = {
|
||||
tooltips: ".__tooltips",
|
||||
aria: ".__aria"
|
||||
aria: ".__aria",
|
||||
};
|
||||
//endregion
|
||||
function testStep(parsed, entry) {
|
||||
@@ -726,7 +726,7 @@ function testBehaviour(parsed, entry) {
|
||||
fixed: fixed,
|
||||
snap: snap,
|
||||
hover: hover,
|
||||
unconstrained: unconstrained
|
||||
unconstrained: unconstrained,
|
||||
};
|
||||
}
|
||||
function testTooltips(parsed, entry) {
|
||||
@@ -812,7 +812,7 @@ function testOptions(options) {
|
||||
animate: true,
|
||||
animationDuration: 300,
|
||||
ariaFormat: defaultFormatter,
|
||||
format: defaultFormatter
|
||||
format: defaultFormatter,
|
||||
};
|
||||
// Tests are executed in the order they are presented here.
|
||||
var tests = {
|
||||
@@ -839,7 +839,7 @@ function testOptions(options) {
|
||||
documentElement: { r: false, t: testDocumentElement },
|
||||
cssPrefix: { r: true, t: testCssPrefix },
|
||||
cssClasses: { r: true, t: testCssClasses },
|
||||
handleAttributes: { r: false, t: testHandleAttributes }
|
||||
handleAttributes: { r: false, t: testHandleAttributes },
|
||||
};
|
||||
var defaults = {
|
||||
connect: false,
|
||||
@@ -851,7 +851,7 @@ function testOptions(options) {
|
||||
cssClasses: cssClasses,
|
||||
keyboardPageMultiplier: 5,
|
||||
keyboardMultiplier: 1,
|
||||
keyboardDefaultStep: 10
|
||||
keyboardDefaultStep: 10,
|
||||
};
|
||||
// AriaFormat defaults to regular format, if any.
|
||||
if (options.format && !options.ariaFormat) {
|
||||
@@ -883,7 +883,7 @@ function testOptions(options) {
|
||||
// Pips don't move, so we can place them using left/top.
|
||||
var styles = [
|
||||
["left", "top"],
|
||||
["right", "bottom"]
|
||||
["right", "bottom"],
|
||||
];
|
||||
parsed.style = styles[parsed.dir][parsed.ort];
|
||||
return parsed;
|
||||
@@ -1268,7 +1268,7 @@ function scope(target, options, originalOptions) {
|
||||
var format = pips.format || {
|
||||
to: function (value) {
|
||||
return String(Math.round(value));
|
||||
}
|
||||
},
|
||||
};
|
||||
scope_Pips = scope_Target.appendChild(addMarking(spread, filter, format));
|
||||
return scope_Pips;
|
||||
@@ -1504,21 +1504,21 @@ function scope(target, options, originalOptions) {
|
||||
pageOffset: event.pageOffset,
|
||||
handleNumbers: data.handleNumbers,
|
||||
buttonsProperty: event.buttons,
|
||||
locations: scope_Locations.slice()
|
||||
locations: scope_Locations.slice(),
|
||||
});
|
||||
var endEvent = attachEvent(actions.end, scope_DocumentElement, eventEnd, {
|
||||
target: event.target,
|
||||
handle: handle,
|
||||
listeners: listeners,
|
||||
doNotReject: true,
|
||||
handleNumbers: data.handleNumbers
|
||||
handleNumbers: data.handleNumbers,
|
||||
});
|
||||
var outEvent = attachEvent("mouseout", scope_DocumentElement, documentLeave, {
|
||||
target: event.target,
|
||||
handle: handle,
|
||||
listeners: listeners,
|
||||
doNotReject: true,
|
||||
handleNumbers: data.handleNumbers
|
||||
handleNumbers: data.handleNumbers,
|
||||
});
|
||||
// We want to make sure we pushed the listeners in the listener list rather than creating
|
||||
// a new one as it has already been passed to the event handlers.
|
||||
@@ -1663,7 +1663,7 @@ function scope(target, options, originalOptions) {
|
||||
// These events are only bound to the visual handle
|
||||
// element, not the 'real' origin element.
|
||||
attachEvent(actions.start, handle.children[0], eventStart, {
|
||||
handleNumbers: [index]
|
||||
handleNumbers: [index],
|
||||
});
|
||||
});
|
||||
}
|
||||
@@ -1674,7 +1674,7 @@ function scope(target, options, originalOptions) {
|
||||
// Fire hover events
|
||||
if (behaviour.hover) {
|
||||
attachEvent(actions.move, scope_Base, eventHover, {
|
||||
hover: true
|
||||
hover: true,
|
||||
});
|
||||
}
|
||||
// Make the range draggable.
|
||||
@@ -1705,7 +1705,7 @@ function scope(target, options, originalOptions) {
|
||||
attachEvent(actions.start, eventHolder, eventStart, {
|
||||
handles: handlesToDrag,
|
||||
handleNumbers: handleNumbersToDrag,
|
||||
connect: connect
|
||||
connect: connect,
|
||||
});
|
||||
});
|
||||
});
|
||||
@@ -2054,7 +2054,7 @@ function scope(target, options, originalOptions) {
|
||||
if (options.snap) {
|
||||
return [
|
||||
value - nearbySteps.stepBefore.startValue || null,
|
||||
nearbySteps.stepAfter.startValue - value || null
|
||||
nearbySteps.stepAfter.startValue - value || null,
|
||||
];
|
||||
}
|
||||
// If the next value in this step moves into the next step,
|
||||
@@ -2113,7 +2113,7 @@ function scope(target, options, originalOptions) {
|
||||
"step",
|
||||
"format",
|
||||
"pips",
|
||||
"tooltips"
|
||||
"tooltips",
|
||||
];
|
||||
// Only change options that we're actually passed to update.
|
||||
updateAble.forEach(function (name) {
|
||||
@@ -2198,7 +2198,7 @@ function scope(target, options, originalOptions) {
|
||||
getOrigins: function () {
|
||||
return scope_Handles;
|
||||
},
|
||||
pips: pips // Issue #594
|
||||
pips: pips, // Issue #594
|
||||
};
|
||||
return scope_Self;
|
||||
}
|
||||
@@ -2225,5 +2225,5 @@ export default {
|
||||
// A reference to the default classes, allows global changes.
|
||||
// Use the cssClasses option for changes to one slider.
|
||||
cssClasses: cssClasses,
|
||||
create: initialize
|
||||
create: initialize,
|
||||
};
|
||||
|
||||
102
dist/assets/vendor/nouislider/package.json
vendored
102
dist/assets/vendor/nouislider/package.json
vendored
@@ -1,45 +1,75 @@
|
||||
{
|
||||
"name": "nouislider",
|
||||
"version": "15.5.0",
|
||||
"main": "dist/nouislider.js",
|
||||
"style": "dist/nouislider.min.css",
|
||||
"types": "dist/nouislider.d.ts",
|
||||
"license": "MIT",
|
||||
"scripts": {
|
||||
"build": "npm run build:mjs && npm run build:js && npm run build:styles",
|
||||
"build:js": "npm run build:js:write && npm run build:js:compress && npm run build:js:compress:mjs",
|
||||
"build:js:write": "rollup -c rollup.config.js",
|
||||
"build:js:compress": "uglifyjs dist/nouislider.js --compress --mangle --output dist/nouislider.min.js",
|
||||
"build:js:compress:mjs": "uglifyjs dist/nouislider.mjs --compress --mangle --output dist/nouislider.min.mjs",
|
||||
"build:types": "tsc --emitDeclarationOnly",
|
||||
"build:mjs": "tsc --module ES6 && mv dist/nouislider.js dist/nouislider.mjs",
|
||||
"build:styles": "npm run build:styles:write && npm run build:styles:compress",
|
||||
"build:styles:write": "lessc src/nouislider.less dist/nouislider.css",
|
||||
"build:styles:compress": "lessc src/nouislider.less dist/nouislider.min.css --clean-css",
|
||||
"prepublishOnly": "npm run build",
|
||||
"format": "prettier src/nouislider.ts --write --config .prettierrc",
|
||||
"lint": "eslint src/nouislider.ts",
|
||||
"docs": "cd ../ && php -S localhost:80 nouislider/documentation/_run/router.php"
|
||||
"_from": "nouislider@^15.5.0",
|
||||
"_id": "nouislider@15.5.1",
|
||||
"_inBundle": false,
|
||||
"_integrity": "sha512-V8LNPhLPXLNjkgXLfyzDRGDeKvzZeaiIx5YagMiHnOMqgcRzT75jqvEZYXbSrEffXouwcEShSd8Vllm2Nkwqew==",
|
||||
"_location": "/nouislider",
|
||||
"_phantomChildren": {},
|
||||
"_requested": {
|
||||
"type": "range",
|
||||
"registry": true,
|
||||
"raw": "nouislider@^15.5.0",
|
||||
"name": "nouislider",
|
||||
"escapedName": "nouislider",
|
||||
"rawSpec": "^15.5.0",
|
||||
"saveSpec": null,
|
||||
"fetchSpec": "^15.5.0"
|
||||
},
|
||||
"_requiredBy": [
|
||||
"/"
|
||||
],
|
||||
"_resolved": "https://registry.npmjs.org/nouislider/-/nouislider-15.5.1.tgz",
|
||||
"_shasum": "3d6c5e73f85110b91d4e029d88fd8532aca98353",
|
||||
"_spec": "nouislider@^15.5.0",
|
||||
"_where": "/mnt/d/WWW/magico.front",
|
||||
"bugs": {
|
||||
"url": "https://github.com/leongersen/noUiSlider/issues"
|
||||
},
|
||||
"bundleDependencies": false,
|
||||
"dependencies": {},
|
||||
"deprecated": false,
|
||||
"description": "noUiSlider is a lightweight JavaScript range slider.",
|
||||
"devDependencies": {
|
||||
"@typescript-eslint/eslint-plugin": "^4.20.0",
|
||||
"@typescript-eslint/parser": "^4.20.0",
|
||||
"eslint": "^7.23.0",
|
||||
"less": "^3.9.0",
|
||||
"less-plugin-clean-css": "^1.5.1",
|
||||
"prettier": "^1.14.2",
|
||||
"rollup": "^2.46.0",
|
||||
"rollup-plugin-typescript2": "^0.30.0",
|
||||
"typescript": "^4.2.3",
|
||||
"uglify-js": "^3.4.9"
|
||||
},
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git://github.com/leongersen/noUiSlider.git"
|
||||
"@typescript-eslint/eslint-plugin": "^5.10",
|
||||
"@typescript-eslint/parser": "^5.10",
|
||||
"eslint": "^8.7",
|
||||
"less": "^4.1",
|
||||
"less-plugin-clean-css": "^1.5",
|
||||
"prettier": "^2.5",
|
||||
"rollup": "^2.65.0",
|
||||
"rollup-plugin-typescript2": "^0.31",
|
||||
"typescript": "^4.5",
|
||||
"uglify-js": "^3.14"
|
||||
},
|
||||
"files": [
|
||||
"src",
|
||||
"dist"
|
||||
],
|
||||
"dependencies": {}
|
||||
"homepage": "https://github.com/leongersen/noUiSlider#readme",
|
||||
"license": "MIT",
|
||||
"main": "dist/nouislider.js",
|
||||
"name": "nouislider",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git://github.com/leongersen/noUiSlider.git"
|
||||
},
|
||||
"scripts": {
|
||||
"build": "npm run build:mjs && npm run build:js && npm run build:styles",
|
||||
"build:js": "npm run build:js:write && npm run build:js:compress && npm run build:js:compress:mjs",
|
||||
"build:js:compress": "uglifyjs dist/nouislider.js --compress --mangle --output dist/nouislider.min.js",
|
||||
"build:js:compress:mjs": "uglifyjs dist/nouislider.mjs --compress --mangle --output dist/nouislider.min.mjs",
|
||||
"build:js:write": "rollup -c rollup.config.js",
|
||||
"build:mjs": "tsc --module ES6 && mv dist/nouislider.js dist/nouislider.mjs",
|
||||
"build:styles": "npm run build:styles:write && npm run build:styles:compress",
|
||||
"build:styles:compress": "lessc src/nouislider.less dist/nouislider.min.css --clean-css",
|
||||
"build:styles:write": "lessc src/nouislider.less dist/nouislider.css",
|
||||
"build:types": "tsc --emitDeclarationOnly",
|
||||
"docs": "cd ../ && php -S localhost:80 nouislider/documentation/_run/router.php",
|
||||
"format": "prettier src/nouislider.ts --write --config .prettierrc",
|
||||
"lint": "eslint src/nouislider.ts",
|
||||
"prepublishOnly": "npm run build"
|
||||
},
|
||||
"style": "dist/nouislider.min.css",
|
||||
"types": "dist/nouislider.d.ts",
|
||||
"version": "15.5.1"
|
||||
}
|
||||
|
||||
168
dist/assets/vendor/nouislider/src/nouislider.ts
vendored
168
dist/assets/vendor/nouislider/src/nouislider.ts
vendored
@@ -53,14 +53,14 @@ export enum PipsMode {
|
||||
Steps = "steps",
|
||||
Positions = "positions",
|
||||
Count = "count",
|
||||
Values = "values"
|
||||
Values = "values",
|
||||
}
|
||||
|
||||
export enum PipsType {
|
||||
None = -1,
|
||||
NoValue = 0,
|
||||
LargeValue = 1,
|
||||
SmallValue = 2
|
||||
SmallValue = 2,
|
||||
}
|
||||
|
||||
type WrappedSubRange = [number] | [number, number];
|
||||
@@ -311,7 +311,7 @@ function preventDefault(e: Event): void {
|
||||
|
||||
// Removes duplicates from an array.
|
||||
function unique<Type>(array: Type[]): Type[] {
|
||||
return array.filter(function(a) {
|
||||
return array.filter(function (a) {
|
||||
return !this[a] ? (this[a] = true) : false;
|
||||
}, {});
|
||||
}
|
||||
@@ -347,7 +347,7 @@ function isNumeric(a: unknown): a is number {
|
||||
function addClassFor(element: HTMLElement, className: string, duration: number): void {
|
||||
if (duration > 0) {
|
||||
addClass(element, className);
|
||||
setTimeout(function() {
|
||||
setTimeout(function () {
|
||||
removeClass(element, className);
|
||||
}, duration);
|
||||
}
|
||||
@@ -414,7 +414,7 @@ function getPageOffset(doc: Document): PageOffset {
|
||||
|
||||
return {
|
||||
x: x,
|
||||
y: y
|
||||
y: y,
|
||||
};
|
||||
}
|
||||
|
||||
@@ -424,22 +424,22 @@ function getPageOffset(doc: Document): PageOffset {
|
||||
function getActions(): { start: string; move: string; end: string } {
|
||||
// Determine the events to bind. IE11 implements pointerEvents without
|
||||
// a prefix, which breaks compatibility with the IE10 implementation.
|
||||
return window.navigator.pointerEnabled
|
||||
return (window.navigator as any).pointerEnabled
|
||||
? {
|
||||
start: "pointerdown",
|
||||
move: "pointermove",
|
||||
end: "pointerup"
|
||||
end: "pointerup",
|
||||
}
|
||||
: window.navigator.msPointerEnabled
|
||||
: (window.navigator as any).msPointerEnabled
|
||||
? {
|
||||
start: "MSPointerDown",
|
||||
move: "MSPointerMove",
|
||||
end: "MSPointerUp"
|
||||
end: "MSPointerUp",
|
||||
}
|
||||
: {
|
||||
start: "mousedown touchstart",
|
||||
move: "mousemove touchmove",
|
||||
end: "mouseup touchend"
|
||||
end: "mouseup touchend",
|
||||
};
|
||||
}
|
||||
|
||||
@@ -451,9 +451,9 @@ function getSupportsPassive(): boolean {
|
||||
/* eslint-disable */
|
||||
try {
|
||||
const opts = Object.defineProperty({}, "passive", {
|
||||
get: function() {
|
||||
get: function () {
|
||||
supportsPassive = true;
|
||||
}
|
||||
},
|
||||
});
|
||||
|
||||
// @ts-ignore
|
||||
@@ -582,12 +582,12 @@ class Spectrum {
|
||||
const ordered: [WrappedSubRange, string][] = [];
|
||||
|
||||
// Map the object keys to an array.
|
||||
Object.keys(entry).forEach(index => {
|
||||
Object.keys(entry).forEach((index) => {
|
||||
ordered.push([asArray(entry[index]) as WrappedSubRange, index]);
|
||||
});
|
||||
|
||||
// Sort all entries by value (numeric sort).
|
||||
ordered.sort(function(a, b) {
|
||||
ordered.sort(function (a, b) {
|
||||
return a[0][0] - b[0][0];
|
||||
});
|
||||
|
||||
@@ -732,18 +732,18 @@ class Spectrum {
|
||||
stepBefore: {
|
||||
startValue: this.xVal[j - 2],
|
||||
step: this.xNumSteps[j - 2],
|
||||
highestStep: this.xHighestCompleteStep[j - 2]
|
||||
highestStep: this.xHighestCompleteStep[j - 2],
|
||||
},
|
||||
thisStep: {
|
||||
startValue: this.xVal[j - 1],
|
||||
step: this.xNumSteps[j - 1],
|
||||
highestStep: this.xHighestCompleteStep[j - 1]
|
||||
highestStep: this.xHighestCompleteStep[j - 1],
|
||||
},
|
||||
stepAfter: {
|
||||
startValue: this.xVal[j],
|
||||
step: this.xNumSteps[j],
|
||||
highestStep: this.xHighestCompleteStep[j]
|
||||
}
|
||||
highestStep: this.xHighestCompleteStep[j],
|
||||
},
|
||||
};
|
||||
}
|
||||
|
||||
@@ -843,10 +843,10 @@ class Spectrum {
|
||||
//region Defaults
|
||||
|
||||
const defaultFormatter: Formatter = {
|
||||
to: function(value) {
|
||||
to: function (value) {
|
||||
return value === undefined ? "" : value.toFixed(2);
|
||||
},
|
||||
from: Number
|
||||
from: Number,
|
||||
};
|
||||
|
||||
const cssClasses: CssClasses = {
|
||||
@@ -885,13 +885,13 @@ const cssClasses: CssClasses = {
|
||||
valueVertical: "value-vertical",
|
||||
valueNormal: "value-normal",
|
||||
valueLarge: "value-large",
|
||||
valueSub: "value-sub"
|
||||
valueSub: "value-sub",
|
||||
};
|
||||
|
||||
// Namespaces of internal event listeners
|
||||
const INTERNAL_EVENT_NS = {
|
||||
tooltips: ".__tooltips",
|
||||
aria: ".__aria"
|
||||
aria: ".__aria",
|
||||
};
|
||||
|
||||
//endregion
|
||||
@@ -1147,7 +1147,7 @@ function testBehaviour(parsed: ParsedOptions, entry: unknown): void {
|
||||
fixed: fixed,
|
||||
snap: snap,
|
||||
hover: hover,
|
||||
unconstrained: unconstrained
|
||||
unconstrained: unconstrained,
|
||||
};
|
||||
}
|
||||
|
||||
@@ -1169,7 +1169,7 @@ function testTooltips(parsed: ParsedOptions, entry: boolean | Formatter | (boole
|
||||
throw new Error("noUiSlider: must pass a formatter for all handles.");
|
||||
}
|
||||
|
||||
entry.forEach(function(formatter) {
|
||||
entry.forEach(function (formatter) {
|
||||
if (typeof formatter !== "boolean" && !isValidPartialFormatter(formatter)) {
|
||||
throw new Error("noUiSlider: 'tooltips' must be passed a formatter or 'false'.");
|
||||
}
|
||||
@@ -1253,7 +1253,7 @@ function testOptions(options: Options): ParsedOptions {
|
||||
animate: true,
|
||||
animationDuration: 300,
|
||||
ariaFormat: defaultFormatter,
|
||||
format: defaultFormatter
|
||||
format: defaultFormatter,
|
||||
} as ParsedOptions;
|
||||
|
||||
// Tests are executed in the order they are presented here.
|
||||
@@ -1281,7 +1281,7 @@ function testOptions(options: Options): ParsedOptions {
|
||||
documentElement: { r: false, t: testDocumentElement },
|
||||
cssPrefix: { r: true, t: testCssPrefix },
|
||||
cssClasses: { r: true, t: testCssClasses },
|
||||
handleAttributes: { r: false, t: testHandleAttributes }
|
||||
handleAttributes: { r: false, t: testHandleAttributes },
|
||||
};
|
||||
|
||||
const defaults = {
|
||||
@@ -1294,7 +1294,7 @@ function testOptions(options: Options): ParsedOptions {
|
||||
cssClasses: cssClasses,
|
||||
keyboardPageMultiplier: 5,
|
||||
keyboardMultiplier: 1,
|
||||
keyboardDefaultStep: 10
|
||||
keyboardDefaultStep: 10,
|
||||
} as UpdatableOptions;
|
||||
|
||||
// AriaFormat defaults to regular format, if any.
|
||||
@@ -1305,7 +1305,7 @@ function testOptions(options: Options): ParsedOptions {
|
||||
// Run all options through a testing mechanism to ensure correct
|
||||
// input. It should be noted that options might get modified to
|
||||
// be handled properly. E.g. wrapping integers in arrays.
|
||||
Object.keys(tests).forEach(function(name: OptionKey) {
|
||||
Object.keys(tests).forEach(function (name: OptionKey) {
|
||||
// If the option isn't set, but it is required, throw an error.
|
||||
if (!isSet(options[name]) && defaults[name] === undefined) {
|
||||
if ((tests[name] as any).r) {
|
||||
@@ -1334,7 +1334,7 @@ function testOptions(options: Options): ParsedOptions {
|
||||
// Pips don't move, so we can place them using left/top.
|
||||
const styles = [
|
||||
["left", "top"],
|
||||
["right", "bottom"]
|
||||
["right", "bottom"],
|
||||
];
|
||||
|
||||
parsed.style = styles[parsed.dir][parsed.ort] as "left" | "top" | "right" | "bottom";
|
||||
@@ -1402,14 +1402,14 @@ function scope(target: TargetElement, options: ParsedOptions, originalOptions: O
|
||||
// https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/tabindex
|
||||
// 0 = focusable and reachable
|
||||
handle.setAttribute("tabindex", "0");
|
||||
handle.addEventListener("keydown", function(event) {
|
||||
handle.addEventListener("keydown", function (event) {
|
||||
return eventKeydown(event, handleNumber);
|
||||
});
|
||||
}
|
||||
|
||||
if (options.handleAttributes !== undefined) {
|
||||
const attributes: HandleAttributes = options.handleAttributes[handleNumber];
|
||||
Object.keys(attributes).forEach(function(attribute: string) {
|
||||
Object.keys(attributes).forEach(function (attribute: string) {
|
||||
handle.setAttribute(attribute, attributes[attribute]);
|
||||
});
|
||||
}
|
||||
@@ -1504,7 +1504,7 @@ function scope(target: TargetElement, options: ParsedOptions, originalOptions: O
|
||||
function removeTooltips(): void {
|
||||
if (scope_Tooltips) {
|
||||
removeEvent("update" + INTERNAL_EVENT_NS.tooltips);
|
||||
scope_Tooltips.forEach(function(tooltip) {
|
||||
scope_Tooltips.forEach(function (tooltip) {
|
||||
if (tooltip) {
|
||||
removeElement(tooltip);
|
||||
}
|
||||
@@ -1520,7 +1520,7 @@ function scope(target: TargetElement, options: ParsedOptions, originalOptions: O
|
||||
// Tooltips are added with options.tooltips in original order.
|
||||
scope_Tooltips = scope_Handles.map(addTooltip);
|
||||
|
||||
bindEvent("update" + INTERNAL_EVENT_NS.tooltips, function(values, handleNumber, unencoded) {
|
||||
bindEvent("update" + INTERNAL_EVENT_NS.tooltips, function (values, handleNumber, unencoded) {
|
||||
if (!scope_Tooltips || !options.tooltips) {
|
||||
return;
|
||||
}
|
||||
@@ -1541,9 +1541,9 @@ function scope(target: TargetElement, options: ParsedOptions, originalOptions: O
|
||||
|
||||
function aria(): void {
|
||||
removeEvent("update" + INTERNAL_EVENT_NS.aria);
|
||||
bindEvent("update" + INTERNAL_EVENT_NS.aria, function(values, handleNumber, unencoded, tap, positions) {
|
||||
bindEvent("update" + INTERNAL_EVENT_NS.aria, function (values, handleNumber, unencoded, tap, positions) {
|
||||
// Update Aria Values for all handles, as a change in one changes min and max values for the next.
|
||||
scope_HandleNumbers.forEach(function(index) {
|
||||
scope_HandleNumbers.forEach(function (index) {
|
||||
const handle = scope_Handles[index];
|
||||
|
||||
let min: number | string = <number>checkHandlePosition(scope_Locations, index, 0, true, true, true);
|
||||
@@ -1602,7 +1602,7 @@ function scope(target: TargetElement, options: ParsedOptions, originalOptions: O
|
||||
if (pips.mode === PipsMode.Values) {
|
||||
// If the value must be stepped, it needs to be converted to a percentage first.
|
||||
if (pips.stepped) {
|
||||
return pips.values.map(function(value: number) {
|
||||
return pips.values.map(function (value: number) {
|
||||
// Convert to percentage, apply step, return to value.
|
||||
return scope_Spectrum.fromStepping(scope_Spectrum.getStep(scope_Spectrum.toStepping(value)));
|
||||
});
|
||||
@@ -1616,7 +1616,7 @@ function scope(target: TargetElement, options: ParsedOptions, originalOptions: O
|
||||
}
|
||||
|
||||
function mapToRange(values: number[], stepped: boolean | undefined): number[] {
|
||||
return values.map(function(value: number) {
|
||||
return values.map(function (value: number) {
|
||||
return scope_Spectrum.fromStepping(stepped ? scope_Spectrum.getStep(value) : value);
|
||||
});
|
||||
}
|
||||
@@ -1637,7 +1637,7 @@ function scope(target: TargetElement, options: ParsedOptions, originalOptions: O
|
||||
|
||||
// Create a copy of the group, sort it and filter away all duplicates.
|
||||
group = unique(
|
||||
group.slice().sort(function(a, b) {
|
||||
group.slice().sort(function (a, b) {
|
||||
return a - b;
|
||||
})
|
||||
);
|
||||
@@ -1654,7 +1654,7 @@ function scope(target: TargetElement, options: ParsedOptions, originalOptions: O
|
||||
ignoreLast = true;
|
||||
}
|
||||
|
||||
group.forEach(function(current, index) {
|
||||
group.forEach(function (current, index) {
|
||||
// Get the current step and the lower + upper positions.
|
||||
let step;
|
||||
let i;
|
||||
@@ -1748,13 +1748,13 @@ function scope(target: TargetElement, options: ParsedOptions, originalOptions: O
|
||||
[PipsType.None]: "",
|
||||
[PipsType.NoValue]: options.cssClasses.valueNormal,
|
||||
[PipsType.LargeValue]: options.cssClasses.valueLarge,
|
||||
[PipsType.SmallValue]: options.cssClasses.valueSub
|
||||
[PipsType.SmallValue]: options.cssClasses.valueSub,
|
||||
};
|
||||
const markerSizeClasses: Record<PipsType, string> = {
|
||||
[PipsType.None]: "",
|
||||
[PipsType.NoValue]: options.cssClasses.markerNormal,
|
||||
[PipsType.LargeValue]: options.cssClasses.markerLarge,
|
||||
[PipsType.SmallValue]: options.cssClasses.markerSub
|
||||
[PipsType.SmallValue]: options.cssClasses.markerSub,
|
||||
};
|
||||
|
||||
const valueOrientationClasses = [options.cssClasses.valueHorizontal, options.cssClasses.valueVertical];
|
||||
@@ -1795,7 +1795,7 @@ function scope(target: TargetElement, options: ParsedOptions, originalOptions: O
|
||||
}
|
||||
|
||||
// Append all points.
|
||||
Object.keys(spread).forEach(function(offset: string) {
|
||||
Object.keys(spread).forEach(function (offset: string) {
|
||||
addSpread(offset, spread[offset][0], spread[offset][1]);
|
||||
});
|
||||
|
||||
@@ -1816,9 +1816,9 @@ function scope(target: TargetElement, options: ParsedOptions, originalOptions: O
|
||||
const spread = generateSpread(pips);
|
||||
const filter = pips.filter;
|
||||
const format: PartialFormatter = pips.format || {
|
||||
to: function(value) {
|
||||
to: function (value) {
|
||||
return String(Math.round(value));
|
||||
}
|
||||
},
|
||||
};
|
||||
|
||||
scope_Pips = scope_Target.appendChild(addMarking(spread, filter, format));
|
||||
@@ -1843,7 +1843,7 @@ function scope(target: TargetElement, options: ParsedOptions, originalOptions: O
|
||||
// This function can be used to 'filter' events to the slider.
|
||||
// element is a node, not a nodeList
|
||||
|
||||
const method: EventHandler = function(event: BrowserEvent): false | undefined {
|
||||
const method: EventHandler = function (event: BrowserEvent): false | undefined {
|
||||
const e = fixEvent(event, data.pageOffset, data.target || element);
|
||||
|
||||
// fixEvent returns false if this event has a different target
|
||||
@@ -1893,7 +1893,7 @@ function scope(target: TargetElement, options: ParsedOptions, originalOptions: O
|
||||
const methods: [string, EventHandler][] = [];
|
||||
|
||||
// Bind a closure on the target for every event type.
|
||||
events.split(" ").forEach(function(eventName: string): void {
|
||||
events.split(" ").forEach(function (eventName: string): void {
|
||||
element.addEventListener(eventName, method, supportsPassive ? { passive: true } : false);
|
||||
methods.push([eventName, method]);
|
||||
});
|
||||
@@ -1932,7 +1932,7 @@ function scope(target: TargetElement, options: ParsedOptions, originalOptions: O
|
||||
// The only thing one handle should be concerned about is the touches that originated on top of it.
|
||||
if (touch) {
|
||||
// Returns true if a touch originated on the target.
|
||||
const isTouchOnTarget = function(checkTouch: Touch) {
|
||||
const isTouchOnTarget = function (checkTouch: Touch) {
|
||||
const target: HTMLElement = checkTouch.target as HTMLElement;
|
||||
|
||||
return (
|
||||
@@ -2000,7 +2000,7 @@ function scope(target: TargetElement, options: ParsedOptions, originalOptions: O
|
||||
let smallestDifference = 100;
|
||||
let handleNumber: number | false = false;
|
||||
|
||||
scope_Handles.forEach(function(handle, index) {
|
||||
scope_Handles.forEach(function (handle, index) {
|
||||
// Disabled handles are ignored
|
||||
if (isHandleDisabled(index)) {
|
||||
return;
|
||||
@@ -2065,7 +2065,7 @@ function scope(target: TargetElement, options: ParsedOptions, originalOptions: O
|
||||
}
|
||||
|
||||
// Unbind the move and end events, which are added on 'start'.
|
||||
data.listeners.forEach(function(c: [string, EventHandler]) {
|
||||
data.listeners.forEach(function (c: [string, EventHandler]) {
|
||||
scope_DocumentElement.removeEventListener(c[0], c[1]);
|
||||
});
|
||||
|
||||
@@ -2081,7 +2081,7 @@ function scope(target: TargetElement, options: ParsedOptions, originalOptions: O
|
||||
}
|
||||
}
|
||||
|
||||
data.handleNumbers.forEach(function(handleNumber: number) {
|
||||
data.handleNumbers.forEach(function (handleNumber: number) {
|
||||
fireEvent("change", handleNumber);
|
||||
fireEvent("set", handleNumber);
|
||||
fireEvent("end", handleNumber);
|
||||
@@ -2126,7 +2126,7 @@ function scope(target: TargetElement, options: ParsedOptions, originalOptions: O
|
||||
pageOffset: event.pageOffset,
|
||||
handleNumbers: data.handleNumbers,
|
||||
buttonsProperty: event.buttons,
|
||||
locations: scope_Locations.slice()
|
||||
locations: scope_Locations.slice(),
|
||||
});
|
||||
|
||||
const endEvent = attachEvent(actions.end, scope_DocumentElement, eventEnd, {
|
||||
@@ -2134,7 +2134,7 @@ function scope(target: TargetElement, options: ParsedOptions, originalOptions: O
|
||||
handle: handle,
|
||||
listeners: listeners,
|
||||
doNotReject: true,
|
||||
handleNumbers: data.handleNumbers
|
||||
handleNumbers: data.handleNumbers,
|
||||
});
|
||||
|
||||
const outEvent = attachEvent("mouseout", scope_DocumentElement, documentLeave, {
|
||||
@@ -2142,7 +2142,7 @@ function scope(target: TargetElement, options: ParsedOptions, originalOptions: O
|
||||
handle: handle,
|
||||
listeners: listeners,
|
||||
doNotReject: true,
|
||||
handleNumbers: data.handleNumbers
|
||||
handleNumbers: data.handleNumbers,
|
||||
});
|
||||
|
||||
// We want to make sure we pushed the listeners in the listener list rather than creating
|
||||
@@ -2169,7 +2169,7 @@ function scope(target: TargetElement, options: ParsedOptions, originalOptions: O
|
||||
scope_Body.addEventListener("selectstart", preventDefault, false);
|
||||
}
|
||||
|
||||
data.handleNumbers.forEach(function(handleNumber: number) {
|
||||
data.handleNumbers.forEach(function (handleNumber: number) {
|
||||
fireEvent("start", handleNumber);
|
||||
});
|
||||
}
|
||||
@@ -2215,9 +2215,9 @@ function scope(target: TargetElement, options: ParsedOptions, originalOptions: O
|
||||
const to = scope_Spectrum.getStep(proposal);
|
||||
const value = scope_Spectrum.fromStepping(to);
|
||||
|
||||
Object.keys(scope_Events).forEach(function(targetEvent: string) {
|
||||
Object.keys(scope_Events).forEach(function (targetEvent: string) {
|
||||
if ("hover" === targetEvent.split(".")[0]) {
|
||||
scope_Events[targetEvent].forEach(function(callback) {
|
||||
scope_Events[targetEvent].forEach(function (callback) {
|
||||
callback.call(scope_Self, value);
|
||||
});
|
||||
}
|
||||
@@ -2317,11 +2317,11 @@ function scope(target: TargetElement, options: ParsedOptions, originalOptions: O
|
||||
function bindSliderEvents(behaviour: Behaviour) {
|
||||
// Attach the standard drag event to the handles.
|
||||
if (!behaviour.fixed) {
|
||||
scope_Handles.forEach(function(handle, index) {
|
||||
scope_Handles.forEach(function (handle, index) {
|
||||
// These events are only bound to the visual handle
|
||||
// element, not the 'real' origin element.
|
||||
attachEvent(actions.start, handle.children[0] as HTMLElement, eventStart, {
|
||||
handleNumbers: [index]
|
||||
handleNumbers: [index],
|
||||
});
|
||||
});
|
||||
}
|
||||
@@ -2334,13 +2334,13 @@ function scope(target: TargetElement, options: ParsedOptions, originalOptions: O
|
||||
// Fire hover events
|
||||
if (behaviour.hover) {
|
||||
attachEvent(actions.move, scope_Base, eventHover, {
|
||||
hover: true
|
||||
hover: true,
|
||||
} as EventData);
|
||||
}
|
||||
|
||||
// Make the range draggable.
|
||||
if (behaviour.drag) {
|
||||
scope_Connects.forEach(function(connect, index) {
|
||||
scope_Connects.forEach(function (connect, index) {
|
||||
if (connect === false || index === 0 || index === scope_Connects.length - 1) {
|
||||
return;
|
||||
}
|
||||
@@ -2368,11 +2368,11 @@ function scope(target: TargetElement, options: ParsedOptions, originalOptions: O
|
||||
handleNumbersToDrag = scope_HandleNumbers;
|
||||
}
|
||||
|
||||
eventHolders.forEach(function(eventHolder) {
|
||||
eventHolders.forEach(function (eventHolder) {
|
||||
attachEvent(actions.start, eventHolder, eventStart, {
|
||||
handles: handlesToDrag,
|
||||
handleNumbers: handleNumbersToDrag,
|
||||
connect: connect
|
||||
connect: connect,
|
||||
});
|
||||
});
|
||||
});
|
||||
@@ -2386,7 +2386,7 @@ function scope(target: TargetElement, options: ParsedOptions, originalOptions: O
|
||||
|
||||
// If the event bound is 'update,' fire it immediately for all handles.
|
||||
if (namespacedEvent.split(".")[0] === "update") {
|
||||
scope_Handles.forEach(function(a, index) {
|
||||
scope_Handles.forEach(function (a, index) {
|
||||
fireEvent("update", index);
|
||||
});
|
||||
}
|
||||
@@ -2401,7 +2401,7 @@ function scope(target: TargetElement, options: ParsedOptions, originalOptions: O
|
||||
const event = namespacedEvent && namespacedEvent.split(".")[0];
|
||||
const namespace = event ? namespacedEvent.substring(event.length) : namespacedEvent;
|
||||
|
||||
Object.keys(scope_Events).forEach(function(bind) {
|
||||
Object.keys(scope_Events).forEach(function (bind) {
|
||||
const tEvent = bind.split(".")[0];
|
||||
const tNamespace = bind.substring(tEvent.length);
|
||||
if ((!event || event === tEvent) && (!namespace || namespace === tNamespace)) {
|
||||
@@ -2415,11 +2415,11 @@ function scope(target: TargetElement, options: ParsedOptions, originalOptions: O
|
||||
|
||||
// External event handling
|
||||
function fireEvent(eventName: string, handleNumber: number, tap?: boolean): void {
|
||||
Object.keys(scope_Events).forEach(function(targetEvent: string): void {
|
||||
Object.keys(scope_Events).forEach(function (targetEvent: string): void {
|
||||
const eventType = targetEvent.split(".")[0];
|
||||
|
||||
if (eventName === eventType) {
|
||||
scope_Events[targetEvent].forEach(function(callback) {
|
||||
scope_Events[targetEvent].forEach(function (callback) {
|
||||
callback.call(
|
||||
// Use the slider public API as the scope ('this')
|
||||
scope_Self,
|
||||
@@ -2542,7 +2542,7 @@ function scope(target: TargetElement, options: ParsedOptions, originalOptions: O
|
||||
|
||||
// Step 1: get the maximum percentage that any of the handles can move
|
||||
if (handleNumbers.length > 1) {
|
||||
handleNumbers.forEach(function(handleNumber, o) {
|
||||
handleNumbers.forEach(function (handleNumber, o) {
|
||||
const to = checkHandlePosition(
|
||||
proposals,
|
||||
handleNumber,
|
||||
@@ -2570,13 +2570,13 @@ function scope(target: TargetElement, options: ParsedOptions, originalOptions: O
|
||||
let state = false;
|
||||
|
||||
// Step 2: Try to set the handles with the found percentage
|
||||
handleNumbers.forEach(function(handleNumber, o) {
|
||||
handleNumbers.forEach(function (handleNumber, o) {
|
||||
state = setHandle(handleNumber, locations[handleNumber] + proposal, b[o], f[o]) || state;
|
||||
});
|
||||
|
||||
// Step 3: If a handle moved, fire events
|
||||
if (state) {
|
||||
handleNumbers.forEach(function(handleNumber) {
|
||||
handleNumbers.forEach(function (handleNumber) {
|
||||
fireEvent("update", handleNumber);
|
||||
fireEvent("slide", handleNumber);
|
||||
});
|
||||
@@ -2617,7 +2617,7 @@ function scope(target: TargetElement, options: ParsedOptions, originalOptions: O
|
||||
// Handles after the middle later is lower
|
||||
// [[7] [8] .......... | .......... [5] [4]
|
||||
function setZindex(): void {
|
||||
scope_HandleNumbers.forEach(function(handleNumber: number): void {
|
||||
scope_HandleNumbers.forEach(function (handleNumber: number): void {
|
||||
const dir = scope_Locations[handleNumber] > 50 ? -1 : 1;
|
||||
const zIndex = 3 + (scope_Handles.length + dir * handleNumber);
|
||||
scope_Handles[handleNumber].style.zIndex = String(zIndex);
|
||||
@@ -2718,7 +2718,7 @@ function scope(target: TargetElement, options: ParsedOptions, originalOptions: O
|
||||
}
|
||||
|
||||
// First pass, without lookAhead but with lookBackward. Values are set from left to right.
|
||||
scope_HandleNumbers.forEach(function(handleNumber) {
|
||||
scope_HandleNumbers.forEach(function (handleNumber) {
|
||||
setHandle(handleNumber, resolveToValue(values[handleNumber], handleNumber), true, false, exactInput);
|
||||
});
|
||||
|
||||
@@ -2733,7 +2733,7 @@ function scope(target: TargetElement, options: ParsedOptions, originalOptions: O
|
||||
if (scope_HandleNumbers.length > 1) {
|
||||
const space = 100 / (scope_HandleNumbers.length - 1);
|
||||
|
||||
scope_HandleNumbers.forEach(function(handleNumber) {
|
||||
scope_HandleNumbers.forEach(function (handleNumber) {
|
||||
scope_Locations[handleNumber] = handleNumber * space;
|
||||
});
|
||||
}
|
||||
@@ -2742,14 +2742,14 @@ function scope(target: TargetElement, options: ParsedOptions, originalOptions: O
|
||||
// Secondary passes. Now that all base values are set, apply constraints.
|
||||
// Iterate all handles to ensure constraints are applied for the entire slider (Issue #1009)
|
||||
for (; i < scope_HandleNumbers.length; ++i) {
|
||||
scope_HandleNumbers.forEach(function(handleNumber) {
|
||||
scope_HandleNumbers.forEach(function (handleNumber) {
|
||||
setHandle(handleNumber, scope_Locations[handleNumber], true, true, exactInput);
|
||||
});
|
||||
}
|
||||
|
||||
setZindex();
|
||||
|
||||
scope_HandleNumbers.forEach(function(handleNumber) {
|
||||
scope_HandleNumbers.forEach(function (handleNumber) {
|
||||
fireEvent("update", handleNumber);
|
||||
|
||||
// Fire the event only for handles that received a new value, as per #579
|
||||
@@ -2833,7 +2833,7 @@ function scope(target: TargetElement, options: ParsedOptions, originalOptions: O
|
||||
if (options.snap) {
|
||||
return [
|
||||
value - nearbySteps.stepBefore.startValue || null,
|
||||
nearbySteps.stepAfter.startValue - value || null
|
||||
nearbySteps.stepAfter.startValue - value || null,
|
||||
];
|
||||
}
|
||||
|
||||
@@ -2901,11 +2901,11 @@ function scope(target: TargetElement, options: ParsedOptions, originalOptions: O
|
||||
"step",
|
||||
"format",
|
||||
"pips",
|
||||
"tooltips"
|
||||
"tooltips",
|
||||
];
|
||||
|
||||
// Only change options that we're actually passed to update.
|
||||
updateAble.forEach(function(name: OptionKey) {
|
||||
updateAble.forEach(function (name: OptionKey) {
|
||||
// Check for undefined. null removes the value.
|
||||
if (optionsToUpdate[name] !== undefined) {
|
||||
(originalOptions[name] as any) = optionsToUpdate[name];
|
||||
@@ -2915,7 +2915,7 @@ function scope(target: TargetElement, options: ParsedOptions, originalOptions: O
|
||||
const newOptions: ParsedOptions = testOptions(originalOptions);
|
||||
|
||||
// Load new options into the slider state
|
||||
updateAble.forEach(function(name: OptionKey) {
|
||||
updateAble.forEach(function (name: OptionKey) {
|
||||
if (optionsToUpdate[name] !== undefined) {
|
||||
(options[name] as any) = newOptions[name];
|
||||
}
|
||||
@@ -2985,7 +2985,7 @@ function scope(target: TargetElement, options: ParsedOptions, originalOptions: O
|
||||
setHandle: valueSetHandle,
|
||||
reset: valueReset,
|
||||
// Exposed for unit testing, don't use this in your application.
|
||||
__moveHandles: function(upward: boolean, proposal: number, handleNumbers: number[]) {
|
||||
__moveHandles: function (upward: boolean, proposal: number, handleNumbers: number[]) {
|
||||
moveHandles(upward, proposal, scope_Locations, handleNumbers);
|
||||
},
|
||||
options: originalOptions, // Issue #600, #678
|
||||
@@ -2993,16 +2993,16 @@ function scope(target: TargetElement, options: ParsedOptions, originalOptions: O
|
||||
target: scope_Target, // Issue #597
|
||||
removePips: removePips,
|
||||
removeTooltips: removeTooltips,
|
||||
getPositions: function() {
|
||||
getPositions: function () {
|
||||
return scope_Locations.slice();
|
||||
},
|
||||
getTooltips: function() {
|
||||
getTooltips: function () {
|
||||
return scope_Tooltips;
|
||||
},
|
||||
getOrigins: function() {
|
||||
getOrigins: function () {
|
||||
return scope_Handles;
|
||||
},
|
||||
pips: pips // Issue #594
|
||||
pips: pips, // Issue #594
|
||||
} as API;
|
||||
|
||||
return scope_Self;
|
||||
@@ -3040,5 +3040,5 @@ export default {
|
||||
// A reference to the default classes, allows global changes.
|
||||
// Use the cssClasses option for changes to one slider.
|
||||
cssClasses: cssClasses,
|
||||
create: initialize
|
||||
create: initialize,
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user