@hitachivantara/uikit-react-lab 3.49.5 → 3.49.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/Slider/Slider.js
CHANGED
|
@@ -10,8 +10,14 @@ require("core-js/modules/es.object.get-own-property-descriptor.js");
|
|
|
10
10
|
|
|
11
11
|
require("core-js/modules/es.object.get-own-property-descriptors.js");
|
|
12
12
|
|
|
13
|
+
require("core-js/modules/es.string.iterator.js");
|
|
14
|
+
|
|
15
|
+
require("core-js/modules/es.weak-map.js");
|
|
16
|
+
|
|
13
17
|
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
14
18
|
|
|
19
|
+
var _typeof = require("@babel/runtime/helpers/typeof");
|
|
20
|
+
|
|
15
21
|
Object.defineProperty(exports, "__esModule", {
|
|
16
22
|
value: true
|
|
17
23
|
});
|
|
@@ -53,6 +59,8 @@ require("core-js/modules/es.array.iterator.js");
|
|
|
53
59
|
|
|
54
60
|
require("core-js/modules/web.dom-collections.iterator.js");
|
|
55
61
|
|
|
62
|
+
require("core-js/modules/es.promise.js");
|
|
63
|
+
|
|
56
64
|
var _react = _interopRequireDefault(require("react"));
|
|
57
65
|
|
|
58
66
|
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
@@ -65,12 +73,14 @@ var _core = require("@material-ui/core");
|
|
|
65
73
|
|
|
66
74
|
var _KnobRing = _interopRequireDefault(require("./KnobRing"));
|
|
67
75
|
|
|
68
|
-
require("rc-slider/assets/index.css");
|
|
69
|
-
|
|
70
76
|
var _styles2 = _interopRequireDefault(require("./styles"));
|
|
71
77
|
|
|
72
78
|
var _excluded = ["value", "dragging", "index", "style"];
|
|
73
79
|
|
|
80
|
+
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
81
|
+
|
|
82
|
+
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
83
|
+
|
|
74
84
|
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
75
85
|
|
|
76
86
|
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { (0, _defineProperty2.default)(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
@@ -354,6 +364,9 @@ var HvSlider = /*#__PURE__*/function (_React$Component) {
|
|
|
354
364
|
stepValue: _stepValue,
|
|
355
365
|
inverseStepValue: _inverseStepValue
|
|
356
366
|
};
|
|
367
|
+
Promise.resolve().then(function () {
|
|
368
|
+
return _interopRequireWildcard(require("rc-slider/assets/index.css"));
|
|
369
|
+
});
|
|
357
370
|
return _this;
|
|
358
371
|
}
|
|
359
372
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Slider.js","names":["scaledValueToKnobsPositionValue","scaledValue","minPointValue","inverseStepValue","Math","floor","transformKnobsPosition","values","knobsPositions","forEach","value","index","calculateStepValue","maxPointValue","divisionQuantity","abs","HvSlider","props","sliderValue","stepValue","markProperties","markstep","markDigits","formatMark","styles","marks","length","markProperty","position","label","style","mark","roundedMarkStep","labelValue","knobsPositionToScaledValue","toFixed","knobProperties","trackStyles","knobProperty","track","color","backgroundColor","trackColor","knobInner","knobOuterStyle","lastItem","knobOuter","hidden","knobHidden","knobHiddenLast","knobsCurrentPosition","newKnobsPosition","slice","knobsValues","noOverlap","state","duplicatedValue","findDuplicated","filter","item","indexOf","array","newArray","newPosition","previousValue","knobsPosition","knobs","generateKnobsPositionAndValues","onChange","defaultValues","fixed","setState","onBeforeChange","onAfterChange","formatTooltip","classes","dragging","restProps","knobValue","dragColor","sliderTooltip","hoverColor","markStep","theme","styleCreator","createTrackStyles","knobStyles","createKnobStyles","rangesCount","createMark","defaultKnobsPositions","createKnob","root","dot","onChangeHandler","onBeforeChangeHandler","onAfterChangeHandler","undefined","rail","React","Component","propTypes","PropTypes","arrayOf","number","isRequired","shape","string","defaultValue","bool","func","any","defaultProps","withStyles","name","withTheme"],"sources":["../../src/Slider/Slider.js"],"sourcesContent":["/**\n * Note: https://github.com/react-component/slider/issues/504\n * Version must remain in \"8.6.3\" until this bug is fixed\n */\n\nimport React from \"react\";\nimport PropTypes from \"prop-types\";\nimport { Range, Handle } from \"rc-slider\";\nimport Tooltip from \"rc-tooltip\";\nimport { withStyles } from \"@material-ui/core\";\nimport KnobRing from \"./KnobRing\";\nimport \"rc-slider/assets/index.css\";\nimport styleCreator from \"./styles\";\n\n/**\n * Transform the scaled values into knobs positions.\n *\n * @param {*} scaledValue - the value of the slider to be scaled\n * @param {*} minPointValue - The value of the first point in\n * the slider from left to right.\n * @param {*} inverseStepValue - The inverse of calculated separation between\n * the value of the points that compose the slider.\n */\nconst scaledValueToKnobsPositionValue = (scaledValue, minPointValue, inverseStepValue) =>\n Math.floor((scaledValue - minPointValue) * inverseStepValue);\n\n/**\n * Transform the received knobs values into knob positions\n *\n * @param {Object} values - The values of the slider.\n * @param {Number} inverseStepValue - The inverse of calculated separation between\n * the value of the points that compose the slider.\n * @param {Integer} minPointValue - The value of the first point in the slider from\n * left to right.\n * @returns {Array} - The position of the knobs.\n */\nconst transformKnobsPosition = (values, inverseStepValue, minPointValue) => {\n const knobsPositions = [];\n values.forEach((value, index) => {\n knobsPositions[index] = scaledValueToKnobsPositionValue(value, minPointValue, inverseStepValue);\n });\n return knobsPositions;\n};\n\n/**\n * Calculates the separation between each value in the slider.\n *\n * @param {*} maxPointValue - The value of the last point in the slider from left to right.\n * @param {*} minPointValue - The value of the first point in the slider from left to right.\n * @param {*} divisionQuantity - How many subdivisions there are in the slider.\n */\nconst calculateStepValue = (maxPointValue, minPointValue, divisionQuantity) =>\n Math.abs(maxPointValue - minPointValue) / divisionQuantity;\n\n/**\n * Sliders reflect a range of values along a bar, from which users may select a single value. They are ideal for adjusting settings such as volume, brightness, or applying image filters. Still in development\n */\nclass HvSlider extends React.Component {\n constructor(props) {\n super(props);\n\n const {\n markProperties,\n markStep,\n markDigits,\n knobProperties,\n values,\n defaultValues,\n theme,\n maxPointValue,\n minPointValue,\n divisionQuantity,\n formatMark,\n } = props;\n\n const styles = styleCreator(theme);\n const stepValue = calculateStepValue(maxPointValue, minPointValue, divisionQuantity);\n const inverseStepValue = 1 / stepValue;\n\n this.state = {\n knobsPositions: transformKnobsPosition(\n values.length > 0 ? values : defaultValues,\n inverseStepValue,\n minPointValue\n ),\n trackStyles: this.createTrackStyles(knobProperties, styles),\n knobStyles: this.createKnobStyles(knobProperties, styles),\n rangesCount: knobProperties.length - 1,\n marks: this.createMark(\n markProperties,\n markStep,\n divisionQuantity,\n minPointValue,\n stepValue,\n markDigits,\n formatMark,\n styles\n ),\n defaultKnobsPositions: transformKnobsPosition(defaultValues, inverseStepValue, minPointValue),\n styles,\n stepValue,\n inverseStepValue,\n };\n }\n\n static getDerivedStateFromProps(props, state) {\n const stepValue = calculateStepValue(\n props.maxPointValue,\n props.minPointValue,\n props.divisionQuantity\n );\n\n if (props.values.length > 0) {\n return {\n ...state,\n knobsPositions: transformKnobsPosition(\n props.values.length > 0 ? props.values : props.defaultValues,\n 1 / stepValue,\n props.minPointValue\n ),\n };\n }\n return null;\n }\n\n /**\n * Transform the scaled values into knobs positions.\n *\n * @param {*} sliderValue - the value of the slider to be scaled\n * @param {*} minPointValue - The value of the first point in the slider from left to right.\n * @param {*} stepValue - The calculated separation between the values of the slider.\n */\n knobsPositionToScaledValue = (sliderValue, minPointValue, stepValue) =>\n minPointValue + stepValue * sliderValue;\n\n /**\n * Generates the inline styles used for the track of each knob, applying colors if necessary.\n *\n * @param {Object} markProperties - The object provided by the user with\n * the desired configuration for the marks.\n * @param {Integer} markstep - The separation between marks.\n * @param {Integer} divisionQuantity - How many subdivisions there are in the slider.\n * @param {Integer} minPointValue - The value of the first point in the slider from\n * left to right.\n * @param {Integer} stepValue - The calculated separation between the values of the slider.\n * @param {Integer} markDigits - How many decimals the mark will show.\n * @param {Function} formatMark - A function provided by the user that is going to\n * be executed to format the mark text.\n * @param {Object} styles - the default styles for the marks.\n * @returns {Object} - An object with the for the marks.\n * @memberof HvSlider\n */\n createMark = (\n markProperties,\n markstep,\n divisionQuantity,\n minPointValue,\n stepValue,\n markDigits,\n formatMark,\n styles\n ) => {\n const marks = {};\n if (markProperties.length > 0) {\n markProperties.forEach((markProperty) => {\n marks[markProperty.position] = {\n label: `${markProperty.label}`,\n style: {\n ...styles.mark,\n },\n };\n });\n } else {\n const roundedMarkStep = Math.floor(markstep);\n for (let index = 0; index <= divisionQuantity; index += roundedMarkStep) {\n let labelValue = this.knobsPositionToScaledValue(index, minPointValue, stepValue).toFixed(\n markDigits\n );\n labelValue = formatMark(labelValue);\n marks[index] = {\n label: `${labelValue}`,\n style: {\n ...styles.mark,\n },\n };\n }\n }\n return marks;\n };\n\n /**\n * Generates the inline styles used for the track of each knob, applying colors if necessary.\n *\n * @param {Object} knobProperties - The object provided by the user with\n * the desired configuration for the knobs.\n * @param {Object} styles - the default styles for the tracks.\n * @returns {Object} - An object with the style for each track.\n * @memberof HvSlider\n */\n createTrackStyles = (knobProperties, styles) => {\n const trackStyles = [];\n if (knobProperties.length > 1) {\n knobProperties.forEach((knobProperty, index) => {\n trackStyles[index] = { ...styles.track };\n if (knobProperty.color) {\n trackStyles[index].backgroundColor = knobProperty.trackColor;\n }\n });\n }\n return trackStyles;\n };\n\n /**\n * Generates the inline styles used for each knob, applying colors if specified.\n *\n * @param {Object} knobProperties - The object provided by the user with\n * the desired configuration for the knobs.\n * @param {Object} styles - the default styles for the knobs.\n * @returns {Object} - An object with both the inner and outer styles for the knob.\n * @memberof HvSlider\n */\n createKnobStyles = (knobProperties, styles) => {\n const knobInner = [];\n const knobOuterStyle = [];\n\n const lastItem = knobProperties.length - 1;\n if (knobProperties.length > 1) {\n knobProperties.forEach((knobProperty, index) => {\n knobInner[index] = { ...styles.knobInner };\n knobOuterStyle[index] = { ...styles.knobOuter };\n\n if (knobProperty.color) {\n knobInner[index].backgroundColor = knobProperty.color;\n knobOuterStyle[index].backgroundColor = \"transparent\";\n }\n\n if (knobProperty.hidden) {\n knobInner[index] = styles.knobHidden;\n if (index === lastItem) {\n knobInner[index] = { ...styles.knobHiddenLast };\n knobInner[index].backgroundColor = knobProperty.color;\n knobOuterStyle[index] = { ...styles.knobHidden };\n knobOuterStyle[index].backgroundColor = knobProperty.color;\n }\n }\n });\n }\n\n return {\n knobInner,\n knobOuterStyle,\n };\n };\n\n /**\n * Generates an object which posses the current value and position of the knobs.\n *\n * @param {Array} knobsCurrentPosition - An array containing the current positions of the knobs.\n * @returns {Object} - An object with the positions and values of the knobs.\n * @memberof HvSlider\n */\n generateKnobsPositionAndValues = (knobsCurrentPosition) => {\n const newKnobsPosition = knobsCurrentPosition.slice();\n const knobsValues = [];\n const { minPointValue, noOverlap } = this.props;\n const { stepValue, knobsPositions } = this.state;\n\n let duplicatedValue = null;\n\n const findDuplicated = newKnobsPosition.filter(\n (item, index) => newKnobsPosition.indexOf(item) !== index\n );\n\n if (noOverlap && findDuplicated.length > 0) {\n [duplicatedValue] = findDuplicated;\n }\n newKnobsPosition.forEach((position, index, array) => {\n const newArray = array;\n let newPosition = position;\n\n if (noOverlap && newPosition === duplicatedValue) {\n const previousValue = knobsPositions[index];\n if (previousValue !== newPosition) {\n newPosition += newPosition > previousValue ? -1 : 1;\n newArray[index] = newPosition;\n }\n }\n\n knobsValues[index] = this.knobsPositionToScaledValue(newPosition, minPointValue, stepValue);\n }, this);\n\n return {\n knobsPosition: newKnobsPosition,\n knobsValues,\n };\n };\n\n /**\n * Function executed while the knobs changes.\n *\n * executes the callback provided by the user with the values and position of the knobs,\n * also lock the value of the knob in case one is fixed.\n *\n * @param {Array} knobsPosition - An array containing the current positions of the knobs.\n * @memberof HvSlider\n */\n onChangeHandler = (knobsPosition) => {\n const knobs = this.generateKnobsPositionAndValues(knobsPosition);\n const { knobProperties, onChange, minPointValue, defaultValues } = this.props;\n const { inverseStepValue } = this.state;\n knobProperties.forEach((knobProperty, index) => {\n if (knobProperty.fixed) {\n knobs.knobsPosition[index] = scaledValueToKnobsPositionValue(\n defaultValues[index],\n minPointValue,\n inverseStepValue\n );\n }\n });\n\n onChange(knobs);\n\n this.setState({\n knobsPositions: knobs.knobsPosition,\n });\n };\n\n /**\n * Function executed before a change.\n *\n * executes the callback provided by the user with the values and position of the knobs\n *\n * @param {Array} knobsPosition - An array containing the current positions of the knobs.\n * @memberof HvSlider\n */\n onBeforeChangeHandler = (knobsPosition) => {\n const { onBeforeChange } = this.props;\n const knobs = this.generateKnobsPositionAndValues(knobsPosition);\n onBeforeChange(knobs);\n };\n\n /**\n * Function executed after a change.\n *\n * executes the callback provided by the user with the values and position of the knobs\n *\n * @param {Array} knobsPosition - An array containing the current positions of the knobs.\n * @memberof HvSlider\n */\n onAfterChangeHandler = (knobsPosition) => {\n const { onAfterChange } = this.props;\n const knobs = this.generateKnobsPositionAndValues(knobsPosition);\n onAfterChange(knobs);\n };\n\n /**\n * Function used to create a custom knob for the slider.\n *\n * TODO: This should be isolated because is creating a sub component,\n * but there were some problems regarding the underlying component losing\n * references of the handlers disabling the focus.\n *\n * @param {Object} props - An object containing the properties of the knobs.\n * @memberof HvSlider\n */\n createKnob = (props) => {\n const { minPointValue, markDigits, knobProperties, formatTooltip, classes } = this.props;\n const { stepValue } = this.state;\n const { value, dragging, index, style, ...restProps } = props;\n\n const knobValue = this.knobsPositionToScaledValue(value, minPointValue, stepValue).toFixed(\n markDigits\n );\n if (dragging) {\n style.backgroundColor = knobProperties[index].dragColor;\n } else {\n style.backgroundColor = knobProperties[index].color;\n }\n\n return (\n <Tooltip\n prefixCls=\"rc-slider-tooltip\"\n overlay={formatTooltip(knobValue)}\n visible={dragging}\n placement=\"top\"\n key={index}\n overlayClassName={classes.sliderTooltip}\n >\n <Handle value={value} style={style} {...restProps}>\n <KnobRing hoverColor={knobProperties[index].hoverColor} dragging={dragging} />\n </Handle>\n </Tooltip>\n );\n };\n\n render() {\n const { divisionQuantity, classes } = this.props;\n\n const {\n knobsPositions,\n defaultKnobsPositions,\n rangesCount,\n knobStyles,\n trackStyles,\n marks,\n styles,\n } = this.state;\n\n return (\n <Range\n handle={this.createKnob}\n className={classes.root}\n min={0}\n max={divisionQuantity}\n step={1}\n marks={marks}\n dotStyle={styles.dot}\n onChange={this.onChangeHandler}\n onBeforeChange={this.onBeforeChangeHandler}\n onAfterChange={this.onAfterChangeHandler}\n value={knobsPositions.length > 0 ? knobsPositions : undefined}\n allowCross={false}\n defaultValue={defaultKnobsPositions}\n count={rangesCount}\n railStyle={styles.rail}\n handleStyle={knobStyles.knobInner}\n trackStyle={trackStyles}\n />\n );\n }\n}\n\nHvSlider.propTypes = {\n /**\n * The values array to apply to the component\n */\n values: PropTypes.arrayOf(PropTypes.number),\n /**\n * The default values array to apply to the component\n */\n defaultValues: PropTypes.arrayOf(PropTypes.number).isRequired,\n /**\n * The object used to set the knob properties,\n * for every item in the array a new knob will be created.\n */\n knobProperties: PropTypes.arrayOf(\n PropTypes.shape({\n color: PropTypes.string,\n defaultValue: PropTypes.number,\n hidden: PropTypes.bool,\n fixed: PropTypes.bool,\n hoverColor: PropTypes.string,\n trackColor: PropTypes.string,\n dragColor: PropTypes.string,\n })\n ).isRequired,\n /**\n * The object used to set the mark properties individually.\n */\n markProperties: PropTypes.arrayOf(\n PropTypes.shape({\n position: PropTypes.number,\n label: PropTypes.string,\n })\n ),\n /**\n * the function executed before a change will ocurr in the slider.\n * it will receive an object like\n * {\n * knobsPosition: [],\n * knobsValues: []\n * }\n */\n onBeforeChange: PropTypes.func,\n /**\n * the function executed while a change is ocurring in the slider.\n * it will receive an object like\n * {\n * knobsPosition: [],\n * knobsValues: []\n * }\n */\n onChange: PropTypes.func,\n /**\n * the function executed after a change ocurred in the slider.\n * it will receive an object like\n * {\n * knobsPosition: [],\n * knobsValues: []\n * }\n */\n onAfterChange: PropTypes.func,\n /**\n * the separation in points between marks.\n * example: if 10 divisions and a markstep of 2 there will be 5 marks.\n */\n markStep: PropTypes.number,\n /**\n * how many subdivisions there are in the slider.\n */\n divisionQuantity: PropTypes.number,\n /**\n * the value of the first point in the slider from left to right.\n */\n minPointValue: PropTypes.number,\n /**\n * the value of the last point in the slider from left to right.\n */\n maxPointValue: PropTypes.number,\n /**\n * the nax number of decimals if no format function is applied\n */\n markDigits: PropTypes.number,\n /**\n * a formatting function used to add format to the marks in the track,\n * the function receives the mark text\n */\n formatMark: PropTypes.func,\n /**\n * a formatting function used to add format to the tooltip in the track,\n * the function receives the mark text\n */\n formatTooltip: PropTypes.func,\n /**\n * if `true` the knobs can't have the same value, if `false` knobs can have the same value.\n */\n noOverlap: PropTypes.bool,\n /**\n * the classes object to be applied into the root object.\n */\n classes: PropTypes.shape({\n /**\n * Style applied to the root of the component.\n */\n root: PropTypes.string,\n /**\n * Style applied to the dot.\n */\n dot: PropTypes.string,\n /**\n * Style applied to the rail.\n */\n rail: PropTypes.string,\n /**\n * Style applied to the inner of the knob.\n */\n knobInner: PropTypes.string,\n /**\n * Style applied to the outside of the knob.\n */\n knobOuter: PropTypes.string,\n /**\n * Style applied when the knob is hidden.\n */\n knobHidden: PropTypes.string,\n /**\n * Style applied last hidden knob.\n */\n knobHiddenLast: PropTypes.string,\n /**\n * Style applied to the track.\n */\n track: PropTypes.string,\n /**\n * Style applied to the mark.\n */\n mark: PropTypes.string,\n /**\n * Style applied to the tooltip.\n */\n sliderTooltip: PropTypes.string,\n }).isRequired,\n\n theme: PropTypes.any.isRequired,\n};\n\nHvSlider.defaultProps = {\n markStep: 1,\n markDigits: 0,\n noOverlap: true,\n values: [],\n formatMark: (mark) => mark,\n formatTooltip: (mark) => mark,\n markProperties: [],\n divisionQuantity: 100,\n minPointValue: 0,\n maxPointValue: 100,\n onBeforeChange: () => {},\n onChange: () => {},\n onAfterChange: () => {},\n};\n\nexport default withStyles(styleCreator, { name: \"HvSlider\", withTheme: true })(HvSlider);\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAKA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;;;;;;;;;;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAMA,+BAA+B,GAAG,SAAlCA,+BAAkC,CAACC,WAAD,EAAcC,aAAd,EAA6BC,gBAA7B;EAAA,OACtCC,IAAI,CAACC,KAAL,CAAW,CAACJ,WAAW,GAAGC,aAAf,IAAgCC,gBAA3C,CADsC;AAAA,CAAxC;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AACA,IAAMG,sBAAsB,GAAG,SAAzBA,sBAAyB,CAACC,MAAD,EAASJ,gBAAT,EAA2BD,aAA3B,EAA6C;EAC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CAACgG,YAAT,GAAwB;EACtB9B,QAAQ,EAAE,CADY;EAEtB5D,UAAU,EAAE,CAFU;EAGtBgC,SAAS,EAAE,IAHW;EAItB/C,MAAM,EAAE,EAJc;EAKtBgB,UAAU,EAAE,oBAACQ,IAAD;IAAA,OAAUA,IAAV;EAAA,CALU;EAMtB2C,aAAa,EAAE,uBAAC3C,IAAD;IAAA,OAAUA,IAAV;EAAA,CANO;EAOtBX,cAAc,EAAE,EAPM;EAQtBN,gBAAgB,EAAE,GARI;EAStBZ,aAAa,EAAE,CATO;EAUtBW,aAAa,EAAE,GAVO;EAWtB2D,cAAc,EAAE,0BAAM,CAAE,CAXF;EAYtBJ,QAAQ,EAAE,oBAAM,CAAE,CAZI;EAatBK,aAAa,EAAE,yBAAM,CAAE;AAbD,CAAxB;;eAgBe,IAAAwC,gBAAA,EAAW7B,gBAAX,EAAyB;EAAE8B,IAAI,EAAE,UAAR;EAAoBC,SAAS,EAAE;AAA/B,CAAzB,EAAgEnG,QAAhE,C"}
|
|
1
|
+
{"version":3,"file":"Slider.js","names":["scaledValueToKnobsPositionValue","scaledValue","minPointValue","inverseStepValue","Math","floor","transformKnobsPosition","values","knobsPositions","forEach","value","index","calculateStepValue","maxPointValue","divisionQuantity","abs","HvSlider","props","sliderValue","stepValue","markProperties","markstep","markDigits","formatMark","styles","marks","length","markProperty","position","label","style","mark","roundedMarkStep","labelValue","knobsPositionToScaledValue","toFixed","knobProperties","trackStyles","knobProperty","track","color","backgroundColor","trackColor","knobInner","knobOuterStyle","lastItem","knobOuter","hidden","knobHidden","knobHiddenLast","knobsCurrentPosition","newKnobsPosition","slice","knobsValues","noOverlap","state","duplicatedValue","findDuplicated","filter","item","indexOf","array","newArray","newPosition","previousValue","knobsPosition","knobs","generateKnobsPositionAndValues","onChange","defaultValues","fixed","setState","onBeforeChange","onAfterChange","formatTooltip","classes","dragging","restProps","knobValue","dragColor","sliderTooltip","hoverColor","markStep","theme","styleCreator","createTrackStyles","knobStyles","createKnobStyles","rangesCount","createMark","defaultKnobsPositions","createKnob","root","dot","onChangeHandler","onBeforeChangeHandler","onAfterChangeHandler","undefined","rail","React","Component","propTypes","PropTypes","arrayOf","number","isRequired","shape","string","defaultValue","bool","func","any","defaultProps","withStyles","name","withTheme"],"sources":["../../src/Slider/Slider.js"],"sourcesContent":["/**\n * Note: https://github.com/react-component/slider/issues/504\n * Version must remain in \"8.6.3\" until this bug is fixed\n */\n\nimport React from \"react\";\nimport PropTypes from \"prop-types\";\nimport { Range, Handle } from \"rc-slider\";\nimport Tooltip from \"rc-tooltip\";\nimport { withStyles } from \"@material-ui/core\";\nimport KnobRing from \"./KnobRing\";\nimport styleCreator from \"./styles\";\n\n/**\n * Transform the scaled values into knobs positions.\n *\n * @param {*} scaledValue - the value of the slider to be scaled\n * @param {*} minPointValue - The value of the first point in\n * the slider from left to right.\n * @param {*} inverseStepValue - The inverse of calculated separation between\n * the value of the points that compose the slider.\n */\nconst scaledValueToKnobsPositionValue = (scaledValue, minPointValue, inverseStepValue) =>\n Math.floor((scaledValue - minPointValue) * inverseStepValue);\n\n/**\n * Transform the received knobs values into knob positions\n *\n * @param {Object} values - The values of the slider.\n * @param {Number} inverseStepValue - The inverse of calculated separation between\n * the value of the points that compose the slider.\n * @param {Integer} minPointValue - The value of the first point in the slider from\n * left to right.\n * @returns {Array} - The position of the knobs.\n */\nconst transformKnobsPosition = (values, inverseStepValue, minPointValue) => {\n const knobsPositions = [];\n values.forEach((value, index) => {\n knobsPositions[index] = scaledValueToKnobsPositionValue(value, minPointValue, inverseStepValue);\n });\n return knobsPositions;\n};\n\n/**\n * Calculates the separation between each value in the slider.\n *\n * @param {*} maxPointValue - The value of the last point in the slider from left to right.\n * @param {*} minPointValue - The value of the first point in the slider from left to right.\n * @param {*} divisionQuantity - How many subdivisions there are in the slider.\n */\nconst calculateStepValue = (maxPointValue, minPointValue, divisionQuantity) =>\n Math.abs(maxPointValue - minPointValue) / divisionQuantity;\n\n/**\n * Sliders reflect a range of values along a bar, from which users may select a single value. They are ideal for adjusting settings such as volume, brightness, or applying image filters. Still in development\n */\nclass HvSlider extends React.Component {\n constructor(props) {\n super(props);\n\n const {\n markProperties,\n markStep,\n markDigits,\n knobProperties,\n values,\n defaultValues,\n theme,\n maxPointValue,\n minPointValue,\n divisionQuantity,\n formatMark,\n } = props;\n\n const styles = styleCreator(theme);\n const stepValue = calculateStepValue(maxPointValue, minPointValue, divisionQuantity);\n const inverseStepValue = 1 / stepValue;\n\n this.state = {\n knobsPositions: transformKnobsPosition(\n values.length > 0 ? values : defaultValues,\n inverseStepValue,\n minPointValue\n ),\n trackStyles: this.createTrackStyles(knobProperties, styles),\n knobStyles: this.createKnobStyles(knobProperties, styles),\n rangesCount: knobProperties.length - 1,\n marks: this.createMark(\n markProperties,\n markStep,\n divisionQuantity,\n minPointValue,\n stepValue,\n markDigits,\n formatMark,\n styles\n ),\n defaultKnobsPositions: transformKnobsPosition(defaultValues, inverseStepValue, minPointValue),\n styles,\n stepValue,\n inverseStepValue,\n };\n\n import(\"rc-slider/assets/index.css\");\n }\n\n static getDerivedStateFromProps(props, state) {\n const stepValue = calculateStepValue(\n props.maxPointValue,\n props.minPointValue,\n props.divisionQuantity\n );\n\n if (props.values.length > 0) {\n return {\n ...state,\n knobsPositions: transformKnobsPosition(\n props.values.length > 0 ? props.values : props.defaultValues,\n 1 / stepValue,\n props.minPointValue\n ),\n };\n }\n return null;\n }\n\n /**\n * Transform the scaled values into knobs positions.\n *\n * @param {*} sliderValue - the value of the slider to be scaled\n * @param {*} minPointValue - The value of the first point in the slider from left to right.\n * @param {*} stepValue - The calculated separation between the values of the slider.\n */\n knobsPositionToScaledValue = (sliderValue, minPointValue, stepValue) =>\n minPointValue + stepValue * sliderValue;\n\n /**\n * Generates the inline styles used for the track of each knob, applying colors if necessary.\n *\n * @param {Object} markProperties - The object provided by the user with\n * the desired configuration for the marks.\n * @param {Integer} markstep - The separation between marks.\n * @param {Integer} divisionQuantity - How many subdivisions there are in the slider.\n * @param {Integer} minPointValue - The value of the first point in the slider from\n * left to right.\n * @param {Integer} stepValue - The calculated separation between the values of the slider.\n * @param {Integer} markDigits - How many decimals the mark will show.\n * @param {Function} formatMark - A function provided by the user that is going to\n * be executed to format the mark text.\n * @param {Object} styles - the default styles for the marks.\n * @returns {Object} - An object with the for the marks.\n * @memberof HvSlider\n */\n createMark = (\n markProperties,\n markstep,\n divisionQuantity,\n minPointValue,\n stepValue,\n markDigits,\n formatMark,\n styles\n ) => {\n const marks = {};\n if (markProperties.length > 0) {\n markProperties.forEach((markProperty) => {\n marks[markProperty.position] = {\n label: `${markProperty.label}`,\n style: {\n ...styles.mark,\n },\n };\n });\n } else {\n const roundedMarkStep = Math.floor(markstep);\n for (let index = 0; index <= divisionQuantity; index += roundedMarkStep) {\n let labelValue = this.knobsPositionToScaledValue(index, minPointValue, stepValue).toFixed(\n markDigits\n );\n labelValue = formatMark(labelValue);\n marks[index] = {\n label: `${labelValue}`,\n style: {\n ...styles.mark,\n },\n };\n }\n }\n return marks;\n };\n\n /**\n * Generates the inline styles used for the track of each knob, applying colors if necessary.\n *\n * @param {Object} knobProperties - The object provided by the user with\n * the desired configuration for the knobs.\n * @param {Object} styles - the default styles for the tracks.\n * @returns {Object} - An object with the style for each track.\n * @memberof HvSlider\n */\n createTrackStyles = (knobProperties, styles) => {\n const trackStyles = [];\n if (knobProperties.length > 1) {\n knobProperties.forEach((knobProperty, index) => {\n trackStyles[index] = { ...styles.track };\n if (knobProperty.color) {\n trackStyles[index].backgroundColor = knobProperty.trackColor;\n }\n });\n }\n return trackStyles;\n };\n\n /**\n * Generates the inline styles used for each knob, applying colors if specified.\n *\n * @param {Object} knobProperties - The object provided by the user with\n * the desired configuration for the knobs.\n * @param {Object} styles - the default styles for the knobs.\n * @returns {Object} - An object with both the inner and outer styles for the knob.\n * @memberof HvSlider\n */\n createKnobStyles = (knobProperties, styles) => {\n const knobInner = [];\n const knobOuterStyle = [];\n\n const lastItem = knobProperties.length - 1;\n if (knobProperties.length > 1) {\n knobProperties.forEach((knobProperty, index) => {\n knobInner[index] = { ...styles.knobInner };\n knobOuterStyle[index] = { ...styles.knobOuter };\n\n if (knobProperty.color) {\n knobInner[index].backgroundColor = knobProperty.color;\n knobOuterStyle[index].backgroundColor = \"transparent\";\n }\n\n if (knobProperty.hidden) {\n knobInner[index] = styles.knobHidden;\n if (index === lastItem) {\n knobInner[index] = { ...styles.knobHiddenLast };\n knobInner[index].backgroundColor = knobProperty.color;\n knobOuterStyle[index] = { ...styles.knobHidden };\n knobOuterStyle[index].backgroundColor = knobProperty.color;\n }\n }\n });\n }\n\n return {\n knobInner,\n knobOuterStyle,\n };\n };\n\n /**\n * Generates an object which posses the current value and position of the knobs.\n *\n * @param {Array} knobsCurrentPosition - An array containing the current positions of the knobs.\n * @returns {Object} - An object with the positions and values of the knobs.\n * @memberof HvSlider\n */\n generateKnobsPositionAndValues = (knobsCurrentPosition) => {\n const newKnobsPosition = knobsCurrentPosition.slice();\n const knobsValues = [];\n const { minPointValue, noOverlap } = this.props;\n const { stepValue, knobsPositions } = this.state;\n\n let duplicatedValue = null;\n\n const findDuplicated = newKnobsPosition.filter(\n (item, index) => newKnobsPosition.indexOf(item) !== index\n );\n\n if (noOverlap && findDuplicated.length > 0) {\n [duplicatedValue] = findDuplicated;\n }\n newKnobsPosition.forEach((position, index, array) => {\n const newArray = array;\n let newPosition = position;\n\n if (noOverlap && newPosition === duplicatedValue) {\n const previousValue = knobsPositions[index];\n if (previousValue !== newPosition) {\n newPosition += newPosition > previousValue ? -1 : 1;\n newArray[index] = newPosition;\n }\n }\n\n knobsValues[index] = this.knobsPositionToScaledValue(newPosition, minPointValue, stepValue);\n }, this);\n\n return {\n knobsPosition: newKnobsPosition,\n knobsValues,\n };\n };\n\n /**\n * Function executed while the knobs changes.\n *\n * executes the callback provided by the user with the values and position of the knobs,\n * also lock the value of the knob in case one is fixed.\n *\n * @param {Array} knobsPosition - An array containing the current positions of the knobs.\n * @memberof HvSlider\n */\n onChangeHandler = (knobsPosition) => {\n const knobs = this.generateKnobsPositionAndValues(knobsPosition);\n const { knobProperties, onChange, minPointValue, defaultValues } = this.props;\n const { inverseStepValue } = this.state;\n knobProperties.forEach((knobProperty, index) => {\n if (knobProperty.fixed) {\n knobs.knobsPosition[index] = scaledValueToKnobsPositionValue(\n defaultValues[index],\n minPointValue,\n inverseStepValue\n );\n }\n });\n\n onChange(knobs);\n\n this.setState({\n knobsPositions: knobs.knobsPosition,\n });\n };\n\n /**\n * Function executed before a change.\n *\n * executes the callback provided by the user with the values and position of the knobs\n *\n * @param {Array} knobsPosition - An array containing the current positions of the knobs.\n * @memberof HvSlider\n */\n onBeforeChangeHandler = (knobsPosition) => {\n const { onBeforeChange } = this.props;\n const knobs = this.generateKnobsPositionAndValues(knobsPosition);\n onBeforeChange(knobs);\n };\n\n /**\n * Function executed after a change.\n *\n * executes the callback provided by the user with the values and position of the knobs\n *\n * @param {Array} knobsPosition - An array containing the current positions of the knobs.\n * @memberof HvSlider\n */\n onAfterChangeHandler = (knobsPosition) => {\n const { onAfterChange } = this.props;\n const knobs = this.generateKnobsPositionAndValues(knobsPosition);\n onAfterChange(knobs);\n };\n\n /**\n * Function used to create a custom knob for the slider.\n *\n * TODO: This should be isolated because is creating a sub component,\n * but there were some problems regarding the underlying component losing\n * references of the handlers disabling the focus.\n *\n * @param {Object} props - An object containing the properties of the knobs.\n * @memberof HvSlider\n */\n createKnob = (props) => {\n const { minPointValue, markDigits, knobProperties, formatTooltip, classes } = this.props;\n const { stepValue } = this.state;\n const { value, dragging, index, style, ...restProps } = props;\n\n const knobValue = this.knobsPositionToScaledValue(value, minPointValue, stepValue).toFixed(\n markDigits\n );\n if (dragging) {\n style.backgroundColor = knobProperties[index].dragColor;\n } else {\n style.backgroundColor = knobProperties[index].color;\n }\n\n return (\n <Tooltip\n prefixCls=\"rc-slider-tooltip\"\n overlay={formatTooltip(knobValue)}\n visible={dragging}\n placement=\"top\"\n key={index}\n overlayClassName={classes.sliderTooltip}\n >\n <Handle value={value} style={style} {...restProps}>\n <KnobRing hoverColor={knobProperties[index].hoverColor} dragging={dragging} />\n </Handle>\n </Tooltip>\n );\n };\n\n render() {\n const { divisionQuantity, classes } = this.props;\n\n const {\n knobsPositions,\n defaultKnobsPositions,\n rangesCount,\n knobStyles,\n trackStyles,\n marks,\n styles,\n } = this.state;\n\n return (\n <Range\n handle={this.createKnob}\n className={classes.root}\n min={0}\n max={divisionQuantity}\n step={1}\n marks={marks}\n dotStyle={styles.dot}\n onChange={this.onChangeHandler}\n onBeforeChange={this.onBeforeChangeHandler}\n onAfterChange={this.onAfterChangeHandler}\n value={knobsPositions.length > 0 ? knobsPositions : undefined}\n allowCross={false}\n defaultValue={defaultKnobsPositions}\n count={rangesCount}\n railStyle={styles.rail}\n handleStyle={knobStyles.knobInner}\n trackStyle={trackStyles}\n />\n );\n }\n}\n\nHvSlider.propTypes = {\n /**\n * The values array to apply to the component\n */\n values: PropTypes.arrayOf(PropTypes.number),\n /**\n * The default values array to apply to the component\n */\n defaultValues: PropTypes.arrayOf(PropTypes.number).isRequired,\n /**\n * The object used to set the knob properties,\n * for every item in the array a new knob will be created.\n */\n knobProperties: PropTypes.arrayOf(\n PropTypes.shape({\n color: PropTypes.string,\n defaultValue: PropTypes.number,\n hidden: PropTypes.bool,\n fixed: PropTypes.bool,\n hoverColor: PropTypes.string,\n trackColor: PropTypes.string,\n dragColor: PropTypes.string,\n })\n ).isRequired,\n /**\n * The object used to set the mark properties individually.\n */\n markProperties: PropTypes.arrayOf(\n PropTypes.shape({\n position: PropTypes.number,\n label: PropTypes.string,\n })\n ),\n /**\n * the function executed before a change will ocurr in the slider.\n * it will receive an object like\n * {\n * knobsPosition: [],\n * knobsValues: []\n * }\n */\n onBeforeChange: PropTypes.func,\n /**\n * the function executed while a change is ocurring in the slider.\n * it will receive an object like\n * {\n * knobsPosition: [],\n * knobsValues: []\n * }\n */\n onChange: PropTypes.func,\n /**\n * the function executed after a change ocurred in the slider.\n * it will receive an object like\n * {\n * knobsPosition: [],\n * knobsValues: []\n * }\n */\n onAfterChange: PropTypes.func,\n /**\n * the separation in points between marks.\n * example: if 10 divisions and a markstep of 2 there will be 5 marks.\n */\n markStep: PropTypes.number,\n /**\n * how many subdivisions there are in the slider.\n */\n divisionQuantity: PropTypes.number,\n /**\n * the value of the first point in the slider from left to right.\n */\n minPointValue: PropTypes.number,\n /**\n * the value of the last point in the slider from left to right.\n */\n maxPointValue: PropTypes.number,\n /**\n * the nax number of decimals if no format function is applied\n */\n markDigits: PropTypes.number,\n /**\n * a formatting function used to add format to the marks in the track,\n * the function receives the mark text\n */\n formatMark: PropTypes.func,\n /**\n * a formatting function used to add format to the tooltip in the track,\n * the function receives the mark text\n */\n formatTooltip: PropTypes.func,\n /**\n * if `true` the knobs can't have the same value, if `false` knobs can have the same value.\n */\n noOverlap: PropTypes.bool,\n /**\n * the classes object to be applied into the root object.\n */\n classes: PropTypes.shape({\n /**\n * Style applied to the root of the component.\n */\n root: PropTypes.string,\n /**\n * Style applied to the dot.\n */\n dot: PropTypes.string,\n /**\n * Style applied to the rail.\n */\n rail: PropTypes.string,\n /**\n * Style applied to the inner of the knob.\n */\n knobInner: PropTypes.string,\n /**\n * Style applied to the outside of the knob.\n */\n knobOuter: PropTypes.string,\n /**\n * Style applied when the knob is hidden.\n */\n knobHidden: PropTypes.string,\n /**\n * Style applied last hidden knob.\n */\n knobHiddenLast: PropTypes.string,\n /**\n * Style applied to the track.\n */\n track: PropTypes.string,\n /**\n * Style applied to the mark.\n */\n mark: PropTypes.string,\n /**\n * Style applied to the tooltip.\n */\n sliderTooltip: PropTypes.string,\n }).isRequired,\n\n theme: PropTypes.any.isRequired,\n};\n\nHvSlider.defaultProps = {\n markStep: 1,\n markDigits: 0,\n noOverlap: true,\n values: [],\n formatMark: (mark) => mark,\n formatTooltip: (mark) => mark,\n markProperties: [],\n divisionQuantity: 100,\n minPointValue: 0,\n maxPointValue: 100,\n onBeforeChange: () => {},\n onChange: () => {},\n onAfterChange: () => {},\n};\n\nexport default withStyles(styleCreator, { name: \"HvSlider\", withTheme: true })(HvSlider);\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAKA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;;;;;;;;;;;;;;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAMA,+BAA+B,GAAG,SAAlCA,+BAAkC,CAACC,WAAD,EAAcC,aAAd,EAA6BC,gBAA7B;EAAA,OACtCC,IAAI,CAACC,KAAL,CAAW,CAACJ,WAAW,GAAGC,aAAf,IAAgCC,gBAA3C,CADsC;AAAA,CAAxC;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AACA,IAAMG,sBAAsB,GAAG,SAAzBA,sBAAyB,CAACC,MAAD,EAASJ,gBAAT,EAA2BD,aAA3B,EAA6C;EAC1E,IAAMM,cAAc,GAAG,EAAvB;EACAD,MAAM,CAACE,OAAP,CAAe,UAACC,KAAD,EAAQC,KAAR,EAAkB;IAC/BH,cAAc,CAACG,KAAD,CAAd,GAAwBX,+BAA+B,CAACU,KAAD,EAAQR,aAAR,EAAuBC,gBAAvB,CAAvD;EACD,CAFD;EAGA,OAAOK,cAAP;AACD,CAND;AAQA;AACA;AACA;AACA;AACA;AACA;AACA;;;AACA,IAAMI,kBAAkB,GAAG,SAArBA,kBAAqB,CAACC,aAAD,EAAgBX,aAAhB,EAA+BY,gBAA/B;EAAA,OACzBV,IAAI,CAACW,GAAL,CAASF,aAAa,GAAGX,aAAzB,IAA0CY,gBADjB;AAAA,CAA3B;AAGA;AACA;AACA;;;IACME,Q;;;;;EACJ,kBAAYC,MAAZ,EAAmB;IAAA;;IAAA;IACjB,0BAAMA,MAAN;IADiB,yGA4EU,UAACC,WAAD,EAAchB,aAAd,EAA6BiB,SAA7B;MAAA,OAC3BjB,aAAa,GAAGiB,SAAS,GAAGD,WAD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EAAgEnG,QAAhE,C"}
|
|
@@ -31,6 +31,7 @@ import "core-js/modules/es.array.filter.js";
|
|
|
31
31
|
import "core-js/modules/es.string.fixed.js";
|
|
32
32
|
import "core-js/modules/es.array.iterator.js";
|
|
33
33
|
import "core-js/modules/web.dom-collections.iterator.js";
|
|
34
|
+
import "core-js/modules/es.promise.js";
|
|
34
35
|
|
|
35
36
|
/**
|
|
36
37
|
* Note: https://github.com/react-component/slider/issues/504
|
|
@@ -42,7 +43,6 @@ import { Range, Handle } from "rc-slider";
|
|
|
42
43
|
import Tooltip from "rc-tooltip";
|
|
43
44
|
import { withStyles } from "@material-ui/core";
|
|
44
45
|
import KnobRing from "./KnobRing";
|
|
45
|
-
import "rc-slider/assets/index.css";
|
|
46
46
|
import styleCreator from "./styles";
|
|
47
47
|
/**
|
|
48
48
|
* Transform the scaled values into knobs positions.
|
|
@@ -332,6 +332,7 @@ var HvSlider = /*#__PURE__*/function (_React$Component) {
|
|
|
332
332
|
stepValue: _stepValue,
|
|
333
333
|
inverseStepValue: _inverseStepValue
|
|
334
334
|
};
|
|
335
|
+
import("rc-slider/assets/index.css");
|
|
335
336
|
return _this;
|
|
336
337
|
}
|
|
337
338
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Slider.js","names":["React","PropTypes","Range","Handle","Tooltip","withStyles","KnobRing","styleCreator","scaledValueToKnobsPositionValue","scaledValue","minPointValue","inverseStepValue","Math","floor","transformKnobsPosition","values","knobsPositions","forEach","value","index","calculateStepValue","maxPointValue","divisionQuantity","abs","HvSlider","props","sliderValue","stepValue","markProperties","markstep","markDigits","formatMark","styles","marks","length","markProperty","position","label","style","mark","roundedMarkStep","labelValue","knobsPositionToScaledValue","toFixed","knobProperties","trackStyles","knobProperty","track","color","backgroundColor","trackColor","knobInner","knobOuterStyle","lastItem","knobOuter","hidden","knobHidden","knobHiddenLast","knobsCurrentPosition","newKnobsPosition","slice","knobsValues","noOverlap","state","duplicatedValue","findDuplicated","filter","item","indexOf","array","newArray","newPosition","previousValue","knobsPosition","knobs","generateKnobsPositionAndValues","onChange","defaultValues","fixed","setState","onBeforeChange","onAfterChange","formatTooltip","classes","dragging","restProps","knobValue","dragColor","sliderTooltip","hoverColor","markStep","theme","createTrackStyles","knobStyles","createKnobStyles","rangesCount","createMark","defaultKnobsPositions","createKnob","root","dot","onChangeHandler","onBeforeChangeHandler","onAfterChangeHandler","undefined","rail","Component","propTypes","arrayOf","number","isRequired","shape","string","defaultValue","bool","func","any","defaultProps","name","withTheme"],"sources":["../../../src/Slider/Slider.js"],"sourcesContent":["/**\n * Note: https://github.com/react-component/slider/issues/504\n * Version must remain in \"8.6.3\" until this bug is fixed\n */\n\nimport React from \"react\";\nimport PropTypes from \"prop-types\";\nimport { Range, Handle } from \"rc-slider\";\nimport Tooltip from \"rc-tooltip\";\nimport { withStyles } from \"@material-ui/core\";\nimport KnobRing from \"./KnobRing\";\nimport \"rc-slider/assets/index.css\";\nimport styleCreator from \"./styles\";\n\n/**\n * Transform the scaled values into knobs positions.\n *\n * @param {*} scaledValue - the value of the slider to be scaled\n * @param {*} minPointValue - The value of the first point in\n * the slider from left to right.\n * @param {*} inverseStepValue - The inverse of calculated separation between\n * the value of the points that compose the slider.\n */\nconst scaledValueToKnobsPositionValue = (scaledValue, minPointValue, inverseStepValue) =>\n Math.floor((scaledValue - minPointValue) * inverseStepValue);\n\n/**\n * Transform the received knobs values into knob positions\n *\n * @param {Object} values - The values of the slider.\n * @param {Number} inverseStepValue - The inverse of calculated separation between\n * the value of the points that compose the slider.\n * @param {Integer} minPointValue - The value of the first point in the slider from\n * left to right.\n * @returns {Array} - The position of the knobs.\n */\nconst transformKnobsPosition = (values, inverseStepValue, minPointValue) => {\n const knobsPositions = [];\n values.forEach((value, index) => {\n knobsPositions[index] = scaledValueToKnobsPositionValue(value, minPointValue, inverseStepValue);\n });\n return knobsPositions;\n};\n\n/**\n * Calculates the separation between each value in the slider.\n *\n * @param {*} maxPointValue - The value of the last point in the slider from left to right.\n * @param {*} minPointValue - The value of the first point in the slider from left to right.\n * @param {*} divisionQuantity - How many subdivisions there are in the slider.\n */\nconst calculateStepValue = (maxPointValue, minPointValue, divisionQuantity) =>\n Math.abs(maxPointValue - minPointValue) / divisionQuantity;\n\n/**\n * Sliders reflect a range of values along a bar, from which users may select a single value. They are ideal for adjusting settings such as volume, brightness, or applying image filters. Still in development\n */\nclass HvSlider extends React.Component {\n constructor(props) {\n super(props);\n\n const {\n markProperties,\n markStep,\n markDigits,\n knobProperties,\n values,\n defaultValues,\n theme,\n maxPointValue,\n minPointValue,\n divisionQuantity,\n formatMark,\n } = props;\n\n const styles = styleCreator(theme);\n const stepValue = calculateStepValue(maxPointValue, minPointValue, divisionQuantity);\n const inverseStepValue = 1 / stepValue;\n\n this.state = {\n knobsPositions: transformKnobsPosition(\n values.length > 0 ? values : defaultValues,\n inverseStepValue,\n minPointValue\n ),\n trackStyles: this.createTrackStyles(knobProperties, styles),\n knobStyles: this.createKnobStyles(knobProperties, styles),\n rangesCount: knobProperties.length - 1,\n marks: this.createMark(\n markProperties,\n markStep,\n divisionQuantity,\n minPointValue,\n stepValue,\n markDigits,\n formatMark,\n styles\n ),\n defaultKnobsPositions: transformKnobsPosition(defaultValues, inverseStepValue, minPointValue),\n styles,\n stepValue,\n inverseStepValue,\n };\n }\n\n static getDerivedStateFromProps(props, state) {\n const stepValue = calculateStepValue(\n props.maxPointValue,\n props.minPointValue,\n props.divisionQuantity\n );\n\n if (props.values.length > 0) {\n return {\n ...state,\n knobsPositions: transformKnobsPosition(\n props.values.length > 0 ? props.values : props.defaultValues,\n 1 / stepValue,\n props.minPointValue\n ),\n };\n }\n return null;\n }\n\n /**\n * Transform the scaled values into knobs positions.\n *\n * @param {*} sliderValue - the value of the slider to be scaled\n * @param {*} minPointValue - The value of the first point in the slider from left to right.\n * @param {*} stepValue - The calculated separation between the values of the slider.\n */\n knobsPositionToScaledValue = (sliderValue, minPointValue, stepValue) =>\n minPointValue + stepValue * sliderValue;\n\n /**\n * Generates the inline styles used for the track of each knob, applying colors if necessary.\n *\n * @param {Object} markProperties - The object provided by the user with\n * the desired configuration for the marks.\n * @param {Integer} markstep - The separation between marks.\n * @param {Integer} divisionQuantity - How many subdivisions there are in the slider.\n * @param {Integer} minPointValue - The value of the first point in the slider from\n * left to right.\n * @param {Integer} stepValue - The calculated separation between the values of the slider.\n * @param {Integer} markDigits - How many decimals the mark will show.\n * @param {Function} formatMark - A function provided by the user that is going to\n * be executed to format the mark text.\n * @param {Object} styles - the default styles for the marks.\n * @returns {Object} - An object with the for the marks.\n * @memberof HvSlider\n */\n createMark = (\n markProperties,\n markstep,\n divisionQuantity,\n minPointValue,\n stepValue,\n markDigits,\n formatMark,\n styles\n ) => {\n const marks = {};\n if (markProperties.length > 0) {\n markProperties.forEach((markProperty) => {\n marks[markProperty.position] = {\n label: `${markProperty.label}`,\n style: {\n ...styles.mark,\n },\n };\n });\n } else {\n const roundedMarkStep = Math.floor(markstep);\n for (let index = 0; index <= divisionQuantity; index += roundedMarkStep) {\n let labelValue = this.knobsPositionToScaledValue(index, minPointValue, stepValue).toFixed(\n markDigits\n );\n labelValue = formatMark(labelValue);\n marks[index] = {\n label: `${labelValue}`,\n style: {\n ...styles.mark,\n },\n };\n }\n }\n return marks;\n };\n\n /**\n * Generates the inline styles used for the track of each knob, applying colors if necessary.\n *\n * @param {Object} knobProperties - The object provided by the user with\n * the desired configuration for the knobs.\n * @param {Object} styles - the default styles for the tracks.\n * @returns {Object} - An object with the style for each track.\n * @memberof HvSlider\n */\n createTrackStyles = (knobProperties, styles) => {\n const trackStyles = [];\n if (knobProperties.length > 1) {\n knobProperties.forEach((knobProperty, index) => {\n trackStyles[index] = { ...styles.track };\n if (knobProperty.color) {\n trackStyles[index].backgroundColor = knobProperty.trackColor;\n }\n });\n }\n return trackStyles;\n };\n\n /**\n * Generates the inline styles used for each knob, applying colors if specified.\n *\n * @param {Object} knobProperties - The object provided by the user with\n * the desired configuration for the knobs.\n * @param {Object} styles - the default styles for the knobs.\n * @returns {Object} - An object with both the inner and outer styles for the knob.\n * @memberof HvSlider\n */\n createKnobStyles = (knobProperties, styles) => {\n const knobInner = [];\n const knobOuterStyle = [];\n\n const lastItem = knobProperties.length - 1;\n if (knobProperties.length > 1) {\n knobProperties.forEach((knobProperty, index) => {\n knobInner[index] = { ...styles.knobInner };\n knobOuterStyle[index] = { ...styles.knobOuter };\n\n if (knobProperty.color) {\n knobInner[index].backgroundColor = knobProperty.color;\n knobOuterStyle[index].backgroundColor = \"transparent\";\n }\n\n if (knobProperty.hidden) {\n knobInner[index] = styles.knobHidden;\n if (index === lastItem) {\n knobInner[index] = { ...styles.knobHiddenLast };\n knobInner[index].backgroundColor = knobProperty.color;\n knobOuterStyle[index] = { ...styles.knobHidden };\n knobOuterStyle[index].backgroundColor = knobProperty.color;\n }\n }\n });\n }\n\n return {\n knobInner,\n knobOuterStyle,\n };\n };\n\n /**\n * Generates an object which posses the current value and position of the knobs.\n *\n * @param {Array} knobsCurrentPosition - An array containing the current positions of the knobs.\n * @returns {Object} - An object with the positions and values of the knobs.\n * @memberof HvSlider\n */\n generateKnobsPositionAndValues = (knobsCurrentPosition) => {\n const newKnobsPosition = knobsCurrentPosition.slice();\n const knobsValues = [];\n const { minPointValue, noOverlap } = this.props;\n const { stepValue, knobsPositions } = this.state;\n\n let duplicatedValue = null;\n\n const findDuplicated = newKnobsPosition.filter(\n (item, index) => newKnobsPosition.indexOf(item) !== index\n );\n\n if (noOverlap && findDuplicated.length > 0) {\n [duplicatedValue] = findDuplicated;\n }\n newKnobsPosition.forEach((position, index, array) => {\n const newArray = array;\n let newPosition = position;\n\n if (noOverlap && newPosition === duplicatedValue) {\n const previousValue = knobsPositions[index];\n if (previousValue !== newPosition) {\n newPosition += newPosition > previousValue ? -1 : 1;\n newArray[index] = newPosition;\n }\n }\n\n knobsValues[index] = this.knobsPositionToScaledValue(newPosition, minPointValue, stepValue);\n }, this);\n\n return {\n knobsPosition: newKnobsPosition,\n knobsValues,\n };\n };\n\n /**\n * Function executed while the knobs changes.\n *\n * executes the callback provided by the user with the values and position of the knobs,\n * also lock the value of the knob in case one is fixed.\n *\n * @param {Array} knobsPosition - An array containing the current positions of the knobs.\n * @memberof HvSlider\n */\n onChangeHandler = (knobsPosition) => {\n const knobs = this.generateKnobsPositionAndValues(knobsPosition);\n const { knobProperties, onChange, minPointValue, defaultValues } = this.props;\n const { inverseStepValue } = this.state;\n knobProperties.forEach((knobProperty, index) => {\n if (knobProperty.fixed) {\n knobs.knobsPosition[index] = scaledValueToKnobsPositionValue(\n defaultValues[index],\n minPointValue,\n inverseStepValue\n );\n }\n });\n\n onChange(knobs);\n\n this.setState({\n knobsPositions: knobs.knobsPosition,\n });\n };\n\n /**\n * Function executed before a change.\n *\n * executes the callback provided by the user with the values and position of the knobs\n *\n * @param {Array} knobsPosition - An array containing the current positions of the knobs.\n * @memberof HvSlider\n */\n onBeforeChangeHandler = (knobsPosition) => {\n const { onBeforeChange } = this.props;\n const knobs = this.generateKnobsPositionAndValues(knobsPosition);\n onBeforeChange(knobs);\n };\n\n /**\n * Function executed after a change.\n *\n * executes the callback provided by the user with the values and position of the knobs\n *\n * @param {Array} knobsPosition - An array containing the current positions of the knobs.\n * @memberof HvSlider\n */\n onAfterChangeHandler = (knobsPosition) => {\n const { onAfterChange } = this.props;\n const knobs = this.generateKnobsPositionAndValues(knobsPosition);\n onAfterChange(knobs);\n };\n\n /**\n * Function used to create a custom knob for the slider.\n *\n * TODO: This should be isolated because is creating a sub component,\n * but there were some problems regarding the underlying component losing\n * references of the handlers disabling the focus.\n *\n * @param {Object} props - An object containing the properties of the knobs.\n * @memberof HvSlider\n */\n createKnob = (props) => {\n const { minPointValue, markDigits, knobProperties, formatTooltip, classes } = this.props;\n const { stepValue } = this.state;\n const { value, dragging, index, style, ...restProps } = props;\n\n const knobValue = this.knobsPositionToScaledValue(value, minPointValue, stepValue).toFixed(\n markDigits\n );\n if (dragging) {\n style.backgroundColor = knobProperties[index].dragColor;\n } else {\n style.backgroundColor = knobProperties[index].color;\n }\n\n return (\n <Tooltip\n prefixCls=\"rc-slider-tooltip\"\n overlay={formatTooltip(knobValue)}\n visible={dragging}\n placement=\"top\"\n key={index}\n overlayClassName={classes.sliderTooltip}\n >\n <Handle value={value} style={style} {...restProps}>\n <KnobRing hoverColor={knobProperties[index].hoverColor} dragging={dragging} />\n </Handle>\n </Tooltip>\n );\n };\n\n render() {\n const { divisionQuantity, classes } = this.props;\n\n const {\n knobsPositions,\n defaultKnobsPositions,\n rangesCount,\n knobStyles,\n trackStyles,\n marks,\n styles,\n } = this.state;\n\n return (\n <Range\n handle={this.createKnob}\n className={classes.root}\n min={0}\n max={divisionQuantity}\n step={1}\n marks={marks}\n dotStyle={styles.dot}\n onChange={this.onChangeHandler}\n onBeforeChange={this.onBeforeChangeHandler}\n onAfterChange={this.onAfterChangeHandler}\n value={knobsPositions.length > 0 ? knobsPositions : undefined}\n allowCross={false}\n defaultValue={defaultKnobsPositions}\n count={rangesCount}\n railStyle={styles.rail}\n handleStyle={knobStyles.knobInner}\n trackStyle={trackStyles}\n />\n );\n }\n}\n\nHvSlider.propTypes = {\n /**\n * The values array to apply to the component\n */\n values: PropTypes.arrayOf(PropTypes.number),\n /**\n * The default values array to apply to the component\n */\n defaultValues: PropTypes.arrayOf(PropTypes.number).isRequired,\n /**\n * The object used to set the knob properties,\n * for every item in the array a new knob will be created.\n */\n knobProperties: PropTypes.arrayOf(\n PropTypes.shape({\n color: PropTypes.string,\n defaultValue: PropTypes.number,\n hidden: PropTypes.bool,\n fixed: PropTypes.bool,\n hoverColor: PropTypes.string,\n trackColor: PropTypes.string,\n dragColor: PropTypes.string,\n })\n ).isRequired,\n /**\n * The object used to set the mark properties individually.\n */\n markProperties: PropTypes.arrayOf(\n PropTypes.shape({\n position: PropTypes.number,\n label: PropTypes.string,\n })\n ),\n /**\n * the function executed before a change will ocurr in the slider.\n * it will receive an object like\n * {\n * knobsPosition: [],\n * knobsValues: []\n * }\n */\n onBeforeChange: PropTypes.func,\n /**\n * the function executed while a change is ocurring in the slider.\n * it will receive an object like\n * {\n * knobsPosition: [],\n * knobsValues: []\n * }\n */\n onChange: PropTypes.func,\n /**\n * the function executed after a change ocurred in the slider.\n * it will receive an object like\n * {\n * knobsPosition: [],\n * knobsValues: []\n * }\n */\n onAfterChange: PropTypes.func,\n /**\n * the separation in points between marks.\n * example: if 10 divisions and a markstep of 2 there will be 5 marks.\n */\n markStep: PropTypes.number,\n /**\n * how many subdivisions there are in the slider.\n */\n divisionQuantity: PropTypes.number,\n /**\n * the value of the first point in the slider from left to right.\n */\n minPointValue: PropTypes.number,\n /**\n * the value of the last point in the slider from left to right.\n */\n maxPointValue: PropTypes.number,\n /**\n * the nax number of decimals if no format function is applied\n */\n markDigits: PropTypes.number,\n /**\n * a formatting function used to add format to the marks in the track,\n * the function receives the mark text\n */\n formatMark: PropTypes.func,\n /**\n * a formatting function used to add format to the tooltip in the track,\n * the function receives the mark text\n */\n formatTooltip: PropTypes.func,\n /**\n * if `true` the knobs can't have the same value, if `false` knobs can have the same value.\n */\n noOverlap: PropTypes.bool,\n /**\n * the classes object to be applied into the root object.\n */\n classes: PropTypes.shape({\n /**\n * Style applied to the root of the component.\n */\n root: PropTypes.string,\n /**\n * Style applied to the dot.\n */\n dot: PropTypes.string,\n /**\n * Style applied to the rail.\n */\n rail: PropTypes.string,\n /**\n * Style applied to the inner of the knob.\n */\n knobInner: PropTypes.string,\n /**\n * Style applied to the outside of the knob.\n */\n knobOuter: PropTypes.string,\n /**\n * Style applied when the knob is hidden.\n */\n knobHidden: PropTypes.string,\n /**\n * Style applied last hidden knob.\n */\n knobHiddenLast: PropTypes.string,\n /**\n * Style applied to the track.\n */\n track: PropTypes.string,\n /**\n * Style applied to the mark.\n */\n mark: PropTypes.string,\n /**\n * Style applied to the tooltip.\n */\n sliderTooltip: PropTypes.string,\n }).isRequired,\n\n theme: PropTypes.any.isRequired,\n};\n\nHvSlider.defaultProps = {\n markStep: 1,\n markDigits: 0,\n noOverlap: true,\n values: [],\n formatMark: (mark) => mark,\n formatTooltip: (mark) => mark,\n markProperties: [],\n divisionQuantity: 100,\n minPointValue: 0,\n maxPointValue: 100,\n onBeforeChange: () => {},\n onChange: () => {},\n onAfterChange: () => {},\n};\n\nexport default withStyles(styleCreator, { name: \"HvSlider\", withTheme: true })(HvSlider);\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AACA;AACA;AACA;AAEA,OAAOA,KAAP,MAAkB,OAAlB;AACA,OAAOC,SAAP,MAAsB,YAAtB;AACA,SAASC,KAAT,EAAgBC,MAAhB,QAA8B,WAA9B;AACA,OAAOC,OAAP,MAAoB,YAApB;AACA,SAASC,UAAT,QAA2B,mBAA3B;AACA,OAAOC,QAAP,MAAqB,YAArB;AACA,OAAO,4BAAP;AACA,OAAOC,YAAP,MAAyB,UAAzB;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AACA,IAAMC,+BAA+B,GAAG,SAAlCA,+BAAkC,CAACC,WAAD,EAAcC,aAAd,EAA6BC,gBAA7B;EAAA,OACtCC,IAAI,CAACC,KAAL,CAAW,CAACJ,WAAW,GAAGC,aAAf,IAAgCC,gBAA3C,CADsC;AAAA,CAAxC;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AACA,IAAMG,sBAAsB,GAAG,SAAzBA,sBAAyB,CAACC,MAAD,EAASJ,gBAAT,EAA2BD,aAA3B,EAA6C;EAC1E,IAAMM,cAAc,GAAG,EAAvB;EACAD,MAAM,CAACE,OAAP,CAAe,UAACC,KAAD,EAAQC,KAAR,EAAkB;IAC/BH,cAAc,CAACG,KAAD,CAAd,GAAwBX,+BAA+B,CAACU,KAAD,EAAQR,aAAR,EAAuBC,gBAAvB,CAAvD;EACD,CAFD;EAGA,OAAOK,cAAP;AACD,CAND;AAQA;AACA;AACA;AACA;AACA;AACA;AACA;;;AACA,IAAMI,kBAAkB,GAA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BAAgB,EAAE,GARI;EAStBZ,aAAa,EAAE,CATO;EAUtBW,aAAa,EAAE,GAVO;EAWtB2D,cAAc,EAAE,0BAAM,CAAE,CAXF;EAYtBJ,QAAQ,EAAE,oBAAM,CAAE,CAZI;EAatBK,aAAa,EAAE,yBAAM,CAAE;AAbD,CAAxB;AAgBA,eAAe5E,UAAU,CAACE,YAAD,EAAe;EAAE+G,IAAI,EAAE,UAAR;EAAoBC,SAAS,EAAE;AAA/B,CAAf,CAAV,CAAgE/F,QAAhE,CAAf"}
|
|
1
|
+
{"version":3,"file":"Slider.js","names":["React","PropTypes","Range","Handle","Tooltip","withStyles","KnobRing","styleCreator","scaledValueToKnobsPositionValue","scaledValue","minPointValue","inverseStepValue","Math","floor","transformKnobsPosition","values","knobsPositions","forEach","value","index","calculateStepValue","maxPointValue","divisionQuantity","abs","HvSlider","props","sliderValue","stepValue","markProperties","markstep","markDigits","formatMark","styles","marks","length","markProperty","position","label","style","mark","roundedMarkStep","labelValue","knobsPositionToScaledValue","toFixed","knobProperties","trackStyles","knobProperty","track","color","backgroundColor","trackColor","knobInner","knobOuterStyle","lastItem","knobOuter","hidden","knobHidden","knobHiddenLast","knobsCurrentPosition","newKnobsPosition","slice","knobsValues","noOverlap","state","duplicatedValue","findDuplicated","filter","item","indexOf","array","newArray","newPosition","previousValue","knobsPosition","knobs","generateKnobsPositionAndValues","onChange","defaultValues","fixed","setState","onBeforeChange","onAfterChange","formatTooltip","classes","dragging","restProps","knobValue","dragColor","sliderTooltip","hoverColor","markStep","theme","createTrackStyles","knobStyles","createKnobStyles","rangesCount","createMark","defaultKnobsPositions","createKnob","root","dot","onChangeHandler","onBeforeChangeHandler","onAfterChangeHandler","undefined","rail","Component","propTypes","arrayOf","number","isRequired","shape","string","defaultValue","bool","func","any","defaultProps","name","withTheme"],"sources":["../../../src/Slider/Slider.js"],"sourcesContent":["/**\n * Note: https://github.com/react-component/slider/issues/504\n * Version must remain in \"8.6.3\" until this bug is fixed\n */\n\nimport React from \"react\";\nimport PropTypes from \"prop-types\";\nimport { Range, Handle } from \"rc-slider\";\nimport Tooltip from \"rc-tooltip\";\nimport { withStyles } from \"@material-ui/core\";\nimport KnobRing from \"./KnobRing\";\nimport styleCreator from \"./styles\";\n\n/**\n * Transform the scaled values into knobs positions.\n *\n * @param {*} scaledValue - the value of the slider to be scaled\n * @param {*} minPointValue - The value of the first point in\n * the slider from left to right.\n * @param {*} inverseStepValue - The inverse of calculated separation between\n * the value of the points that compose the slider.\n */\nconst scaledValueToKnobsPositionValue = (scaledValue, minPointValue, inverseStepValue) =>\n Math.floor((scaledValue - minPointValue) * inverseStepValue);\n\n/**\n * Transform the received knobs values into knob positions\n *\n * @param {Object} values - The values of the slider.\n * @param {Number} inverseStepValue - The inverse of calculated separation between\n * the value of the points that compose the slider.\n * @param {Integer} minPointValue - The value of the first point in the slider from\n * left to right.\n * @returns {Array} - The position of the knobs.\n */\nconst transformKnobsPosition = (values, inverseStepValue, minPointValue) => {\n const knobsPositions = [];\n values.forEach((value, index) => {\n knobsPositions[index] = scaledValueToKnobsPositionValue(value, minPointValue, inverseStepValue);\n });\n return knobsPositions;\n};\n\n/**\n * Calculates the separation between each value in the slider.\n *\n * @param {*} maxPointValue - The value of the last point in the slider from left to right.\n * @param {*} minPointValue - The value of the first point in the slider from left to right.\n * @param {*} divisionQuantity - How many subdivisions there are in the slider.\n */\nconst calculateStepValue = (maxPointValue, minPointValue, divisionQuantity) =>\n Math.abs(maxPointValue - minPointValue) / divisionQuantity;\n\n/**\n * Sliders reflect a range of values along a bar, from which users may select a single value. They are ideal for adjusting settings such as volume, brightness, or applying image filters. Still in development\n */\nclass HvSlider extends React.Component {\n constructor(props) {\n super(props);\n\n const {\n markProperties,\n markStep,\n markDigits,\n knobProperties,\n values,\n defaultValues,\n theme,\n maxPointValue,\n minPointValue,\n divisionQuantity,\n formatMark,\n } = props;\n\n const styles = styleCreator(theme);\n const stepValue = calculateStepValue(maxPointValue, minPointValue, divisionQuantity);\n const inverseStepValue = 1 / stepValue;\n\n this.state = {\n knobsPositions: transformKnobsPosition(\n values.length > 0 ? values : defaultValues,\n inverseStepValue,\n minPointValue\n ),\n trackStyles: this.createTrackStyles(knobProperties, styles),\n knobStyles: this.createKnobStyles(knobProperties, styles),\n rangesCount: knobProperties.length - 1,\n marks: this.createMark(\n markProperties,\n markStep,\n divisionQuantity,\n minPointValue,\n stepValue,\n markDigits,\n formatMark,\n styles\n ),\n defaultKnobsPositions: transformKnobsPosition(defaultValues, inverseStepValue, minPointValue),\n styles,\n stepValue,\n inverseStepValue,\n };\n\n import(\"rc-slider/assets/index.css\");\n }\n\n static getDerivedStateFromProps(props, state) {\n const stepValue = calculateStepValue(\n props.maxPointValue,\n props.minPointValue,\n props.divisionQuantity\n );\n\n if (props.values.length > 0) {\n return {\n ...state,\n knobsPositions: transformKnobsPosition(\n props.values.length > 0 ? props.values : props.defaultValues,\n 1 / stepValue,\n props.minPointValue\n ),\n };\n }\n return null;\n }\n\n /**\n * Transform the scaled values into knobs positions.\n *\n * @param {*} sliderValue - the value of the slider to be scaled\n * @param {*} minPointValue - The value of the first point in the slider from left to right.\n * @param {*} stepValue - The calculated separation between the values of the slider.\n */\n knobsPositionToScaledValue = (sliderValue, minPointValue, stepValue) =>\n minPointValue + stepValue * sliderValue;\n\n /**\n * Generates the inline styles used for the track of each knob, applying colors if necessary.\n *\n * @param {Object} markProperties - The object provided by the user with\n * the desired configuration for the marks.\n * @param {Integer} markstep - The separation between marks.\n * @param {Integer} divisionQuantity - How many subdivisions there are in the slider.\n * @param {Integer} minPointValue - The value of the first point in the slider from\n * left to right.\n * @param {Integer} stepValue - The calculated separation between the values of the slider.\n * @param {Integer} markDigits - How many decimals the mark will show.\n * @param {Function} formatMark - A function provided by the user that is going to\n * be executed to format the mark text.\n * @param {Object} styles - the default styles for the marks.\n * @returns {Object} - An object with the for the marks.\n * @memberof HvSlider\n */\n createMark = (\n markProperties,\n markstep,\n divisionQuantity,\n minPointValue,\n stepValue,\n markDigits,\n formatMark,\n styles\n ) => {\n const marks = {};\n if (markProperties.length > 0) {\n markProperties.forEach((markProperty) => {\n marks[markProperty.position] = {\n label: `${markProperty.label}`,\n style: {\n ...styles.mark,\n },\n };\n });\n } else {\n const roundedMarkStep = Math.floor(markstep);\n for (let index = 0; index <= divisionQuantity; index += roundedMarkStep) {\n let labelValue = this.knobsPositionToScaledValue(index, minPointValue, stepValue).toFixed(\n markDigits\n );\n labelValue = formatMark(labelValue);\n marks[index] = {\n label: `${labelValue}`,\n style: {\n ...styles.mark,\n },\n };\n }\n }\n return marks;\n };\n\n /**\n * Generates the inline styles used for the track of each knob, applying colors if necessary.\n *\n * @param {Object} knobProperties - The object provided by the user with\n * the desired configuration for the knobs.\n * @param {Object} styles - the default styles for the tracks.\n * @returns {Object} - An object with the style for each track.\n * @memberof HvSlider\n */\n createTrackStyles = (knobProperties, styles) => {\n const trackStyles = [];\n if (knobProperties.length > 1) {\n knobProperties.forEach((knobProperty, index) => {\n trackStyles[index] = { ...styles.track };\n if (knobProperty.color) {\n trackStyles[index].backgroundColor = knobProperty.trackColor;\n }\n });\n }\n return trackStyles;\n };\n\n /**\n * Generates the inline styles used for each knob, applying colors if specified.\n *\n * @param {Object} knobProperties - The object provided by the user with\n * the desired configuration for the knobs.\n * @param {Object} styles - the default styles for the knobs.\n * @returns {Object} - An object with both the inner and outer styles for the knob.\n * @memberof HvSlider\n */\n createKnobStyles = (knobProperties, styles) => {\n const knobInner = [];\n const knobOuterStyle = [];\n\n const lastItem = knobProperties.length - 1;\n if (knobProperties.length > 1) {\n knobProperties.forEach((knobProperty, index) => {\n knobInner[index] = { ...styles.knobInner };\n knobOuterStyle[index] = { ...styles.knobOuter };\n\n if (knobProperty.color) {\n knobInner[index].backgroundColor = knobProperty.color;\n knobOuterStyle[index].backgroundColor = \"transparent\";\n }\n\n if (knobProperty.hidden) {\n knobInner[index] = styles.knobHidden;\n if (index === lastItem) {\n knobInner[index] = { ...styles.knobHiddenLast };\n knobInner[index].backgroundColor = knobProperty.color;\n knobOuterStyle[index] = { ...styles.knobHidden };\n knobOuterStyle[index].backgroundColor = knobProperty.color;\n }\n }\n });\n }\n\n return {\n knobInner,\n knobOuterStyle,\n };\n };\n\n /**\n * Generates an object which posses the current value and position of the knobs.\n *\n * @param {Array} knobsCurrentPosition - An array containing the current positions of the knobs.\n * @returns {Object} - An object with the positions and values of the knobs.\n * @memberof HvSlider\n */\n generateKnobsPositionAndValues = (knobsCurrentPosition) => {\n const newKnobsPosition = knobsCurrentPosition.slice();\n const knobsValues = [];\n const { minPointValue, noOverlap } = this.props;\n const { stepValue, knobsPositions } = this.state;\n\n let duplicatedValue = null;\n\n const findDuplicated = newKnobsPosition.filter(\n (item, index) => newKnobsPosition.indexOf(item) !== index\n );\n\n if (noOverlap && findDuplicated.length > 0) {\n [duplicatedValue] = findDuplicated;\n }\n newKnobsPosition.forEach((position, index, array) => {\n const newArray = array;\n let newPosition = position;\n\n if (noOverlap && newPosition === duplicatedValue) {\n const previousValue = knobsPositions[index];\n if (previousValue !== newPosition) {\n newPosition += newPosition > previousValue ? -1 : 1;\n newArray[index] = newPosition;\n }\n }\n\n knobsValues[index] = this.knobsPositionToScaledValue(newPosition, minPointValue, stepValue);\n }, this);\n\n return {\n knobsPosition: newKnobsPosition,\n knobsValues,\n };\n };\n\n /**\n * Function executed while the knobs changes.\n *\n * executes the callback provided by the user with the values and position of the knobs,\n * also lock the value of the knob in case one is fixed.\n *\n * @param {Array} knobsPosition - An array containing the current positions of the knobs.\n * @memberof HvSlider\n */\n onChangeHandler = (knobsPosition) => {\n const knobs = this.generateKnobsPositionAndValues(knobsPosition);\n const { knobProperties, onChange, minPointValue, defaultValues } = this.props;\n const { inverseStepValue } = this.state;\n knobProperties.forEach((knobProperty, index) => {\n if (knobProperty.fixed) {\n knobs.knobsPosition[index] = scaledValueToKnobsPositionValue(\n defaultValues[index],\n minPointValue,\n inverseStepValue\n );\n }\n });\n\n onChange(knobs);\n\n this.setState({\n knobsPositions: knobs.knobsPosition,\n });\n };\n\n /**\n * Function executed before a change.\n *\n * executes the callback provided by the user with the values and position of the knobs\n *\n * @param {Array} knobsPosition - An array containing the current positions of the knobs.\n * @memberof HvSlider\n */\n onBeforeChangeHandler = (knobsPosition) => {\n const { onBeforeChange } = this.props;\n const knobs = this.generateKnobsPositionAndValues(knobsPosition);\n onBeforeChange(knobs);\n };\n\n /**\n * Function executed after a change.\n *\n * executes the callback provided by the user with the values and position of the knobs\n *\n * @param {Array} knobsPosition - An array containing the current positions of the knobs.\n * @memberof HvSlider\n */\n onAfterChangeHandler = (knobsPosition) => {\n const { onAfterChange } = this.props;\n const knobs = this.generateKnobsPositionAndValues(knobsPosition);\n onAfterChange(knobs);\n };\n\n /**\n * Function used to create a custom knob for the slider.\n *\n * TODO: This should be isolated because is creating a sub component,\n * but there were some problems regarding the underlying component losing\n * references of the handlers disabling the focus.\n *\n * @param {Object} props - An object containing the properties of the knobs.\n * @memberof HvSlider\n */\n createKnob = (props) => {\n const { minPointValue, markDigits, knobProperties, formatTooltip, classes } = this.props;\n const { stepValue } = this.state;\n const { value, dragging, index, style, ...restProps } = props;\n\n const knobValue = this.knobsPositionToScaledValue(value, minPointValue, stepValue).toFixed(\n markDigits\n );\n if (dragging) {\n style.backgroundColor = knobProperties[index].dragColor;\n } else {\n style.backgroundColor = knobProperties[index].color;\n }\n\n return (\n <Tooltip\n prefixCls=\"rc-slider-tooltip\"\n overlay={formatTooltip(knobValue)}\n visible={dragging}\n placement=\"top\"\n key={index}\n overlayClassName={classes.sliderTooltip}\n >\n <Handle value={value} style={style} {...restProps}>\n <KnobRing hoverColor={knobProperties[index].hoverColor} dragging={dragging} />\n </Handle>\n </Tooltip>\n );\n };\n\n render() {\n const { divisionQuantity, classes } = this.props;\n\n const {\n knobsPositions,\n defaultKnobsPositions,\n rangesCount,\n knobStyles,\n trackStyles,\n marks,\n styles,\n } = this.state;\n\n return (\n <Range\n handle={this.createKnob}\n className={classes.root}\n min={0}\n max={divisionQuantity}\n step={1}\n marks={marks}\n dotStyle={styles.dot}\n onChange={this.onChangeHandler}\n onBeforeChange={this.onBeforeChangeHandler}\n onAfterChange={this.onAfterChangeHandler}\n value={knobsPositions.length > 0 ? knobsPositions : undefined}\n allowCross={false}\n defaultValue={defaultKnobsPositions}\n count={rangesCount}\n railStyle={styles.rail}\n handleStyle={knobStyles.knobInner}\n trackStyle={trackStyles}\n />\n );\n }\n}\n\nHvSlider.propTypes = {\n /**\n * The values array to apply to the component\n */\n values: PropTypes.arrayOf(PropTypes.number),\n /**\n * The default values array to apply to the component\n */\n defaultValues: PropTypes.arrayOf(PropTypes.number).isRequired,\n /**\n * The object used to set the knob properties,\n * for every item in the array a new knob will be created.\n */\n knobProperties: PropTypes.arrayOf(\n PropTypes.shape({\n color: PropTypes.string,\n defaultValue: PropTypes.number,\n hidden: PropTypes.bool,\n fixed: PropTypes.bool,\n hoverColor: PropTypes.string,\n trackColor: PropTypes.string,\n dragColor: PropTypes.string,\n })\n ).isRequired,\n /**\n * The object used to set the mark properties individually.\n */\n markProperties: PropTypes.arrayOf(\n PropTypes.shape({\n position: PropTypes.number,\n label: PropTypes.string,\n })\n ),\n /**\n * the function executed before a change will ocurr in the slider.\n * it will receive an object like\n * {\n * knobsPosition: [],\n * knobsValues: []\n * }\n */\n onBeforeChange: PropTypes.func,\n /**\n * the function executed while a change is ocurring in the slider.\n * it will receive an object like\n * {\n * knobsPosition: [],\n * knobsValues: []\n * }\n */\n onChange: PropTypes.func,\n /**\n * the function executed after a change ocurred in the slider.\n * it will receive an object like\n * {\n * knobsPosition: [],\n * knobsValues: []\n * }\n */\n onAfterChange: PropTypes.func,\n /**\n * the separation in points between marks.\n * example: if 10 divisions and a markstep of 2 there will be 5 marks.\n */\n markStep: PropTypes.number,\n /**\n * how many subdivisions there are in the slider.\n */\n divisionQuantity: PropTypes.number,\n /**\n * the value of the first point in the slider from left to right.\n */\n minPointValue: PropTypes.number,\n /**\n * the value of the last point in the slider from left to right.\n */\n maxPointValue: PropTypes.number,\n /**\n * the nax number of decimals if no format function is applied\n */\n markDigits: PropTypes.number,\n /**\n * a formatting function used to add format to the marks in the track,\n * the function receives the mark text\n */\n formatMark: PropTypes.func,\n /**\n * a formatting function used to add format to the tooltip in the track,\n * the function receives the mark text\n */\n formatTooltip: PropTypes.func,\n /**\n * if `true` the knobs can't have the same value, if `false` knobs can have the same value.\n */\n noOverlap: PropTypes.bool,\n /**\n * the classes object to be applied into the root object.\n */\n classes: PropTypes.shape({\n /**\n * Style applied to the root of the component.\n */\n root: PropTypes.string,\n /**\n * Style applied to the dot.\n */\n dot: PropTypes.string,\n /**\n * Style applied to the rail.\n */\n rail: PropTypes.string,\n /**\n * Style applied to the inner of the knob.\n */\n knobInner: PropTypes.string,\n /**\n * Style applied to the outside of the knob.\n */\n knobOuter: PropTypes.string,\n /**\n * Style applied when the knob is hidden.\n */\n knobHidden: PropTypes.string,\n /**\n * Style applied last hidden knob.\n */\n knobHiddenLast: PropTypes.string,\n /**\n * Style applied to the track.\n */\n track: PropTypes.string,\n /**\n * Style applied to the mark.\n */\n mark: PropTypes.string,\n /**\n * Style applied to the tooltip.\n */\n sliderTooltip: PropTypes.string,\n }).isRequired,\n\n theme: PropTypes.any.isRequired,\n};\n\nHvSlider.defaultProps = {\n markStep: 1,\n markDigits: 0,\n noOverlap: true,\n values: [],\n formatMark: (mark) => mark,\n formatTooltip: (mark) => mark,\n markProperties: [],\n divisionQuantity: 100,\n minPointValue: 0,\n maxPointValue: 100,\n onBeforeChange: () => {},\n onChange: () => {},\n onAfterChange: () => {},\n};\n\nexport default withStyles(styleCreator, { name: \"HvSlider\", withTheme: true })(HvSlider);\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AACA;AACA;AACA;AAEA,OAAOA,KAAP,MAAkB,OAAlB;AACA,OAAOC,SAAP,MAAsB,YAAtB;AACA,SAASC,KAAT,EAAgBC,MAAhB,QAA8B,WAA9B;AACA,OAAOC,OAAP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from "@material-ui/core";
|
|
20
20
|
import KnobRing from "./KnobRing";
|
|
21
|
-
import "rc-slider/assets/index.css";
|
|
22
21
|
import styleCreator from "./styles";
|
|
23
22
|
/**
|
|
24
23
|
* Transform the scaled values into knobs positions.
|
|
@@ -299,6 +298,7 @@ class HvSlider extends React.Component {
|
|
|
299
298
|
stepValue: _stepValue,
|
|
300
299
|
inverseStepValue: _inverseStepValue
|
|
301
300
|
};
|
|
301
|
+
import("rc-slider/assets/index.css");
|
|
302
302
|
}
|
|
303
303
|
|
|
304
304
|
static getDerivedStateFromProps(props, state) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Slider.js","names":["React","PropTypes","Range","Handle","Tooltip","withStyles","KnobRing","styleCreator","scaledValueToKnobsPositionValue","scaledValue","minPointValue","inverseStepValue","Math","floor","transformKnobsPosition","values","knobsPositions","forEach","value","index","calculateStepValue","maxPointValue","divisionQuantity","abs","HvSlider","Component","constructor","props","sliderValue","stepValue","markProperties","markstep","markDigits","formatMark","styles","marks","length","markProperty","position","label","style","mark","roundedMarkStep","labelValue","knobsPositionToScaledValue","toFixed","knobProperties","trackStyles","knobProperty","track","color","backgroundColor","trackColor","knobInner","knobOuterStyle","lastItem","knobOuter","hidden","knobHidden","knobHiddenLast","knobsCurrentPosition","newKnobsPosition","slice","knobsValues","noOverlap","state","duplicatedValue","findDuplicated","filter","item","indexOf","array","newArray","newPosition","previousValue","knobsPosition","knobs","generateKnobsPositionAndValues","onChange","defaultValues","fixed","setState","onBeforeChange","onAfterChange","formatTooltip","classes","dragging","restProps","knobValue","dragColor","sliderTooltip","hoverColor","markStep","theme","createTrackStyles","knobStyles","createKnobStyles","rangesCount","createMark","defaultKnobsPositions","getDerivedStateFromProps","render","createKnob","root","dot","onChangeHandler","onBeforeChangeHandler","onAfterChangeHandler","undefined","rail","propTypes","arrayOf","number","isRequired","shape","string","defaultValue","bool","func","any","defaultProps","name","withTheme"],"sources":["../../../src/Slider/Slider.js"],"sourcesContent":["/**\n * Note: https://github.com/react-component/slider/issues/504\n * Version must remain in \"8.6.3\" until this bug is fixed\n */\n\nimport React from \"react\";\nimport PropTypes from \"prop-types\";\nimport { Range, Handle } from \"rc-slider\";\nimport Tooltip from \"rc-tooltip\";\nimport { withStyles } from \"@material-ui/core\";\nimport KnobRing from \"./KnobRing\";\nimport \"rc-slider/assets/index.css\";\nimport styleCreator from \"./styles\";\n\n/**\n * Transform the scaled values into knobs positions.\n *\n * @param {*} scaledValue - the value of the slider to be scaled\n * @param {*} minPointValue - The value of the first point in\n * the slider from left to right.\n * @param {*} inverseStepValue - The inverse of calculated separation between\n * the value of the points that compose the slider.\n */\nconst scaledValueToKnobsPositionValue = (scaledValue, minPointValue, inverseStepValue) =>\n Math.floor((scaledValue - minPointValue) * inverseStepValue);\n\n/**\n * Transform the received knobs values into knob positions\n *\n * @param {Object} values - The values of the slider.\n * @param {Number} inverseStepValue - The inverse of calculated separation between\n * the value of the points that compose the slider.\n * @param {Integer} minPointValue - The value of the first point in the slider from\n * left to right.\n * @returns {Array} - The position of the knobs.\n */\nconst transformKnobsPosition = (values, inverseStepValue, minPointValue) => {\n const knobsPositions = [];\n values.forEach((value, index) => {\n knobsPositions[index] = scaledValueToKnobsPositionValue(value, minPointValue, inverseStepValue);\n });\n return knobsPositions;\n};\n\n/**\n * Calculates the separation between each value in the slider.\n *\n * @param {*} maxPointValue - The value of the last point in the slider from left to right.\n * @param {*} minPointValue - The value of the first point in the slider from left to right.\n * @param {*} divisionQuantity - How many subdivisions there are in the slider.\n */\nconst calculateStepValue = (maxPointValue, minPointValue, divisionQuantity) =>\n Math.abs(maxPointValue - minPointValue) / divisionQuantity;\n\n/**\n * Sliders reflect a range of values along a bar, from which users may select a single value. They are ideal for adjusting settings such as volume, brightness, or applying image filters. Still in development\n */\nclass HvSlider extends React.Component {\n constructor(props) {\n super(props);\n\n const {\n markProperties,\n markStep,\n markDigits,\n knobProperties,\n values,\n defaultValues,\n theme,\n maxPointValue,\n minPointValue,\n divisionQuantity,\n formatMark,\n } = props;\n\n const styles = styleCreator(theme);\n const stepValue = calculateStepValue(maxPointValue, minPointValue, divisionQuantity);\n const inverseStepValue = 1 / stepValue;\n\n this.state = {\n knobsPositions: transformKnobsPosition(\n values.length > 0 ? values : defaultValues,\n inverseStepValue,\n minPointValue\n ),\n trackStyles: this.createTrackStyles(knobProperties, styles),\n knobStyles: this.createKnobStyles(knobProperties, styles),\n rangesCount: knobProperties.length - 1,\n marks: this.createMark(\n markProperties,\n markStep,\n divisionQuantity,\n minPointValue,\n stepValue,\n markDigits,\n formatMark,\n styles\n ),\n defaultKnobsPositions: transformKnobsPosition(defaultValues, inverseStepValue, minPointValue),\n styles,\n stepValue,\n inverseStepValue,\n };\n }\n\n static getDerivedStateFromProps(props, state) {\n const stepValue = calculateStepValue(\n props.maxPointValue,\n props.minPointValue,\n props.divisionQuantity\n );\n\n if (props.values.length > 0) {\n return {\n ...state,\n knobsPositions: transformKnobsPosition(\n props.values.length > 0 ? props.values : props.defaultValues,\n 1 / stepValue,\n props.minPointValue\n ),\n };\n }\n return null;\n }\n\n /**\n * Transform the scaled values into knobs positions.\n *\n * @param {*} sliderValue - the value of the slider to be scaled\n * @param {*} minPointValue - The value of the first point in the slider from left to right.\n * @param {*} stepValue - The calculated separation between the values of the slider.\n */\n knobsPositionToScaledValue = (sliderValue, minPointValue, stepValue) =>\n minPointValue + stepValue * sliderValue;\n\n /**\n * Generates the inline styles used for the track of each knob, applying colors if necessary.\n *\n * @param {Object} markProperties - The object provided by the user with\n * the desired configuration for the marks.\n * @param {Integer} markstep - The separation between marks.\n * @param {Integer} divisionQuantity - How many subdivisions there are in the slider.\n * @param {Integer} minPointValue - The value of the first point in the slider from\n * left to right.\n * @param {Integer} stepValue - The calculated separation between the values of the slider.\n * @param {Integer} markDigits - How many decimals the mark will show.\n * @param {Function} formatMark - A function provided by the user that is going to\n * be executed to format the mark text.\n * @param {Object} styles - the default styles for the marks.\n * @returns {Object} - An object with the for the marks.\n * @memberof HvSlider\n */\n createMark = (\n markProperties,\n markstep,\n divisionQuantity,\n minPointValue,\n stepValue,\n markDigits,\n formatMark,\n styles\n ) => {\n const marks = {};\n if (markProperties.length > 0) {\n markProperties.forEach((markProperty) => {\n marks[markProperty.position] = {\n label: `${markProperty.label}`,\n style: {\n ...styles.mark,\n },\n };\n });\n } else {\n const roundedMarkStep = Math.floor(markstep);\n for (let index = 0; index <= divisionQuantity; index += roundedMarkStep) {\n let labelValue = this.knobsPositionToScaledValue(index, minPointValue, stepValue).toFixed(\n markDigits\n );\n labelValue = formatMark(labelValue);\n marks[index] = {\n label: `${labelValue}`,\n style: {\n ...styles.mark,\n },\n };\n }\n }\n return marks;\n };\n\n /**\n * Generates the inline styles used for the track of each knob, applying colors if necessary.\n *\n * @param {Object} knobProperties - The object provided by the user with\n * the desired configuration for the knobs.\n * @param {Object} styles - the default styles for the tracks.\n * @returns {Object} - An object with the style for each track.\n * @memberof HvSlider\n */\n createTrackStyles = (knobProperties, styles) => {\n const trackStyles = [];\n if (knobProperties.length > 1) {\n knobProperties.forEach((knobProperty, index) => {\n trackStyles[index] = { ...styles.track };\n if (knobProperty.color) {\n trackStyles[index].backgroundColor = knobProperty.trackColor;\n }\n });\n }\n return trackStyles;\n };\n\n /**\n * Generates the inline styles used for each knob, applying colors if specified.\n *\n * @param {Object} knobProperties - The object provided by the user with\n * the desired configuration for the knobs.\n * @param {Object} styles - the default styles for the knobs.\n * @returns {Object} - An object with both the inner and outer styles for the knob.\n * @memberof HvSlider\n */\n createKnobStyles = (knobProperties, styles) => {\n const knobInner = [];\n const knobOuterStyle = [];\n\n const lastItem = knobProperties.length - 1;\n if (knobProperties.length > 1) {\n knobProperties.forEach((knobProperty, index) => {\n knobInner[index] = { ...styles.knobInner };\n knobOuterStyle[index] = { ...styles.knobOuter };\n\n if (knobProperty.color) {\n knobInner[index].backgroundColor = knobProperty.color;\n knobOuterStyle[index].backgroundColor = \"transparent\";\n }\n\n if (knobProperty.hidden) {\n knobInner[index] = styles.knobHidden;\n if (index === lastItem) {\n knobInner[index] = { ...styles.knobHiddenLast };\n knobInner[index].backgroundColor = knobProperty.color;\n knobOuterStyle[index] = { ...styles.knobHidden };\n knobOuterStyle[index].backgroundColor = knobProperty.color;\n }\n }\n });\n }\n\n return {\n knobInner,\n knobOuterStyle,\n };\n };\n\n /**\n * Generates an object which posses the current value and position of the knobs.\n *\n * @param {Array} knobsCurrentPosition - An array containing the current positions of the knobs.\n * @returns {Object} - An object with the positions and values of the knobs.\n * @memberof HvSlider\n */\n generateKnobsPositionAndValues = (knobsCurrentPosition) => {\n const newKnobsPosition = knobsCurrentPosition.slice();\n const knobsValues = [];\n const { minPointValue, noOverlap } = this.props;\n const { stepValue, knobsPositions } = this.state;\n\n let duplicatedValue = null;\n\n const findDuplicated = newKnobsPosition.filter(\n (item, index) => newKnobsPosition.indexOf(item) !== index\n );\n\n if (noOverlap && findDuplicated.length > 0) {\n [duplicatedValue] = findDuplicated;\n }\n newKnobsPosition.forEach((position, index, array) => {\n const newArray = array;\n let newPosition = position;\n\n if (noOverlap && newPosition === duplicatedValue) {\n const previousValue = knobsPositions[index];\n if (previousValue !== newPosition) {\n newPosition += newPosition > previousValue ? -1 : 1;\n newArray[index] = newPosition;\n }\n }\n\n knobsValues[index] = this.knobsPositionToScaledValue(newPosition, minPointValue, stepValue);\n }, this);\n\n return {\n knobsPosition: newKnobsPosition,\n knobsValues,\n };\n };\n\n /**\n * Function executed while the knobs changes.\n *\n * executes the callback provided by the user with the values and position of the knobs,\n * also lock the value of the knob in case one is fixed.\n *\n * @param {Array} knobsPosition - An array containing the current positions of the knobs.\n * @memberof HvSlider\n */\n onChangeHandler = (knobsPosition) => {\n const knobs = this.generateKnobsPositionAndValues(knobsPosition);\n const { knobProperties, onChange, minPointValue, defaultValues } = this.props;\n const { inverseStepValue } = this.state;\n knobProperties.forEach((knobProperty, index) => {\n if (knobProperty.fixed) {\n knobs.knobsPosition[index] = scaledValueToKnobsPositionValue(\n defaultValues[index],\n minPointValue,\n inverseStepValue\n );\n }\n });\n\n onChange(knobs);\n\n this.setState({\n knobsPositions: knobs.knobsPosition,\n });\n };\n\n /**\n * Function executed before a change.\n *\n * executes the callback provided by the user with the values and position of the knobs\n *\n * @param {Array} knobsPosition - An array containing the current positions of the knobs.\n * @memberof HvSlider\n */\n onBeforeChangeHandler = (knobsPosition) => {\n const { onBeforeChange } = this.props;\n const knobs = this.generateKnobsPositionAndValues(knobsPosition);\n onBeforeChange(knobs);\n };\n\n /**\n * Function executed after a change.\n *\n * executes the callback provided by the user with the values and position of the knobs\n *\n * @param {Array} knobsPosition - An array containing the current positions of the knobs.\n * @memberof HvSlider\n */\n onAfterChangeHandler = (knobsPosition) => {\n const { onAfterChange } = this.props;\n const knobs = this.generateKnobsPositionAndValues(knobsPosition);\n onAfterChange(knobs);\n };\n\n /**\n * Function used to create a custom knob for the slider.\n *\n * TODO: This should be isolated because is creating a sub component,\n * but there were some problems regarding the underlying component losing\n * references of the handlers disabling the focus.\n *\n * @param {Object} props - An object containing the properties of the knobs.\n * @memberof HvSlider\n */\n createKnob = (props) => {\n const { minPointValue, markDigits, knobProperties, formatTooltip, classes } = this.props;\n const { stepValue } = this.state;\n const { value, dragging, index, style, ...restProps } = props;\n\n const knobValue = this.knobsPositionToScaledValue(value, minPointValue, stepValue).toFixed(\n markDigits\n );\n if (dragging) {\n style.backgroundColor = knobProperties[index].dragColor;\n } else {\n style.backgroundColor = knobProperties[index].color;\n }\n\n return (\n <Tooltip\n prefixCls=\"rc-slider-tooltip\"\n overlay={formatTooltip(knobValue)}\n visible={dragging}\n placement=\"top\"\n key={index}\n overlayClassName={classes.sliderTooltip}\n >\n <Handle value={value} style={style} {...restProps}>\n <KnobRing hoverColor={knobProperties[index].hoverColor} dragging={dragging} />\n </Handle>\n </Tooltip>\n );\n };\n\n render() {\n const { divisionQuantity, classes } = this.props;\n\n const {\n knobsPositions,\n defaultKnobsPositions,\n rangesCount,\n knobStyles,\n trackStyles,\n marks,\n styles,\n } = this.state;\n\n return (\n <Range\n handle={this.createKnob}\n className={classes.root}\n min={0}\n max={divisionQuantity}\n step={1}\n marks={marks}\n dotStyle={styles.dot}\n onChange={this.onChangeHandler}\n onBeforeChange={this.onBeforeChangeHandler}\n onAfterChange={this.onAfterChangeHandler}\n value={knobsPositions.length > 0 ? knobsPositions : undefined}\n allowCross={false}\n defaultValue={defaultKnobsPositions}\n count={rangesCount}\n railStyle={styles.rail}\n handleStyle={knobStyles.knobInner}\n trackStyle={trackStyles}\n />\n );\n }\n}\n\nHvSlider.propTypes = {\n /**\n * The values array to apply to the component\n */\n values: PropTypes.arrayOf(PropTypes.number),\n /**\n * The default values array to apply to the component\n */\n defaultValues: PropTypes.arrayOf(PropTypes.number).isRequired,\n /**\n * The object used to set the knob properties,\n * for every item in the array a new knob will be created.\n */\n knobProperties: PropTypes.arrayOf(\n PropTypes.shape({\n color: PropTypes.string,\n defaultValue: PropTypes.number,\n hidden: PropTypes.bool,\n fixed: PropTypes.bool,\n hoverColor: PropTypes.string,\n trackColor: PropTypes.string,\n dragColor: PropTypes.string,\n })\n ).isRequired,\n /**\n * The object used to set the mark properties individually.\n */\n markProperties: PropTypes.arrayOf(\n PropTypes.shape({\n position: PropTypes.number,\n label: PropTypes.string,\n })\n ),\n /**\n * the function executed before a change will ocurr in the slider.\n * it will receive an object like\n * {\n * knobsPosition: [],\n * knobsValues: []\n * }\n */\n onBeforeChange: PropTypes.func,\n /**\n * the function executed while a change is ocurring in the slider.\n * it will receive an object like\n * {\n * knobsPosition: [],\n * knobsValues: []\n * }\n */\n onChange: PropTypes.func,\n /**\n * the function executed after a change ocurred in the slider.\n * it will receive an object like\n * {\n * knobsPosition: [],\n * knobsValues: []\n * }\n */\n onAfterChange: PropTypes.func,\n /**\n * the separation in points between marks.\n * example: if 10 divisions and a markstep of 2 there will be 5 marks.\n */\n markStep: PropTypes.number,\n /**\n * how many subdivisions there are in the slider.\n */\n divisionQuantity: PropTypes.number,\n /**\n * the value of the first point in the slider from left to right.\n */\n minPointValue: PropTypes.number,\n /**\n * the value of the last point in the slider from left to right.\n */\n maxPointValue: PropTypes.number,\n /**\n * the nax number of decimals if no format function is applied\n */\n markDigits: PropTypes.number,\n /**\n * a formatting function used to add format to the marks in the track,\n * the function receives the mark text\n */\n formatMark: PropTypes.func,\n /**\n * a formatting function used to add format to the tooltip in the track,\n * the function receives the mark text\n */\n formatTooltip: PropTypes.func,\n /**\n * if `true` the knobs can't have the same value, if `false` knobs can have the same value.\n */\n noOverlap: PropTypes.bool,\n /**\n * the classes object to be applied into the root object.\n */\n classes: PropTypes.shape({\n /**\n * Style applied to the root of the component.\n */\n root: PropTypes.string,\n /**\n * Style applied to the dot.\n */\n dot: PropTypes.string,\n /**\n * Style applied to the rail.\n */\n rail: PropTypes.string,\n /**\n * Style applied to the inner of the knob.\n */\n knobInner: PropTypes.string,\n /**\n * Style applied to the outside of the knob.\n */\n knobOuter: PropTypes.string,\n /**\n * Style applied when the knob is hidden.\n */\n knobHidden: PropTypes.string,\n /**\n * Style applied last hidden knob.\n */\n knobHiddenLast: PropTypes.string,\n /**\n * Style applied to the track.\n */\n track: PropTypes.string,\n /**\n * Style applied to the mark.\n */\n mark: PropTypes.string,\n /**\n * Style applied to the tooltip.\n */\n sliderTooltip: PropTypes.string,\n }).isRequired,\n\n theme: PropTypes.any.isRequired,\n};\n\nHvSlider.defaultProps = {\n markStep: 1,\n markDigits: 0,\n noOverlap: true,\n values: [],\n formatMark: (mark) => mark,\n formatTooltip: (mark) => mark,\n markProperties: [],\n divisionQuantity: 100,\n minPointValue: 0,\n maxPointValue: 100,\n onBeforeChange: () => {},\n onChange: () => {},\n onAfterChange: () => {},\n};\n\nexport default withStyles(styleCreator, { name: \"HvSlider\", withTheme: true })(HvSlider);\n"],"mappings":";;;;;;;;;;AAAA;AACA;AACA;AACA;AAEA,OAAOA,KAAP,MAAkB,OAAlB;AACA,OAAOC,SAAP,MAAsB,YAAtB;AACA,SAASC,KAAT,EAAg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E,YAAD,EAAe;EAAEkH,IAAI,EAAE,UAAR;EAAoBC,SAAS,EAAE;AAA/B,CAAf,CAAV,CAAgElG,QAAhE,CAAf"}
|
|
1
|
+
{"version":3,"file":"Slider.js","names":["React","PropTypes","Range","Handle","Tooltip","withStyles","KnobRing","styleCreator","scaledValueToKnobsPositionValue","scaledValue","minPointValue","inverseStepValue","Math","floor","transformKnobsPosition","values","knobsPositions","forEach","value","index","calculateStepValue","maxPointValue","divisionQuantity","abs","HvSlider","Component","constructor","props","sliderValue","stepValue","markProperties","markstep","markDigits","formatMark","styles","marks","length","markProperty","position","label","style","mark","roundedMarkStep","labelValue","knobsPositionToScaledValue","toFixed","knobProperties","trackStyles","knobProperty","track","color","backgroundColor","trackColor","knobInner","knobOuterStyle","lastItem","knobOuter","hidden","knobHidden","knobHiddenLast","knobsCurrentPosition","newKnobsPosition","slice","knobsValues","noOverlap","state","duplicatedValue","findDuplicated","filter","item","indexOf","array","newArray","newPosition","previousValue","knobsPosition","knobs","generateKnobsPositionAndValues","onChange","defaultValues","fixed","setState","onBeforeChange","onAfterChange","formatTooltip","classes","dragging","restProps","knobValue","dragColor","sliderTooltip","hoverColor","markStep","theme","createTrackStyles","knobStyles","createKnobStyles","rangesCount","createMark","defaultKnobsPositions","getDerivedStateFromProps","render","createKnob","root","dot","onChangeHandler","onBeforeChangeHandler","onAfterChangeHandler","undefined","rail","propTypes","arrayOf","number","isRequired","shape","string","defaultValue","bool","func","any","defaultProps","name","withTheme"],"sources":["../../../src/Slider/Slider.js"],"sourcesContent":["/**\n * Note: https://github.com/react-component/slider/issues/504\n * Version must remain in \"8.6.3\" until this bug is fixed\n */\n\nimport React from \"react\";\nimport PropTypes from \"prop-types\";\nimport { Range, Handle } from \"rc-slider\";\nimport Tooltip from \"rc-tooltip\";\nimport { withStyles } from \"@material-ui/core\";\nimport KnobRing from \"./KnobRing\";\nimport styleCreator from \"./styles\";\n\n/**\n * Transform the scaled values into knobs positions.\n *\n * @param {*} scaledValue - the value of the slider to be scaled\n * @param {*} minPointValue - The value of the first point in\n * the slider from left to right.\n * @param {*} inverseStepValue - The inverse of calculated separation between\n * the value of the points that compose the slider.\n */\nconst scaledValueToKnobsPositionValue = (scaledValue, minPointValue, inverseStepValue) =>\n Math.floor((scaledValue - minPointValue) * inverseStepValue);\n\n/**\n * Transform the received knobs values into knob positions\n *\n * @param {Object} values - The values of the slider.\n * @param {Number} inverseStepValue - The inverse of calculated separation between\n * the value of the points that compose the slider.\n * @param {Integer} minPointValue - The value of the first point in the slider from\n * left to right.\n * @returns {Array} - The position of the knobs.\n */\nconst transformKnobsPosition = (values, inverseStepValue, minPointValue) => {\n const knobsPositions = [];\n values.forEach((value, index) => {\n knobsPositions[index] = scaledValueToKnobsPositionValue(value, minPointValue, inverseStepValue);\n });\n return knobsPositions;\n};\n\n/**\n * Calculates the separation between each value in the slider.\n *\n * @param {*} maxPointValue - The value of the last point in the slider from left to right.\n * @param {*} minPointValue - The value of the first point in the slider from left to right.\n * @param {*} divisionQuantity - How many subdivisions there are in the slider.\n */\nconst calculateStepValue = (maxPointValue, minPointValue, divisionQuantity) =>\n Math.abs(maxPointValue - minPointValue) / divisionQuantity;\n\n/**\n * Sliders reflect a range of values along a bar, from which users may select a single value. They are ideal for adjusting settings such as volume, brightness, or applying image filters. Still in development\n */\nclass HvSlider extends React.Component {\n constructor(props) {\n super(props);\n\n const {\n markProperties,\n markStep,\n markDigits,\n knobProperties,\n values,\n defaultValues,\n theme,\n maxPointValue,\n minPointValue,\n divisionQuantity,\n formatMark,\n } = props;\n\n const styles = styleCreator(theme);\n const stepValue = calculateStepValue(maxPointValue, minPointValue, divisionQuantity);\n const inverseStepValue = 1 / stepValue;\n\n this.state = {\n knobsPositions: transformKnobsPosition(\n values.length > 0 ? values : defaultValues,\n inverseStepValue,\n minPointValue\n ),\n trackStyles: this.createTrackStyles(knobProperties, styles),\n knobStyles: this.createKnobStyles(knobProperties, styles),\n rangesCount: knobProperties.length - 1,\n marks: this.createMark(\n markProperties,\n markStep,\n divisionQuantity,\n minPointValue,\n stepValue,\n markDigits,\n formatMark,\n styles\n ),\n defaultKnobsPositions: transformKnobsPosition(defaultValues, inverseStepValue, minPointValue),\n styles,\n stepValue,\n inverseStepValue,\n };\n\n import(\"rc-slider/assets/index.css\");\n }\n\n static getDerivedStateFromProps(props, state) {\n const stepValue = calculateStepValue(\n props.maxPointValue,\n props.minPointValue,\n props.divisionQuantity\n );\n\n if (props.values.length > 0) {\n return {\n ...state,\n knobsPositions: transformKnobsPosition(\n props.values.length > 0 ? props.values : props.defaultValues,\n 1 / stepValue,\n props.minPointValue\n ),\n };\n }\n return null;\n }\n\n /**\n * Transform the scaled values into knobs positions.\n *\n * @param {*} sliderValue - the value of the slider to be scaled\n * @param {*} minPointValue - The value of the first point in the slider from left to right.\n * @param {*} stepValue - The calculated separation between the values of the slider.\n */\n knobsPositionToScaledValue = (sliderValue, minPointValue, stepValue) =>\n minPointValue + stepValue * sliderValue;\n\n /**\n * Generates the inline styles used for the track of each knob, applying colors if necessary.\n *\n * @param {Object} markProperties - The object provided by the user with\n * the desired configuration for the marks.\n * @param {Integer} markstep - The separation between marks.\n * @param {Integer} divisionQuantity - How many subdivisions there are in the slider.\n * @param {Integer} minPointValue - The value of the first point in the slider from\n * left to right.\n * @param {Integer} stepValue - The calculated separation between the values of the slider.\n * @param {Integer} markDigits - How many decimals the mark will show.\n * @param {Function} formatMark - A function provided by the user that is going to\n * be executed to format the mark text.\n * @param {Object} styles - the default styles for the marks.\n * @returns {Object} - An object with the for the marks.\n * @memberof HvSlider\n */\n createMark = (\n markProperties,\n markstep,\n divisionQuantity,\n minPointValue,\n stepValue,\n markDigits,\n formatMark,\n styles\n ) => {\n const marks = {};\n if (markProperties.length > 0) {\n markProperties.forEach((markProperty) => {\n marks[markProperty.position] = {\n label: `${markProperty.label}`,\n style: {\n ...styles.mark,\n },\n };\n });\n } else {\n const roundedMarkStep = Math.floor(markstep);\n for (let index = 0; index <= divisionQuantity; index += roundedMarkStep) {\n let labelValue = this.knobsPositionToScaledValue(index, minPointValue, stepValue).toFixed(\n markDigits\n );\n labelValue = formatMark(labelValue);\n marks[index] = {\n label: `${labelValue}`,\n style: {\n ...styles.mark,\n },\n };\n }\n }\n return marks;\n };\n\n /**\n * Generates the inline styles used for the track of each knob, applying colors if necessary.\n *\n * @param {Object} knobProperties - The object provided by the user with\n * the desired configuration for the knobs.\n * @param {Object} styles - the default styles for the tracks.\n * @returns {Object} - An object with the style for each track.\n * @memberof HvSlider\n */\n createTrackStyles = (knobProperties, styles) => {\n const trackStyles = [];\n if (knobProperties.length > 1) {\n knobProperties.forEach((knobProperty, index) => {\n trackStyles[index] = { ...styles.track };\n if (knobProperty.color) {\n trackStyles[index].backgroundColor = knobProperty.trackColor;\n }\n });\n }\n return trackStyles;\n };\n\n /**\n * Generates the inline styles used for each knob, applying colors if specified.\n *\n * @param {Object} knobProperties - The object provided by the user with\n * the desired configuration for the knobs.\n * @param {Object} styles - the default styles for the knobs.\n * @returns {Object} - An object with both the inner and outer styles for the knob.\n * @memberof HvSlider\n */\n createKnobStyles = (knobProperties, styles) => {\n const knobInner = [];\n const knobOuterStyle = [];\n\n const lastItem = knobProperties.length - 1;\n if (knobProperties.length > 1) {\n knobProperties.forEach((knobProperty, index) => {\n knobInner[index] = { ...styles.knobInner };\n knobOuterStyle[index] = { ...styles.knobOuter };\n\n if (knobProperty.color) {\n knobInner[index].backgroundColor = knobProperty.color;\n knobOuterStyle[index].backgroundColor = \"transparent\";\n }\n\n if (knobProperty.hidden) {\n knobInner[index] = styles.knobHidden;\n if (index === lastItem) {\n knobInner[index] = { ...styles.knobHiddenLast };\n knobInner[index].backgroundColor = knobProperty.color;\n knobOuterStyle[index] = { ...styles.knobHidden };\n knobOuterStyle[index].backgroundColor = knobProperty.color;\n }\n }\n });\n }\n\n return {\n knobInner,\n knobOuterStyle,\n };\n };\n\n /**\n * Generates an object which posses the current value and position of the knobs.\n *\n * @param {Array} knobsCurrentPosition - An array containing the current positions of the knobs.\n * @returns {Object} - An object with the positions and values of the knobs.\n * @memberof HvSlider\n */\n generateKnobsPositionAndValues = (knobsCurrentPosition) => {\n const newKnobsPosition = knobsCurrentPosition.slice();\n const knobsValues = [];\n const { minPointValue, noOverlap } = this.props;\n const { stepValue, knobsPositions } = this.state;\n\n let duplicatedValue = null;\n\n const findDuplicated = newKnobsPosition.filter(\n (item, index) => newKnobsPosition.indexOf(item) !== index\n );\n\n if (noOverlap && findDuplicated.length > 0) {\n [duplicatedValue] = findDuplicated;\n }\n newKnobsPosition.forEach((position, index, array) => {\n const newArray = array;\n let newPosition = position;\n\n if (noOverlap && newPosition === duplicatedValue) {\n const previousValue = knobsPositions[index];\n if (previousValue !== newPosition) {\n newPosition += newPosition > previousValue ? -1 : 1;\n newArray[index] = newPosition;\n }\n }\n\n knobsValues[index] = this.knobsPositionToScaledValue(newPosition, minPointValue, stepValue);\n }, this);\n\n return {\n knobsPosition: newKnobsPosition,\n knobsValues,\n };\n };\n\n /**\n * Function executed while the knobs changes.\n *\n * executes the callback provided by the user with the values and position of the knobs,\n * also lock the value of the knob in case one is fixed.\n *\n * @param {Array} knobsPosition - An array containing the current positions of the knobs.\n * @memberof HvSlider\n */\n onChangeHandler = (knobsPosition) => {\n const knobs = this.generateKnobsPositionAndValues(knobsPosition);\n const { knobProperties, onChange, minPointValue, defaultValues } = this.props;\n const { inverseStepValue } = this.state;\n knobProperties.forEach((knobProperty, index) => {\n if (knobProperty.fixed) {\n knobs.knobsPosition[index] = scaledValueToKnobsPositionValue(\n defaultValues[index],\n minPointValue,\n inverseStepValue\n );\n }\n });\n\n onChange(knobs);\n\n this.setState({\n knobsPositions: knobs.knobsPosition,\n });\n };\n\n /**\n * Function executed before a change.\n *\n * executes the callback provided by the user with the values and position of the knobs\n *\n * @param {Array} knobsPosition - An array containing the current positions of the knobs.\n * @memberof HvSlider\n */\n onBeforeChangeHandler = (knobsPosition) => {\n const { onBeforeChange } = this.props;\n const knobs = this.generateKnobsPositionAndValues(knobsPosition);\n onBeforeChange(knobs);\n };\n\n /**\n * Function executed after a change.\n *\n * executes the callback provided by the user with the values and position of the knobs\n *\n * @param {Array} knobsPosition - An array containing the current positions of the knobs.\n * @memberof HvSlider\n */\n onAfterChangeHandler = (knobsPosition) => {\n const { onAfterChange } = this.props;\n const knobs = this.generateKnobsPositionAndValues(knobsPosition);\n onAfterChange(knobs);\n };\n\n /**\n * Function used to create a custom knob for the slider.\n *\n * TODO: This should be isolated because is creating a sub component,\n * but there were some problems regarding the underlying component losing\n * references of the handlers disabling the focus.\n *\n * @param {Object} props - An object containing the properties of the knobs.\n * @memberof HvSlider\n */\n createKnob = (props) => {\n const { minPointValue, markDigits, knobProperties, formatTooltip, classes } = this.props;\n const { stepValue } = this.state;\n const { value, dragging, index, style, ...restProps } = props;\n\n const knobValue = this.knobsPositionToScaledValue(value, minPointValue, stepValue).toFixed(\n markDigits\n );\n if (dragging) {\n style.backgroundColor = knobProperties[index].dragColor;\n } else {\n style.backgroundColor = knobProperties[index].color;\n }\n\n return (\n <Tooltip\n prefixCls=\"rc-slider-tooltip\"\n overlay={formatTooltip(knobValue)}\n visible={dragging}\n placement=\"top\"\n key={index}\n overlayClassName={classes.sliderTooltip}\n >\n <Handle value={value} style={style} {...restProps}>\n <KnobRing hoverColor={knobProperties[index].hoverColor} dragging={dragging} />\n </Handle>\n </Tooltip>\n );\n };\n\n render() {\n const { divisionQuantity, classes } = this.props;\n\n const {\n knobsPositions,\n defaultKnobsPositions,\n rangesCount,\n knobStyles,\n trackStyles,\n marks,\n styles,\n } = this.state;\n\n return (\n <Range\n handle={this.createKnob}\n className={classes.root}\n min={0}\n max={divisionQuantity}\n step={1}\n marks={marks}\n dotStyle={styles.dot}\n onChange={this.onChangeHandler}\n onBeforeChange={this.onBeforeChangeHandler}\n onAfterChange={this.onAfterChangeHandler}\n value={knobsPositions.length > 0 ? knobsPositions : undefined}\n allowCross={false}\n defaultValue={defaultKnobsPositions}\n count={rangesCount}\n railStyle={styles.rail}\n handleStyle={knobStyles.knobInner}\n trackStyle={trackStyles}\n />\n );\n }\n}\n\nHvSlider.propTypes = {\n /**\n * The values array to apply to the component\n */\n values: PropTypes.arrayOf(PropTypes.number),\n /**\n * The default values array to apply to the component\n */\n defaultValues: PropTypes.arrayOf(PropTypes.number).isRequired,\n /**\n * The object used to set the knob properties,\n * for every item in the array a new knob will be created.\n */\n knobProperties: PropTypes.arrayOf(\n PropTypes.shape({\n color: PropTypes.string,\n defaultValue: PropTypes.number,\n hidden: PropTypes.bool,\n fixed: PropTypes.bool,\n hoverColor: PropTypes.string,\n trackColor: PropTypes.string,\n dragColor: PropTypes.string,\n })\n ).isRequired,\n /**\n * The object used to set the mark properties individually.\n */\n markProperties: PropTypes.arrayOf(\n PropTypes.shape({\n position: PropTypes.number,\n label: PropTypes.string,\n })\n ),\n /**\n * the function executed before a change will ocurr in the slider.\n * it will receive an object like\n * {\n * knobsPosition: [],\n * knobsValues: []\n * }\n */\n onBeforeChange: PropTypes.func,\n /**\n * the function executed while a change is ocurring in the slider.\n * it will receive an object like\n * {\n * knobsPosition: [],\n * knobsValues: []\n * }\n */\n onChange: PropTypes.func,\n /**\n * the function executed after a change ocurred in the slider.\n * it will receive an object like\n * {\n * knobsPosition: [],\n * knobsValues: []\n * }\n */\n onAfterChange: PropTypes.func,\n /**\n * the separation in points between marks.\n * example: if 10 divisions and a markstep of 2 there will be 5 marks.\n */\n markStep: PropTypes.number,\n /**\n * how many subdivisions there are in the slider.\n */\n divisionQuantity: PropTypes.number,\n /**\n * the value of the first point in the slider from left to right.\n */\n minPointValue: PropTypes.number,\n /**\n * the value of the last point in the slider from left to right.\n */\n maxPointValue: PropTypes.number,\n /**\n * the nax number of decimals if no format function is applied\n */\n markDigits: PropTypes.number,\n /**\n * a formatting function used to add format to the marks in the track,\n * the function receives the mark text\n */\n formatMark: PropTypes.func,\n /**\n * a formatting function used to add format to the tooltip in the track,\n * the function receives the mark text\n */\n formatTooltip: PropTypes.func,\n /**\n * if `true` the knobs can't have the same value, if `false` knobs can have the same value.\n */\n noOverlap: PropTypes.bool,\n /**\n * the classes object to be applied into the root object.\n */\n classes: PropTypes.shape({\n /**\n * Style applied to the root of the component.\n */\n root: PropTypes.string,\n /**\n * Style applied to the dot.\n */\n dot: PropTypes.string,\n /**\n * Style applied to the rail.\n */\n rail: PropTypes.string,\n /**\n * Style applied to the inner of the knob.\n */\n knobInner: PropTypes.string,\n /**\n * Style applied to the outside of the knob.\n */\n knobOuter: PropTypes.string,\n /**\n * Style applied when the knob is hidden.\n */\n knobHidden: PropTypes.string,\n /**\n * Style applied last hidden knob.\n */\n knobHiddenLast: PropTypes.string,\n /**\n * Style applied to the track.\n */\n track: PropTypes.string,\n /**\n * Style applied to the mark.\n */\n mark: PropTypes.string,\n /**\n * Style applied to the tooltip.\n */\n sliderTooltip: PropTypes.string,\n }).isRequired,\n\n theme: PropTypes.any.isRequired,\n};\n\nHvSlider.defaultProps = {\n markStep: 1,\n markDigits: 0,\n noOverlap: true,\n values: [],\n formatMark: (mark) => mark,\n formatTooltip: (mark) => mark,\n markProperties: [],\n divisionQuantity: 100,\n minPointValue: 0,\n maxPointValue: 100,\n onBeforeChange: () => {},\n onChange: () => {},\n onAfterChange: () => {},\n};\n\nexport default withStyles(styleCreator, { name: \"HvSlider\", withTheme: true })(HvSlider);\n"],"mappings":";;;;;;;;;;AAAA;AACA;AACA;AACA;AAEA,OAAOA,KAAP,MAAkB,OAAlB;AACA,OAAOC,SAAP,MAAsB,YAAtB;AACA,SAASC,KAAT,EAAgBC,MAAhB,QAA8B,WAA9B;AACA,OAAOC,OAAP,MAAoB,YAApB;AACA,SAASC,UAAT,QAA2B,mBAA3B;AACA,OAAOC,QAAP,MAAqB,YAArB;AACA,OAAOC,YAAP,MAAyB,UAAzB;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AACA,MAAMC,+BAA+B,GAAG,CAACC,WAAD,EAAcC,aAAd,EAA6BC,gBAA7B,KACtCC,I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H,MAhBE;;IAiBvB;AACJ;AACA;IACI3D,SAAS,EAAEvD,SAAS,CAACkH,MApBE;;IAqBvB;AACJ;AACA;IACIzD,UAAU,EAAEzD,SAAS,CAACkH,MAxBC;;IAyBvB;AACJ;AACA;IACIxD,cAAc,EAAE1D,SAAS,CAACkH,MA5BH;;IA6BvB;AACJ;AACA;IACIlE,KAAK,EAAEhD,SAAS,CAACkH,MAhCM;;IAiCvB;AACJ;AACA;IACI1E,IAAI,EAAExC,SAAS,CAACkH,MApCO;;IAqCvB;AACJ;AACA;IACIzB,aAAa,EAAEzF,SAAS,CAACkH;EAxCF,CAAhB,EAyCNF,UA3IgB;EA6InBpB,KAAK,EAAE5F,SAAS,CAACsH,GAAV,CAAcN;AA7IF,CAArB;AAgJAzF,QAAQ,CAACgG,YAAT,GAAwB;EACtB5B,QAAQ,EAAE,CADY;EAEtB5D,UAAU,EAAE,CAFU;EAGtBgC,SAAS,EAAE,IAHW;EAItBjD,MAAM,EAAE,EAJc;EAKtBkB,UAAU,EAAGQ,IAAD,IAAUA,IALA;EAMtB2C,aAAa,EAAG3C,IAAD,IAAUA,IANH;EAOtBX,cAAc,EAAE,EAPM;EAQtBR,gBAAgB,EAAE,GARI;EAStBZ,aAAa,EAAE,CATO;EAUtBW,aAAa,EAAE,GAVO;EAWtB6D,cAAc,EAAE,MAAM,CAAE,CAXF;EAYtBJ,QAAQ,EAAE,MAAM,CAAE,CAZI;EAatBK,aAAa,EAAE,MAAM,CAAE;AAbD,CAAxB;AAgBA,eAAe9E,UAAU,CAACE,YAAD,EAAe;EAAEkH,IAAI,EAAE,UAAR;EAAoBC,SAAS,EAAE;AAA/B,CAAf,CAAV,CAAgElG,QAAhE,CAAf"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hitachivantara/uikit-react-lab",
|
|
3
|
-
"version": "3.49.
|
|
3
|
+
"version": "3.49.6",
|
|
4
4
|
"description": "A collection of contributed React components for the Hitachi Vantara's Design System.",
|
|
5
5
|
"homepage": "https://github.com/lumada-design/hv-uikit-react",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -42,7 +42,7 @@
|
|
|
42
42
|
},
|
|
43
43
|
"dependencies": {
|
|
44
44
|
"@babel/runtime": "^7.18.6",
|
|
45
|
-
"@hitachivantara/uikit-react-core": "^3.68.
|
|
45
|
+
"@hitachivantara/uikit-react-core": "^3.68.6",
|
|
46
46
|
"@hitachivantara/uikit-react-icons": "^3.9.4",
|
|
47
47
|
"@types/react-table": "^7.7.12",
|
|
48
48
|
"clsx": "^1.2.1",
|
|
@@ -76,5 +76,5 @@
|
|
|
76
76
|
"publishConfig": {
|
|
77
77
|
"access": "public"
|
|
78
78
|
},
|
|
79
|
-
"gitHead": "
|
|
79
|
+
"gitHead": "e3543ac5dfce9c148fd6b15e19ee4a9616d14253"
|
|
80
80
|
}
|