@hitachivantara/uikit-react-lab 3.49.5 → 3.51.0

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.
Files changed (40) hide show
  1. package/dist/Controls/Controls.d.ts +5 -5
  2. package/dist/Slider/Slider.js +15 -2
  3. package/dist/Slider/Slider.js.map +1 -1
  4. package/dist/Table/hooks/index.d.ts +7 -0
  5. package/dist/Table/hooks/index.js +22 -0
  6. package/dist/Table/hooks/index.js.map +1 -1
  7. package/dist/Table/hooks/useFilters.d.ts +5 -0
  8. package/dist/Table/hooks/useFilters.js +12 -0
  9. package/dist/Table/hooks/useFilters.js.map +1 -0
  10. package/dist/Table/hooks/useGlobalFilter.d.ts +5 -0
  11. package/dist/Table/hooks/useGlobalFilter.js +12 -0
  12. package/dist/Table/hooks/useGlobalFilter.js.map +1 -0
  13. package/dist/Table/stories/TableHooks.stories.mdx +8 -8
  14. package/dist/legacy/Controls/Controls.d.ts +5 -5
  15. package/dist/legacy/Slider/Slider.js +2 -1
  16. package/dist/legacy/Slider/Slider.js.map +1 -1
  17. package/dist/legacy/Table/hooks/index.d.ts +7 -0
  18. package/dist/legacy/Table/hooks/index.js +3 -0
  19. package/dist/legacy/Table/hooks/index.js.map +1 -1
  20. package/dist/legacy/Table/hooks/useFilters.d.ts +5 -0
  21. package/dist/legacy/Table/hooks/useFilters.js +3 -0
  22. package/dist/legacy/Table/hooks/useFilters.js.map +1 -0
  23. package/dist/legacy/Table/hooks/useGlobalFilter.d.ts +5 -0
  24. package/dist/legacy/Table/hooks/useGlobalFilter.js +3 -0
  25. package/dist/legacy/Table/hooks/useGlobalFilter.js.map +1 -0
  26. package/dist/legacy/Table/stories/TableHooks.stories.mdx +8 -8
  27. package/dist/modern/Controls/Controls.d.ts +5 -5
  28. package/dist/modern/Slider/Slider.js +1 -1
  29. package/dist/modern/Slider/Slider.js.map +1 -1
  30. package/dist/modern/Table/hooks/index.d.ts +7 -0
  31. package/dist/modern/Table/hooks/index.js +3 -0
  32. package/dist/modern/Table/hooks/index.js.map +1 -1
  33. package/dist/modern/Table/hooks/useFilters.d.ts +5 -0
  34. package/dist/modern/Table/hooks/useFilters.js +3 -0
  35. package/dist/modern/Table/hooks/useFilters.js.map +1 -0
  36. package/dist/modern/Table/hooks/useGlobalFilter.d.ts +5 -0
  37. package/dist/modern/Table/hooks/useGlobalFilter.js +3 -0
  38. package/dist/modern/Table/hooks/useGlobalFilter.js.map +1 -0
  39. package/dist/modern/Table/stories/TableHooks.stories.mdx +8 -8
  40. package/package.json +10 -24
@@ -7,16 +7,16 @@ export interface HvControlsSortValue {
7
7
  desc: string;
8
8
  }
9
9
  export interface HvControlsViewConfiguration extends Record<string, unknown> {
10
- setSortBy?: (v: HvControlsSortValue[]) => void;
11
- setGlobalFilter?: (v: string) => void;
12
- }
13
-
14
- export interface HvControlsCallbacks extends Record<string, unknown> {
15
10
  id: string;
16
11
  label: string;
17
12
  icon: React.ReactNode;
18
13
  }
19
14
 
15
+ export interface HvControlsCallbacks extends Record<string, unknown> {
16
+ setSortBy?: (v: HvControlsSortValue[]) => void;
17
+ setGlobalFilter?: (v: string) => void;
18
+ }
19
+
20
20
  export interface HvControlsProps
21
21
  extends StandardProps<React.HTMLAttributes<HTMLDivElement>, HvControlsClassKey> {
22
22
  /** Children to be rendered. */
@@ -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;A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;AACA;IACI1D,cAAc,EAAEqD,kBAAA,CAAUK,MA5BH;;IA6BvB;AACJ;AACA;IACIpE,KAAK,EAAE+D,kBAAA,CAAUK,MAhCM;;IAiCvB;AACJ;AACA;IACI5E,IAAI,EAAEuE,kBAAA,CAAUK,MApCO;;IAqCvB;AACJ;AACA;IACI3B,aAAa,EAAEsB,kBAAA,CAAUK;EAxCF,CAAhB,EAyCNF,UA3IgB;EA6InBtB,KAAK,EAAEmB,kBAAA,CAAUS,GAAV,CAAcN;AA7IF,CAArB;AAgJAzF,QAAQ,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,SAAr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tBX,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,3 +1,4 @@
1
+ export { default as useHvData } from "./useTable";
1
2
  export { default as useHvTable } from "./useTable";
2
3
  export * from "./useTable";
3
4
 
@@ -27,3 +28,9 @@ export * from "./useHeaderGroups";
27
28
 
28
29
  export { default as useHvResizeColumns } from "./useResizeColumns";
29
30
  export * from "./useResizeColumns";
31
+
32
+ export { default as useHvGlobalFilter } from "./useGlobalFilter";
33
+ export * from "./useGlobalFilter";
34
+
35
+ export { default as useHvFilters } from "./useFilters";
36
+ export * from "./useFilters";
@@ -11,6 +11,24 @@ Object.defineProperty(exports, "useHvBulkActions", {
11
11
  return _useBulkActions.default;
12
12
  }
13
13
  });
14
+ Object.defineProperty(exports, "useHvData", {
15
+ enumerable: true,
16
+ get: function get() {
17
+ return _useTable.default;
18
+ }
19
+ });
20
+ Object.defineProperty(exports, "useHvFilters", {
21
+ enumerable: true,
22
+ get: function get() {
23
+ return _useFilters.default;
24
+ }
25
+ });
26
+ Object.defineProperty(exports, "useHvGlobalFilter", {
27
+ enumerable: true,
28
+ get: function get() {
29
+ return _useGlobalFilter.default;
30
+ }
31
+ });
14
32
  Object.defineProperty(exports, "useHvHeaderGroups", {
15
33
  enumerable: true,
16
34
  get: function get() {
@@ -85,4 +103,8 @@ var _useRowExpand = _interopRequireDefault(require("./useRowExpand"));
85
103
  var _useHeaderGroups = _interopRequireDefault(require("./useHeaderGroups"));
86
104
 
87
105
  var _useResizeColumns = _interopRequireDefault(require("./useResizeColumns"));
106
+
107
+ var _useGlobalFilter = _interopRequireDefault(require("./useGlobalFilter"));
108
+
109
+ var _useFilters = _interopRequireDefault(require("./useFilters"));
88
110
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":[],"sources":["../../../src/Table/hooks/index.js"],"sourcesContent":["export { default as useHvTable } from \"./useTable\";\nexport { default as useHvTableStyles } from \"./useTableStyles\";\nexport { default as useHvSortBy } from \"./useSortBy\";\nexport { default as useHvTableSticky } from \"./useSticky\";\nexport { default as useHvPagination } from \"./usePagination\";\nexport { default as useHvRowSelection } from \"./useRowSelection\";\nexport { default as useHvBulkActions } from \"./useBulkActions\";\nexport { default as useHvRowExpand } from \"./useRowExpand\";\nexport { default as useHvHeaderGroups } from \"./useHeaderGroups\";\nexport { default as useHvResizeColumns } from \"./useResizeColumns\";\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA"}
1
+ {"version":3,"file":"index.js","names":[],"sources":["../../../src/Table/hooks/index.js"],"sourcesContent":["export { default as useHvData } from \"./useTable\";\nexport { default as useHvTable } from \"./useTable\";\nexport { default as useHvTableStyles } from \"./useTableStyles\";\nexport { default as useHvSortBy } from \"./useSortBy\";\nexport { default as useHvTableSticky } from \"./useSticky\";\nexport { default as useHvPagination } from \"./usePagination\";\nexport { default as useHvRowSelection } from \"./useRowSelection\";\nexport { default as useHvBulkActions } from \"./useBulkActions\";\nexport { default as useHvRowExpand } from \"./useRowExpand\";\nexport { default as useHvHeaderGroups } from \"./useHeaderGroups\";\nexport { default as useHvResizeColumns } from \"./useResizeColumns\";\nexport { default as useHvGlobalFilter } from \"./useGlobalFilter\";\nexport { default as useHvFilters } from \"./useFilters\";\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;AAEA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA"}
@@ -0,0 +1,5 @@
1
+ import { Hooks } from "react-table";
2
+
3
+ export default function useFilters<D extends object = Record<string, unknown>>(
4
+ hooks: Hooks<D>
5
+ ): void;
@@ -0,0 +1,12 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.default = void 0;
7
+
8
+ var _reactTable = require("react-table");
9
+
10
+ var _default = _reactTable.useFilters;
11
+ exports.default = _default;
12
+ //# sourceMappingURL=useFilters.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useFilters.js","names":["useHvFilters"],"sources":["../../../src/Table/hooks/useFilters.js"],"sourcesContent":["import { useFilters as useHvFilters } from \"react-table\";\n\nexport default useHvFilters;\n"],"mappings":";;;;;;;AAAA;;eAEeA,sB"}
@@ -0,0 +1,5 @@
1
+ import { Hooks } from "react-table";
2
+
3
+ export default function useGlobalFilter<D extends object = Record<string, unknown>>(
4
+ hooks: Hooks<D>
5
+ ): void;
@@ -0,0 +1,12 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.default = void 0;
7
+
8
+ var _reactTable = require("react-table");
9
+
10
+ var _default = _reactTable.useGlobalFilter;
11
+ exports.default = _default;
12
+ //# sourceMappingURL=useGlobalFilter.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useGlobalFilter.js","names":["useHvGlobalFilter"],"sources":["../../../src/Table/hooks/useGlobalFilter.js"],"sourcesContent":["import { useGlobalFilter as useHvGlobalFilter } from \"react-table\";\n\nexport default useHvGlobalFilter;\n"],"mappings":";;;;;;;AAAA;;eAEeA,2B"}
@@ -18,7 +18,7 @@ Our custom hooks are built on top of [React Table](https://react-table.tanstack.
18
18
 
19
19
  ## `useHv*` hooks
20
20
 
21
- For further ease, you can use the provided `useHvTable` hook that wraps the [React Table's `useTable` hook](https://react-table.tanstack.com/docs/api/useTable) and
21
+ For further ease, you can use the provided `useHvData` hook that wraps the [React Table's `useTable` hook](https://react-table.tanstack.com/docs/api/useTable) and
22
22
  provides the following functionality:
23
23
 
24
24
  - Ensures the use of the needed core and layout plugins when using any of the UI Kit custom hooks (e.g. adding `useHvPagination` implies the instalation of React Table's `usePagination` hook).
@@ -26,10 +26,10 @@ provides the following functionality:
26
26
  - Generates default column metadata from the data fields, if the `columns` option is missing.
27
27
  - Defaults to an empty array if no `data` is provided.
28
28
 
29
- <Usage>{'import { useHvTable } from "@hitachivantara/uikit-react-lab";'}</Usage>
29
+ <Usage>{'import { useHvData } from "@hitachivantara/uikit-react-lab";'}</Usage>
30
30
 
31
31
  <Preview withToolbar>
32
- <Story inline story={stories.UseHvTable} />
32
+ <Story inline story={stories.UseHvData} />
33
33
  </Preview>
34
34
 
35
35
  The following plugin hooks are available:
@@ -62,7 +62,7 @@ Check [React Table's `usePagination` documentation](https://react-table.tanstack
62
62
 
63
63
  The `useHvPagination` hook makes the `getHvPaginationProps` function available on the table instance returned that can be used to setup a `HvPagination` component.
64
64
 
65
- _Note: This hook depends on the `usePagination` hook from `react-table`, but when using `useHvTable` only `useHvPagination` needs to be installed._
65
+ _Note: This hook depends on the `usePagination` hook from `react-table`, but when using `useHvData` only `useHvPagination` needs to be installed._
66
66
 
67
67
  <Preview withToolbar>
68
68
  <Story inline story={stories.Pagination} />
@@ -96,7 +96,7 @@ Rows can also be selected in bulk and actions can be performed on the current se
96
96
 
97
97
  The `useHvBulkActions` hook makes the `getHvBulkActionsProps` function available on the table instance returned that can be used to setup a `HvBulkActions` component.
98
98
 
99
- _Note: This hook depends on the `useRowSelect` hook from `react-table`, but when using `useHvTable` only `useHvBulkActions` needs to be installed._
99
+ _Note: This hook depends on the `useRowSelect` hook from `react-table`, but when using `useHvData` only `useHvBulkActions` needs to be installed._
100
100
 
101
101
  <Preview withToolbar>
102
102
  <Story inline story={stories.BulkActions} />
@@ -111,7 +111,7 @@ Check [React Table's `useSortBy` documentation](https://react-table.tanstack.com
111
111
 
112
112
  The `useHvSortBy` hook ensures that the proper properties are injected in the `HvTableHeader` (including the on click sorting trigger) and `HvTableCell` (for styling).
113
113
 
114
- _Note: This hook depends on the `useSortBy` hook from `react-table`, but when using `useHvTable` only `useHvSortBy` needs to be installed._
114
+ _Note: This hook depends on the `useSortBy` hook from `react-table`, but when using `useHvData` only `useHvSortBy` needs to be installed._
115
115
 
116
116
  <Preview withToolbar>
117
117
  <Story inline story={stories.Sortable} />
@@ -125,7 +125,7 @@ Check [React Table's `useExpanded` documentation](https://react-table.tanstack.c
125
125
 
126
126
  The `useHvRowExpand` hook injects a `HvButton` into the first data column that toggles each row expansion. If the column has a custom renderer, an extra column is created instead.
127
127
 
128
- _Note: This hook depends on the `useExpanded` hook from `react-table`, but when using `useHvTable` only `useHvRowExpand` needs to be installed._
128
+ _Note: This hook depends on the `useExpanded` hook from `react-table`, but when using `useHvData` only `useHvRowExpand` needs to be installed._
129
129
 
130
130
  <Preview withToolbar>
131
131
  <Story inline story={stories.Expandable} />
@@ -270,7 +270,7 @@ doing the drag/drop operation via `SPACE + ARROW` Keys.
270
270
 
271
271
  ## Column Resize
272
272
 
273
- Columns can be resized using the useHvResizeColumn hook, which leverages the react-table capabilities.
273
+ Columns can be resized using the useHvResizeColumn hook, which leverages the react-table capabilities.
274
274
  Resize, although not an accessible functionality, it allows columns to be resizable via dragging column right border.
275
275
 
276
276
  <Preview withToolbar>
@@ -7,16 +7,16 @@ export interface HvControlsSortValue {
7
7
  desc: string;
8
8
  }
9
9
  export interface HvControlsViewConfiguration extends Record<string, unknown> {
10
- setSortBy?: (v: HvControlsSortValue[]) => void;
11
- setGlobalFilter?: (v: string) => void;
12
- }
13
-
14
- export interface HvControlsCallbacks extends Record<string, unknown> {
15
10
  id: string;
16
11
  label: string;
17
12
  icon: React.ReactNode;
18
13
  }
19
14
 
15
+ export interface HvControlsCallbacks extends Record<string, unknown> {
16
+ setSortBy?: (v: HvControlsSortValue[]) => void;
17
+ setGlobalFilter?: (v: string) => void;
18
+ }
19
+
20
20
  export interface HvControlsProps
21
21
  extends StandardProps<React.HTMLAttributes<HTMLDivElement>, HvControlsClassKey> {
22
22
  /** Children to be rendered. */
@@ -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;A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AA,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;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,M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"./useTable";
2
3
  export * from "./useTable";
3
4
 
@@ -27,3 +28,9 @@ export * from "./useHeaderGroups";
27
28
 
28
29
  export { default as useHvResizeColumns } from "./useResizeColumns";
29
30
  export * from "./useResizeColumns";
31
+
32
+ export { default as useHvGlobalFilter } from "./useGlobalFilter";
33
+ export * from "./useGlobalFilter";
34
+
35
+ export { default as useHvFilters } from "./useFilters";
36
+ export * from "./useFilters";
@@ -1,3 +1,4 @@
1
+ export { default as useHvData } from "./useTable";
1
2
  export { default as useHvTable } from "./useTable";
2
3
  export { default as useHvTableStyles } from "./useTableStyles";
3
4
  export { default as useHvSortBy } from "./useSortBy";
@@ -8,4 +9,6 @@ export { default as useHvBulkActions } from "./useBulkActions";
8
9
  export { default as useHvRowExpand } from "./useRowExpand";
9
10
  export { default as useHvHeaderGroups } from "./useHeaderGroups";
10
11
  export { default as useHvResizeColumns } from "./useResizeColumns";
12
+ export { default as useHvGlobalFilter } from "./useGlobalFilter";
13
+ export { default as useHvFilters } from "./useFilters";
11
14
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":["default","useHvTable","useHvTableStyles","useHvSortBy","useHvTableSticky","useHvPagination","useHvRowSelection","useHvBulkActions","useHvRowExpand","useHvHeaderGroups","useHvResizeColumns"],"sources":["../../../../src/Table/hooks/index.js"],"sourcesContent":["export { default as useHvTable } from \"./useTable\";\nexport { default as useHvTableStyles } from \"./useTableStyles\";\nexport { default as useHvSortBy } from \"./useSortBy\";\nexport { default as useHvTableSticky } from \"./useSticky\";\nexport { default as useHvPagination } from \"./usePagination\";\nexport { default as useHvRowSelection } from \"./useRowSelection\";\nexport { default as useHvBulkActions } from \"./useBulkActions\";\nexport { default as useHvRowExpand } from \"./useRowExpand\";\nexport { default as useHvHeaderGroups } from \"./useHeaderGroups\";\nexport { default as useHvResizeColumns } from \"./useResizeColumns\";\n"],"mappings":"AAAA,SAASA,OAAO,IAAIC,UAApB,QAAsC,YAAtC;AACA,SAASD,OAAO,IAAIE,gBAApB,QAA4C,kBAA5C;AACA,SAASF,OAAO,IAAIG,WAApB,QAAuC,aAAvC;AACA,SAASH,OAAO,IAAII,gBAApB,QAA4C,aAA5C;AACA,SAASJ,OAAO,IAAIK,eAApB,QAA2C,iBAA3C;AACA,SAASL,OAAO,IAAIM,iBAApB,QAA6C,mBAA7C;AACA,SAASN,OAAO,IAAIO,gBAApB,QAA4C,kBAA5C;AACA,SAASP,OAAO,IAAIQ,cAApB,QAA0C,gBAA1C;AACA,SAASR,OAAO,IAAIS,iBAApB,QAA6C,mBAA7C;AACA,SAAST,OAAO,IAAIU,kBAApB,QAA8C,oBAA9C"}
1
+ {"version":3,"file":"index.js","names":["default","useHvData","useHvTable","useHvTableStyles","useHvSortBy","useHvTableSticky","useHvPagination","useHvRowSelection","useHvBulkActions","useHvRowExpand","useHvHeaderGroups","useHvResizeColumns","useHvGlobalFilter","useHvFilters"],"sources":["../../../../src/Table/hooks/index.js"],"sourcesContent":["export { default as useHvData } from \"./useTable\";\nexport { default as useHvTable } from \"./useTable\";\nexport { default as useHvTableStyles } from \"./useTableStyles\";\nexport { default as useHvSortBy } from \"./useSortBy\";\nexport { default as useHvTableSticky } from \"./useSticky\";\nexport { default as useHvPagination } from \"./usePagination\";\nexport { default as useHvRowSelection } from \"./useRowSelection\";\nexport { default as useHvBulkActions } from \"./useBulkActions\";\nexport { default as useHvRowExpand } from \"./useRowExpand\";\nexport { default as useHvHeaderGroups } from \"./useHeaderGroups\";\nexport { default as useHvResizeColumns } from \"./useResizeColumns\";\nexport { default as useHvGlobalFilter } from \"./useGlobalFilter\";\nexport { default as useHvFilters } from \"./useFilters\";\n"],"mappings":"AAAA,SAASA,OAAO,IAAIC,SAApB,QAAqC,YAArC;AACA,SAASD,OAAO,IAAIE,UAApB,QAAsC,YAAtC;AACA,SAASF,OAAO,IAAIG,gBAApB,QAA4C,kBAA5C;AACA,SAASH,OAAO,IAAII,WAApB,QAAuC,aAAvC;AACA,SAASJ,OAAO,IAAIK,gBAApB,QAA4C,aAA5C;AACA,SAASL,OAAO,IAAIM,eAApB,QAA2C,iBAA3C;AACA,SAASN,OAAO,IAAIO,iBAApB,QAA6C,mBAA7C;AACA,SAASP,OAAO,IAAIQ,gBAApB,QAA4C,kBAA5C;AACA,SAASR,OAAO,IAAIS,cAApB,QAA0C,gBAA1C;AACA,SAAST,OAAO,IAAIU,iBAApB,QAA6C,mBAA7C;AACA,SAASV,OAAO,IAAIW,kBAApB,QAA8C,oBAA9C;AACA,SAASX,OAAO,IAAIY,iBAApB,QAA6C,mBAA7C;AACA,SAASZ,OAAO,IAAIa,YAApB,QAAwC,cAAxC"}
@@ -0,0 +1,5 @@
1
+ import { Hooks } from "react-table";
2
+
3
+ export default function useFilters<D extends object = Record<string, unknown>>(
4
+ hooks: Hooks<D>
5
+ ): void;
@@ -0,0 +1,3 @@
1
+ import { useFilters as useHvFilters } from "react-table";
2
+ export default useHvFilters;
3
+ //# sourceMappingURL=useFilters.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useFilters.js","names":["useFilters","useHvFilters"],"sources":["../../../../src/Table/hooks/useFilters.js"],"sourcesContent":["import { useFilters as useHvFilters } from \"react-table\";\n\nexport default useHvFilters;\n"],"mappings":"AAAA,SAASA,UAAU,IAAIC,YAAvB,QAA2C,aAA3C;AAEA,eAAeA,YAAf"}
@@ -0,0 +1,5 @@
1
+ import { Hooks } from "react-table";
2
+
3
+ export default function useGlobalFilter<D extends object = Record<string, unknown>>(
4
+ hooks: Hooks<D>
5
+ ): void;
@@ -0,0 +1,3 @@
1
+ import { useGlobalFilter as useHvGlobalFilter } from "react-table";
2
+ export default useHvGlobalFilter;
3
+ //# sourceMappingURL=useGlobalFilter.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useGlobalFilter.js","names":["useGlobalFilter","useHvGlobalFilter"],"sources":["../../../../src/Table/hooks/useGlobalFilter.js"],"sourcesContent":["import { useGlobalFilter as useHvGlobalFilter } from \"react-table\";\n\nexport default useHvGlobalFilter;\n"],"mappings":"AAAA,SAASA,eAAe,IAAIC,iBAA5B,QAAqD,aAArD;AAEA,eAAeA,iBAAf"}
@@ -18,7 +18,7 @@ Our custom hooks are built on top of [React Table](https://react-table.tanstack.
18
18
 
19
19
  ## `useHv*` hooks
20
20
 
21
- For further ease, you can use the provided `useHvTable` hook that wraps the [React Table's `useTable` hook](https://react-table.tanstack.com/docs/api/useTable) and
21
+ For further ease, you can use the provided `useHvData` hook that wraps the [React Table's `useTable` hook](https://react-table.tanstack.com/docs/api/useTable) and
22
22
  provides the following functionality:
23
23
 
24
24
  - Ensures the use of the needed core and layout plugins when using any of the UI Kit custom hooks (e.g. adding `useHvPagination` implies the instalation of React Table's `usePagination` hook).
@@ -26,10 +26,10 @@ provides the following functionality:
26
26
  - Generates default column metadata from the data fields, if the `columns` option is missing.
27
27
  - Defaults to an empty array if no `data` is provided.
28
28
 
29
- <Usage>{'import { useHvTable } from "@hitachivantara/uikit-react-lab";'}</Usage>
29
+ <Usage>{'import { useHvData } from "@hitachivantara/uikit-react-lab";'}</Usage>
30
30
 
31
31
  <Preview withToolbar>
32
- <Story inline story={stories.UseHvTable} />
32
+ <Story inline story={stories.UseHvData} />
33
33
  </Preview>
34
34
 
35
35
  The following plugin hooks are available:
@@ -62,7 +62,7 @@ Check [React Table's `usePagination` documentation](https://react-table.tanstack
62
62
 
63
63
  The `useHvPagination` hook makes the `getHvPaginationProps` function available on the table instance returned that can be used to setup a `HvPagination` component.
64
64
 
65
- _Note: This hook depends on the `usePagination` hook from `react-table`, but when using `useHvTable` only `useHvPagination` needs to be installed._
65
+ _Note: This hook depends on the `usePagination` hook from `react-table`, but when using `useHvData` only `useHvPagination` needs to be installed._
66
66
 
67
67
  <Preview withToolbar>
68
68
  <Story inline story={stories.Pagination} />
@@ -96,7 +96,7 @@ Rows can also be selected in bulk and actions can be performed on the current se
96
96
 
97
97
  The `useHvBulkActions` hook makes the `getHvBulkActionsProps` function available on the table instance returned that can be used to setup a `HvBulkActions` component.
98
98
 
99
- _Note: This hook depends on the `useRowSelect` hook from `react-table`, but when using `useHvTable` only `useHvBulkActions` needs to be installed._
99
+ _Note: This hook depends on the `useRowSelect` hook from `react-table`, but when using `useHvData` only `useHvBulkActions` needs to be installed._
100
100
 
101
101
  <Preview withToolbar>
102
102
  <Story inline story={stories.BulkActions} />
@@ -111,7 +111,7 @@ Check [React Table's `useSortBy` documentation](https://react-table.tanstack.com
111
111
 
112
112
  The `useHvSortBy` hook ensures that the proper properties are injected in the `HvTableHeader` (including the on click sorting trigger) and `HvTableCell` (for styling).
113
113
 
114
- _Note: This hook depends on the `useSortBy` hook from `react-table`, but when using `useHvTable` only `useHvSortBy` needs to be installed._
114
+ _Note: This hook depends on the `useSortBy` hook from `react-table`, but when using `useHvData` only `useHvSortBy` needs to be installed._
115
115
 
116
116
  <Preview withToolbar>
117
117
  <Story inline story={stories.Sortable} />
@@ -125,7 +125,7 @@ Check [React Table's `useExpanded` documentation](https://react-table.tanstack.c
125
125
 
126
126
  The `useHvRowExpand` hook injects a `HvButton` into the first data column that toggles each row expansion. If the column has a custom renderer, an extra column is created instead.
127
127
 
128
- _Note: This hook depends on the `useExpanded` hook from `react-table`, but when using `useHvTable` only `useHvRowExpand` needs to be installed._
128
+ _Note: This hook depends on the `useExpanded` hook from `react-table`, but when using `useHvData` only `useHvRowExpand` needs to be installed._
129
129
 
130
130
  <Preview withToolbar>
131
131
  <Story inline story={stories.Expandable} />
@@ -270,7 +270,7 @@ doing the drag/drop operation via `SPACE + ARROW` Keys.
270
270
 
271
271
  ## Column Resize
272
272
 
273
- Columns can be resized using the useHvResizeColumn hook, which leverages the react-table capabilities.
273
+ Columns can be resized using the useHvResizeColumn hook, which leverages the react-table capabilities.
274
274
  Resize, although not an accessible functionality, it allows columns to be resizable via dragging column right border.
275
275
 
276
276
  <Preview withToolbar>
@@ -7,16 +7,16 @@ export interface HvControlsSortValue {
7
7
  desc: string;
8
8
  }
9
9
  export interface HvControlsViewConfiguration extends Record<string, unknown> {
10
- setSortBy?: (v: HvControlsSortValue[]) => void;
11
- setGlobalFilter?: (v: string) => void;
12
- }
13
-
14
- export interface HvControlsCallbacks extends Record<string, unknown> {
15
10
  id: string;
16
11
  label: string;
17
12
  icon: React.ReactNode;
18
13
  }
19
14
 
15
+ export interface HvControlsCallbacks extends Record<string, unknown> {
16
+ setSortBy?: (v: HvControlsSortValue[]) => void;
17
+ setGlobalFilter?: (v: string) => void;
18
+ }
19
+
20
20
  export interface HvControlsProps
21
21
  extends StandardProps<React.HTMLAttributes<HTMLDivElement>, HvControlsClassKey> {
22
22
  /** Children to be rendered. */
@@ -18,7 +18,6 @@ import { Range, Handle } from "rc-slider";
18
18
  import Tooltip from "rc-tooltip";
19
19
  import { withStyles } 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,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,MAAMC,+BAA+B,GAAG,CAACC,WAAD,EAAcC,aAAd,EAA6BC,gBAA7B,KACtCC,IAAI,CAACC,KAAL,CAAW,CAACJ,WAAW,GAAGC,aAAf,IAAgCC,gBAA3C,CADF;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AACA,MAAMG,sBAAsB,GAAG,CAACC,MAAD,EAASJ,gBAAT,EAA2BD,aAA3B,KAA6C;EAC1E,MAAMM,cAAc,GAAG,EAAvB;EACAD,MAAM,CAACE,OAAP,CAAe,CAACC,KAAD,EAAQC,KAAR,KAAkB;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,MAAMI,kBAAkB,GAAG,CAACC,aAAD,EAAgBX,aAAhB,EAA+BY,gBAA/B,KACzBV,IAAI,CAACW,GAAL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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"}
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;AAC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,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"}
@@ -1,3 +1,4 @@
1
+ export { default as useHvData } from "./useTable";
1
2
  export { default as useHvTable } from "./useTable";
2
3
  export * from "./useTable";
3
4
 
@@ -27,3 +28,9 @@ export * from "./useHeaderGroups";
27
28
 
28
29
  export { default as useHvResizeColumns } from "./useResizeColumns";
29
30
  export * from "./useResizeColumns";
31
+
32
+ export { default as useHvGlobalFilter } from "./useGlobalFilter";
33
+ export * from "./useGlobalFilter";
34
+
35
+ export { default as useHvFilters } from "./useFilters";
36
+ export * from "./useFilters";
@@ -1,3 +1,4 @@
1
+ export { default as useHvData } from "./useTable";
1
2
  export { default as useHvTable } from "./useTable";
2
3
  export { default as useHvTableStyles } from "./useTableStyles";
3
4
  export { default as useHvSortBy } from "./useSortBy";
@@ -8,4 +9,6 @@ export { default as useHvBulkActions } from "./useBulkActions";
8
9
  export { default as useHvRowExpand } from "./useRowExpand";
9
10
  export { default as useHvHeaderGroups } from "./useHeaderGroups";
10
11
  export { default as useHvResizeColumns } from "./useResizeColumns";
12
+ export { default as useHvGlobalFilter } from "./useGlobalFilter";
13
+ export { default as useHvFilters } from "./useFilters";
11
14
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":["default","useHvTable","useHvTableStyles","useHvSortBy","useHvTableSticky","useHvPagination","useHvRowSelection","useHvBulkActions","useHvRowExpand","useHvHeaderGroups","useHvResizeColumns"],"sources":["../../../../src/Table/hooks/index.js"],"sourcesContent":["export { default as useHvTable } from \"./useTable\";\nexport { default as useHvTableStyles } from \"./useTableStyles\";\nexport { default as useHvSortBy } from \"./useSortBy\";\nexport { default as useHvTableSticky } from \"./useSticky\";\nexport { default as useHvPagination } from \"./usePagination\";\nexport { default as useHvRowSelection } from \"./useRowSelection\";\nexport { default as useHvBulkActions } from \"./useBulkActions\";\nexport { default as useHvRowExpand } from \"./useRowExpand\";\nexport { default as useHvHeaderGroups } from \"./useHeaderGroups\";\nexport { default as useHvResizeColumns } from \"./useResizeColumns\";\n"],"mappings":"AAAA,SAASA,OAAO,IAAIC,UAApB,QAAsC,YAAtC;AACA,SAASD,OAAO,IAAIE,gBAApB,QAA4C,kBAA5C;AACA,SAASF,OAAO,IAAIG,WAApB,QAAuC,aAAvC;AACA,SAASH,OAAO,IAAII,gBAApB,QAA4C,aAA5C;AACA,SAASJ,OAAO,IAAIK,eAApB,QAA2C,iBAA3C;AACA,SAASL,OAAO,IAAIM,iBAApB,QAA6C,mBAA7C;AACA,SAASN,OAAO,IAAIO,gBAApB,QAA4C,kBAA5C;AACA,SAASP,OAAO,IAAIQ,cAApB,QAA0C,gBAA1C;AACA,SAASR,OAAO,IAAIS,iBAApB,QAA6C,mBAA7C;AACA,SAAST,OAAO,IAAIU,kBAApB,QAA8C,oBAA9C"}
1
+ {"version":3,"file":"index.js","names":["default","useHvData","useHvTable","useHvTableStyles","useHvSortBy","useHvTableSticky","useHvPagination","useHvRowSelection","useHvBulkActions","useHvRowExpand","useHvHeaderGroups","useHvResizeColumns","useHvGlobalFilter","useHvFilters"],"sources":["../../../../src/Table/hooks/index.js"],"sourcesContent":["export { default as useHvData } from \"./useTable\";\nexport { default as useHvTable } from \"./useTable\";\nexport { default as useHvTableStyles } from \"./useTableStyles\";\nexport { default as useHvSortBy } from \"./useSortBy\";\nexport { default as useHvTableSticky } from \"./useSticky\";\nexport { default as useHvPagination } from \"./usePagination\";\nexport { default as useHvRowSelection } from \"./useRowSelection\";\nexport { default as useHvBulkActions } from \"./useBulkActions\";\nexport { default as useHvRowExpand } from \"./useRowExpand\";\nexport { default as useHvHeaderGroups } from \"./useHeaderGroups\";\nexport { default as useHvResizeColumns } from \"./useResizeColumns\";\nexport { default as useHvGlobalFilter } from \"./useGlobalFilter\";\nexport { default as useHvFilters } from \"./useFilters\";\n"],"mappings":"AAAA,SAASA,OAAO,IAAIC,SAApB,QAAqC,YAArC;AACA,SAASD,OAAO,IAAIE,UAApB,QAAsC,YAAtC;AACA,SAASF,OAAO,IAAIG,gBAApB,QAA4C,kBAA5C;AACA,SAASH,OAAO,IAAII,WAApB,QAAuC,aAAvC;AACA,SAASJ,OAAO,IAAIK,gBAApB,QAA4C,aAA5C;AACA,SAASL,OAAO,IAAIM,eAApB,QAA2C,iBAA3C;AACA,SAASN,OAAO,IAAIO,iBAApB,QAA6C,mBAA7C;AACA,SAASP,OAAO,IAAIQ,gBAApB,QAA4C,kBAA5C;AACA,SAASR,OAAO,IAAIS,cAApB,QAA0C,gBAA1C;AACA,SAAST,OAAO,IAAIU,iBAApB,QAA6C,mBAA7C;AACA,SAASV,OAAO,IAAIW,kBAApB,QAA8C,oBAA9C;AACA,SAASX,OAAO,IAAIY,iBAApB,QAA6C,mBAA7C;AACA,SAASZ,OAAO,IAAIa,YAApB,QAAwC,cAAxC"}
@@ -0,0 +1,5 @@
1
+ import { Hooks } from "react-table";
2
+
3
+ export default function useFilters<D extends object = Record<string, unknown>>(
4
+ hooks: Hooks<D>
5
+ ): void;
@@ -0,0 +1,3 @@
1
+ import { useFilters as useHvFilters } from "react-table";
2
+ export default useHvFilters;
3
+ //# sourceMappingURL=useFilters.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useFilters.js","names":["useFilters","useHvFilters"],"sources":["../../../../src/Table/hooks/useFilters.js"],"sourcesContent":["import { useFilters as useHvFilters } from \"react-table\";\n\nexport default useHvFilters;\n"],"mappings":"AAAA,SAASA,UAAU,IAAIC,YAAvB,QAA2C,aAA3C;AAEA,eAAeA,YAAf"}
@@ -0,0 +1,5 @@
1
+ import { Hooks } from "react-table";
2
+
3
+ export default function useGlobalFilter<D extends object = Record<string, unknown>>(
4
+ hooks: Hooks<D>
5
+ ): void;
@@ -0,0 +1,3 @@
1
+ import { useGlobalFilter as useHvGlobalFilter } from "react-table";
2
+ export default useHvGlobalFilter;
3
+ //# sourceMappingURL=useGlobalFilter.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useGlobalFilter.js","names":["useGlobalFilter","useHvGlobalFilter"],"sources":["../../../../src/Table/hooks/useGlobalFilter.js"],"sourcesContent":["import { useGlobalFilter as useHvGlobalFilter } from \"react-table\";\n\nexport default useHvGlobalFilter;\n"],"mappings":"AAAA,SAASA,eAAe,IAAIC,iBAA5B,QAAqD,aAArD;AAEA,eAAeA,iBAAf"}
@@ -18,7 +18,7 @@ Our custom hooks are built on top of [React Table](https://react-table.tanstack.
18
18
 
19
19
  ## `useHv*` hooks
20
20
 
21
- For further ease, you can use the provided `useHvTable` hook that wraps the [React Table's `useTable` hook](https://react-table.tanstack.com/docs/api/useTable) and
21
+ For further ease, you can use the provided `useHvData` hook that wraps the [React Table's `useTable` hook](https://react-table.tanstack.com/docs/api/useTable) and
22
22
  provides the following functionality:
23
23
 
24
24
  - Ensures the use of the needed core and layout plugins when using any of the UI Kit custom hooks (e.g. adding `useHvPagination` implies the instalation of React Table's `usePagination` hook).
@@ -26,10 +26,10 @@ provides the following functionality:
26
26
  - Generates default column metadata from the data fields, if the `columns` option is missing.
27
27
  - Defaults to an empty array if no `data` is provided.
28
28
 
29
- <Usage>{'import { useHvTable } from "@hitachivantara/uikit-react-lab";'}</Usage>
29
+ <Usage>{'import { useHvData } from "@hitachivantara/uikit-react-lab";'}</Usage>
30
30
 
31
31
  <Preview withToolbar>
32
- <Story inline story={stories.UseHvTable} />
32
+ <Story inline story={stories.UseHvData} />
33
33
  </Preview>
34
34
 
35
35
  The following plugin hooks are available:
@@ -62,7 +62,7 @@ Check [React Table's `usePagination` documentation](https://react-table.tanstack
62
62
 
63
63
  The `useHvPagination` hook makes the `getHvPaginationProps` function available on the table instance returned that can be used to setup a `HvPagination` component.
64
64
 
65
- _Note: This hook depends on the `usePagination` hook from `react-table`, but when using `useHvTable` only `useHvPagination` needs to be installed._
65
+ _Note: This hook depends on the `usePagination` hook from `react-table`, but when using `useHvData` only `useHvPagination` needs to be installed._
66
66
 
67
67
  <Preview withToolbar>
68
68
  <Story inline story={stories.Pagination} />
@@ -96,7 +96,7 @@ Rows can also be selected in bulk and actions can be performed on the current se
96
96
 
97
97
  The `useHvBulkActions` hook makes the `getHvBulkActionsProps` function available on the table instance returned that can be used to setup a `HvBulkActions` component.
98
98
 
99
- _Note: This hook depends on the `useRowSelect` hook from `react-table`, but when using `useHvTable` only `useHvBulkActions` needs to be installed._
99
+ _Note: This hook depends on the `useRowSelect` hook from `react-table`, but when using `useHvData` only `useHvBulkActions` needs to be installed._
100
100
 
101
101
  <Preview withToolbar>
102
102
  <Story inline story={stories.BulkActions} />
@@ -111,7 +111,7 @@ Check [React Table's `useSortBy` documentation](https://react-table.tanstack.com
111
111
 
112
112
  The `useHvSortBy` hook ensures that the proper properties are injected in the `HvTableHeader` (including the on click sorting trigger) and `HvTableCell` (for styling).
113
113
 
114
- _Note: This hook depends on the `useSortBy` hook from `react-table`, but when using `useHvTable` only `useHvSortBy` needs to be installed._
114
+ _Note: This hook depends on the `useSortBy` hook from `react-table`, but when using `useHvData` only `useHvSortBy` needs to be installed._
115
115
 
116
116
  <Preview withToolbar>
117
117
  <Story inline story={stories.Sortable} />
@@ -125,7 +125,7 @@ Check [React Table's `useExpanded` documentation](https://react-table.tanstack.c
125
125
 
126
126
  The `useHvRowExpand` hook injects a `HvButton` into the first data column that toggles each row expansion. If the column has a custom renderer, an extra column is created instead.
127
127
 
128
- _Note: This hook depends on the `useExpanded` hook from `react-table`, but when using `useHvTable` only `useHvRowExpand` needs to be installed._
128
+ _Note: This hook depends on the `useExpanded` hook from `react-table`, but when using `useHvData` only `useHvRowExpand` needs to be installed._
129
129
 
130
130
  <Preview withToolbar>
131
131
  <Story inline story={stories.Expandable} />
@@ -270,7 +270,7 @@ doing the drag/drop operation via `SPACE + ARROW` Keys.
270
270
 
271
271
  ## Column Resize
272
272
 
273
- Columns can be resized using the useHvResizeColumn hook, which leverages the react-table capabilities.
273
+ Columns can be resized using the useHvResizeColumn hook, which leverages the react-table capabilities.
274
274
  Resize, although not an accessible functionality, it allows columns to be resizable via dragging column right border.
275
275
 
276
276
  <Preview withToolbar>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hitachivantara/uikit-react-lab",
3
- "version": "3.49.5",
3
+ "version": "3.51.0",
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",
@@ -21,13 +21,13 @@
21
21
  "build:babel:node": "cross-env BABEL_ENV=commonjs npx babel --root-mode upward src -d dist --extensions '.js,.jsx' --source-maps --ignore '**/tests','**/stories' --copy-files --no-copy-ignored",
22
22
  "build:babel:legacy": "cross-env BABEL_ENV=legacy npx babel --root-mode upward src -d dist/legacy --extensions '.js,.jsx' --source-maps --ignore '**/tests','**/stories' --copy-files --no-copy-ignored",
23
23
  "build:babel:modern": "cross-env BABEL_ENV=modern npx babel --root-mode upward src -d dist/modern --extensions '.js,.jsx' --source-maps --ignore '**/tests','**/stories' --copy-files --no-copy-ignored",
24
- "build:post:clean-snapshots": "npx del-cli **/dist/**/tests",
24
+ "build:post:clean-snapshots": "npx rimraf **/dist/**/tests",
25
25
  "dev": "npx npm-run-all --npm-path npm clean dev:babel:watch",
26
26
  "dev:babel:watch": "npx babel --root-mode upward src -d dist --extensions '.js,.jsx' --source-maps --ignore '**/tests','**/stories' --copy-files --no-copy-ignored --watch",
27
- "clean": "npx del-cli dist",
28
- "test": "jest -c config/jest-config.js --coverage",
29
- "test:watch": "jest -c config/jest-config.js --watch",
30
- "test:update": "jest -c ./config/jest-config.js --u",
27
+ "clean": "npx rimraf dist",
28
+ "test": "jest --coverage",
29
+ "test:watch": "jest --watch",
30
+ "test:update": "jest --u",
31
31
  "prepublishOnly": "npm run build",
32
32
  "link": "npm link",
33
33
  "yalc-publish": "npx yalc publish --no-scripts",
@@ -41,12 +41,10 @@
41
41
  "react-dom": "^16.13.1 || ^17.0.2"
42
42
  },
43
43
  "dependencies": {
44
- "@babel/runtime": "^7.18.6",
45
- "@hitachivantara/uikit-react-core": "^3.68.5",
46
- "@hitachivantara/uikit-react-icons": "^3.9.4",
44
+ "@hitachivantara/uikit-react-core": "^3.68.7",
45
+ "@hitachivantara/uikit-react-icons": "^3.9.5",
47
46
  "@types/react-table": "^7.7.12",
48
47
  "clsx": "^1.2.1",
49
- "core-js": "^3.23.3",
50
48
  "dayjs": "^1.11.3",
51
49
  "lodash": "^4.17.21",
52
50
  "prop-types": "^15.8.1",
@@ -56,19 +54,7 @@
56
54
  "react-table": "^7.8.0"
57
55
  },
58
56
  "devDependencies": {
59
- "@testing-library/jest-dom": "^5.16.4",
60
- "@testing-library/react": "^12.1.2",
61
- "@testing-library/react-hooks": "^8.0.1",
62
- "@testing-library/user-event": "^12.8.3",
63
- "@wojtekmaj/enzyme-adapter-react-17": "^0.6.7",
64
- "del-cli": "^4.0.1",
65
- "enzyme": "^3.11.0",
66
- "enzyme-to-json": "^3.6.2",
67
- "jest": "^28.1.2",
68
- "jest-environment-jsdom": "^28.1.2",
69
- "jest-fail-on-console": "^2.4.2",
70
- "jest-junit": "^14.0.0",
71
- "npm-run-all": "^4.1.5"
57
+ "@types/react": "^17.0.47"
72
58
  },
73
59
  "files": [
74
60
  "dist"
@@ -76,5 +62,5 @@
76
62
  "publishConfig": {
77
63
  "access": "public"
78
64
  },
79
- "gitHead": "bb27cc148d480ae646a7260293697f3f4e298e1b"
65
+ "gitHead": "471597e84f9d86d4d0851163154123259441ba96"
80
66
  }