@hitachivantara/uikit-react-lab 3.49.4 → 3.50.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.
- package/dist/Controls/Controls.d.ts +5 -5
- package/dist/Slider/Slider.js +15 -2
- package/dist/Slider/Slider.js.map +1 -1
- package/dist/Table/hooks/index.d.ts +7 -1
- package/dist/Table/hooks/index.js +22 -6
- package/dist/Table/hooks/index.js.map +1 -1
- package/dist/Table/hooks/useFilters.d.ts +5 -0
- package/dist/Table/hooks/useFilters.js +12 -0
- package/dist/Table/hooks/useFilters.js.map +1 -0
- package/dist/Table/hooks/useGlobalFilter.d.ts +5 -0
- package/dist/Table/hooks/useGlobalFilter.js +12 -0
- package/dist/Table/hooks/useGlobalFilter.js.map +1 -0
- package/dist/Table/stories/TableHooks.stories.mdx +8 -8
- package/dist/legacy/Controls/Controls.d.ts +5 -5
- package/dist/legacy/Slider/Slider.js +2 -1
- package/dist/legacy/Slider/Slider.js.map +1 -1
- package/dist/legacy/Table/hooks/index.d.ts +7 -1
- package/dist/legacy/Table/hooks/index.js +3 -1
- package/dist/legacy/Table/hooks/index.js.map +1 -1
- package/dist/legacy/Table/hooks/useFilters.d.ts +5 -0
- package/dist/legacy/Table/hooks/useFilters.js +3 -0
- package/dist/legacy/Table/hooks/useFilters.js.map +1 -0
- package/dist/legacy/Table/hooks/useGlobalFilter.d.ts +5 -0
- package/dist/legacy/Table/hooks/useGlobalFilter.js +3 -0
- package/dist/legacy/Table/hooks/useGlobalFilter.js.map +1 -0
- package/dist/legacy/Table/stories/TableHooks.stories.mdx +8 -8
- package/dist/modern/Controls/Controls.d.ts +5 -5
- package/dist/modern/Slider/Slider.js +1 -1
- package/dist/modern/Slider/Slider.js.map +1 -1
- package/dist/modern/Table/hooks/index.d.ts +7 -1
- package/dist/modern/Table/hooks/index.js +3 -1
- package/dist/modern/Table/hooks/index.js.map +1 -1
- package/dist/modern/Table/hooks/useFilters.d.ts +5 -0
- package/dist/modern/Table/hooks/useFilters.js +3 -0
- package/dist/modern/Table/hooks/useFilters.js.map +1 -0
- package/dist/modern/Table/hooks/useGlobalFilter.d.ts +5 -0
- package/dist/modern/Table/hooks/useGlobalFilter.js +3 -0
- package/dist/modern/Table/hooks/useGlobalFilter.js.map +1 -0
- package/dist/modern/Table/stories/TableHooks.stories.mdx +8 -8
- package/package.json +13 -27
|
@@ -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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G,MApBE;;IAqBvB;AACJ;AACA;IACIxD,UAAU,EAAEvD,SAAS,CAAC+G,MAxBC;;IAyBvB;AACJ;AACA;IACIvD,cAAc,EAAExD,SAAS,CAAC+G,MA5BH;;IA6BvB;AACJ;AACA;IACIjE,KAAK,EAAE9C,SAAS,CAAC+G,MAhCM;;IAiCvB;AACJ;AACA;IACIzE,IAAI,EAAEtC,SAAS,CAAC+G,MApCO;;IAqCvB;AACJ;AACA;IACIxB,aAAa,EAAEvF,SAAS,CAAC+G;EAxCF,CAAhB,EAyCNF,UA3IgB;EA6InBnB,KAAK,EAAE1F,SAAS,CAACmH,GAAV,CAAcN;AA7IF,CAArB;AAgJAtF,QAAQ,CAAC6F,YAAT,GAAwB;EACtB3B,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;AAgBA,eAAe5E,UAAU,CAACE,YAAD,EAAe;EAAE+G,IAAI,EAAE,UAAR;EAAoBC,SAAS,EAAE;AAA/B,CAAf,CAAV,CAAgE/F,QAAhE,CAAf"}
|
|
1
|
+
{"version":3,"file":"Slider.js","names":["React","PropTypes","Range","Handle","Tooltip","withStyles","KnobRing","styleCreator","scaledValueToKnobsPositionValue","scaledValue","minPointValue","inverseStepValue","Math","floor","transformKnobsPosition","values","knobsPositions","forEach","value","index","calculateStepValue","maxPointValue","divisionQuantity","abs","HvSlider","props","sliderValue","stepValue","markProperties","markstep","markDigits","formatMark","styles","marks","length","markProperty","position","label","style","mark","roundedMarkStep","labelValue","knobsPositionToScaledValue","toFixed","knobProperties","trackStyles","knobProperty","track","color","backgroundColor","trackColor","knobInner","knobOuterStyle","lastItem","knobOuter","hidden","knobHidden","knobHiddenLast","knobsCurrentPosition","newKnobsPosition","slice","knobsValues","noOverlap","state","duplicatedValue","findDuplicated","filter","item","indexOf","array","newArray","newPosition","previousValue","knobsPosition","knobs","generateKnobsPositionAndValues","onChange","defaultValues","fixed","setState","onBeforeChange","onAfterChange","formatTooltip","classes","dragging","restProps","knobValue","dragColor","sliderTooltip","hoverColor","markStep","theme","createTrackStyles","knobStyles","createKnobStyles","rangesCount","createMark","defaultKnobsPositions","createKnob","root","dot","onChangeHandler","onBeforeChangeHandler","onAfterChangeHandler","undefined","rail","Component","propTypes","arrayOf","number","isRequired","shape","string","defaultValue","bool","func","any","defaultProps","name","withTheme"],"sources":["../../../src/Slider/Slider.js"],"sourcesContent":["/**\n * Note: https://github.com/react-component/slider/issues/504\n * Version must remain in \"8.6.3\" until this bug is fixed\n */\n\nimport React from \"react\";\nimport PropTypes from \"prop-types\";\nimport { Range, Handle } from \"rc-slider\";\nimport Tooltip from \"rc-tooltip\";\nimport { withStyles } from \"@material-ui/core\";\nimport KnobRing from \"./KnobRing\";\nimport styleCreator from \"./styles\";\n\n/**\n * Transform the scaled values into knobs positions.\n *\n * @param {*} scaledValue - the value of the slider to be scaled\n * @param {*} minPointValue - The value of the first point in\n * the slider from left to right.\n * @param {*} inverseStepValue - The inverse of calculated separation between\n * the value of the points that compose the slider.\n */\nconst scaledValueToKnobsPositionValue = (scaledValue, minPointValue, inverseStepValue) =>\n Math.floor((scaledValue - minPointValue) * inverseStepValue);\n\n/**\n * Transform the received knobs values into knob positions\n *\n * @param {Object} values - The values of the slider.\n * @param {Number} inverseStepValue - The inverse of calculated separation between\n * the value of the points that compose the slider.\n * @param {Integer} minPointValue - The value of the first point in the slider from\n * left to right.\n * @returns {Array} - The position of the knobs.\n */\nconst transformKnobsPosition = (values, inverseStepValue, minPointValue) => {\n const knobsPositions = [];\n values.forEach((value, index) => {\n knobsPositions[index] = scaledValueToKnobsPositionValue(value, minPointValue, inverseStepValue);\n });\n return knobsPositions;\n};\n\n/**\n * Calculates the separation between each value in the slider.\n *\n * @param {*} maxPointValue - The value of the last point in the slider from left to right.\n * @param {*} minPointValue - The value of the first point in the slider from left to right.\n * @param {*} divisionQuantity - How many subdivisions there are in the slider.\n */\nconst calculateStepValue = (maxPointValue, minPointValue, divisionQuantity) =>\n Math.abs(maxPointValue - minPointValue) / divisionQuantity;\n\n/**\n * Sliders reflect a range of values along a bar, from which users may select a single value. They are ideal for adjusting settings such as volume, brightness, or applying image filters. Still in development\n */\nclass HvSlider extends React.Component {\n constructor(props) {\n super(props);\n\n const {\n markProperties,\n markStep,\n markDigits,\n knobProperties,\n values,\n defaultValues,\n theme,\n maxPointValue,\n minPointValue,\n divisionQuantity,\n formatMark,\n } = props;\n\n const styles = styleCreator(theme);\n const stepValue = calculateStepValue(maxPointValue, minPointValue, divisionQuantity);\n const inverseStepValue = 1 / stepValue;\n\n this.state = {\n knobsPositions: transformKnobsPosition(\n values.length > 0 ? values : defaultValues,\n inverseStepValue,\n minPointValue\n ),\n trackStyles: this.createTrackStyles(knobProperties, styles),\n knobStyles: this.createKnobStyles(knobProperties, styles),\n rangesCount: knobProperties.length - 1,\n marks: this.createMark(\n markProperties,\n markStep,\n divisionQuantity,\n minPointValue,\n stepValue,\n markDigits,\n formatMark,\n styles\n ),\n defaultKnobsPositions: transformKnobsPosition(defaultValues, inverseStepValue, minPointValue),\n styles,\n stepValue,\n inverseStepValue,\n };\n\n import(\"rc-slider/assets/index.css\");\n }\n\n static getDerivedStateFromProps(props, state) {\n const stepValue = calculateStepValue(\n props.maxPointValue,\n props.minPointValue,\n props.divisionQuantity\n );\n\n if (props.values.length > 0) {\n return {\n ...state,\n knobsPositions: transformKnobsPosition(\n props.values.length > 0 ? props.values : props.defaultValues,\n 1 / stepValue,\n props.minPointValue\n ),\n };\n }\n return null;\n }\n\n /**\n * Transform the scaled values into knobs positions.\n *\n * @param {*} sliderValue - the value of the slider to be scaled\n * @param {*} minPointValue - The value of the first point in the slider from left to right.\n * @param {*} stepValue - The calculated separation between the values of the slider.\n */\n knobsPositionToScaledValue = (sliderValue, minPointValue, stepValue) =>\n minPointValue + stepValue * sliderValue;\n\n /**\n * Generates the inline styles used for the track of each knob, applying colors if necessary.\n *\n * @param {Object} markProperties - The object provided by the user with\n * the desired configuration for the marks.\n * @param {Integer} markstep - The separation between marks.\n * @param {Integer} divisionQuantity - How many subdivisions there are in the slider.\n * @param {Integer} minPointValue - The value of the first point in the slider from\n * left to right.\n * @param {Integer} stepValue - The calculated separation between the values of the slider.\n * @param {Integer} markDigits - How many decimals the mark will show.\n * @param {Function} formatMark - A function provided by the user that is going to\n * be executed to format the mark text.\n * @param {Object} styles - the default styles for the marks.\n * @returns {Object} - An object with the for the marks.\n * @memberof HvSlider\n */\n createMark = (\n markProperties,\n markstep,\n divisionQuantity,\n minPointValue,\n stepValue,\n markDigits,\n formatMark,\n styles\n ) => {\n const marks = {};\n if (markProperties.length > 0) {\n markProperties.forEach((markProperty) => {\n marks[markProperty.position] = {\n label: `${markProperty.label}`,\n style: {\n ...styles.mark,\n },\n };\n });\n } else {\n const roundedMarkStep = Math.floor(markstep);\n for (let index = 0; index <= divisionQuantity; index += roundedMarkStep) {\n let labelValue = this.knobsPositionToScaledValue(index, minPointValue, stepValue).toFixed(\n markDigits\n );\n labelValue = formatMark(labelValue);\n marks[index] = {\n label: `${labelValue}`,\n style: {\n ...styles.mark,\n },\n };\n }\n }\n return marks;\n };\n\n /**\n * Generates the inline styles used for the track of each knob, applying colors if necessary.\n *\n * @param {Object} knobProperties - The object provided by the user with\n * the desired configuration for the knobs.\n * @param {Object} styles - the default styles for the tracks.\n * @returns {Object} - An object with the style for each track.\n * @memberof HvSlider\n */\n createTrackStyles = (knobProperties, styles) => {\n const trackStyles = [];\n if (knobProperties.length > 1) {\n knobProperties.forEach((knobProperty, index) => {\n trackStyles[index] = { ...styles.track };\n if (knobProperty.color) {\n trackStyles[index].backgroundColor = knobProperty.trackColor;\n }\n });\n }\n return trackStyles;\n };\n\n /**\n * Generates the inline styles used for each knob, applying colors if specified.\n *\n * @param {Object} knobProperties - The object provided by the user with\n * the desired configuration for the knobs.\n * @param {Object} styles - the default styles for the knobs.\n * @returns {Object} - An object with both the inner and outer styles for the knob.\n * @memberof HvSlider\n */\n createKnobStyles = (knobProperties, styles) => {\n const knobInner = [];\n const knobOuterStyle = [];\n\n const lastItem = knobProperties.length - 1;\n if (knobProperties.length > 1) {\n knobProperties.forEach((knobProperty, index) => {\n knobInner[index] = { ...styles.knobInner };\n knobOuterStyle[index] = { ...styles.knobOuter };\n\n if (knobProperty.color) {\n knobInner[index].backgroundColor = knobProperty.color;\n knobOuterStyle[index].backgroundColor = \"transparent\";\n }\n\n if (knobProperty.hidden) {\n knobInner[index] = styles.knobHidden;\n if (index === lastItem) {\n knobInner[index] = { ...styles.knobHiddenLast };\n knobInner[index].backgroundColor = knobProperty.color;\n knobOuterStyle[index] = { ...styles.knobHidden };\n knobOuterStyle[index].backgroundColor = knobProperty.color;\n }\n }\n });\n }\n\n return {\n knobInner,\n knobOuterStyle,\n };\n };\n\n /**\n * Generates an object which posses the current value and position of the knobs.\n *\n * @param {Array} knobsCurrentPosition - An array containing the current positions of the knobs.\n * @returns {Object} - An object with the positions and values of the knobs.\n * @memberof HvSlider\n */\n generateKnobsPositionAndValues = (knobsCurrentPosition) => {\n const newKnobsPosition = knobsCurrentPosition.slice();\n const knobsValues = [];\n const { minPointValue, noOverlap } = this.props;\n const { stepValue, knobsPositions } = this.state;\n\n let duplicatedValue = null;\n\n const findDuplicated = newKnobsPosition.filter(\n (item, index) => newKnobsPosition.indexOf(item) !== index\n );\n\n if (noOverlap && findDuplicated.length > 0) {\n [duplicatedValue] = findDuplicated;\n }\n newKnobsPosition.forEach((position, index, array) => {\n const newArray = array;\n let newPosition = position;\n\n if (noOverlap && newPosition === duplicatedValue) {\n const previousValue = knobsPositions[index];\n if (previousValue !== newPosition) {\n newPosition += newPosition > previousValue ? -1 : 1;\n newArray[index] = newPosition;\n }\n }\n\n knobsValues[index] = this.knobsPositionToScaledValue(newPosition, minPointValue, stepValue);\n }, this);\n\n return {\n knobsPosition: newKnobsPosition,\n knobsValues,\n };\n };\n\n /**\n * Function executed while the knobs changes.\n *\n * executes the callback provided by the user with the values and position of the knobs,\n * also lock the value of the knob in case one is fixed.\n *\n * @param {Array} knobsPosition - An array containing the current positions of the knobs.\n * @memberof HvSlider\n */\n onChangeHandler = (knobsPosition) => {\n const knobs = this.generateKnobsPositionAndValues(knobsPosition);\n const { knobProperties, onChange, minPointValue, defaultValues } = this.props;\n const { inverseStepValue } = this.state;\n knobProperties.forEach((knobProperty, index) => {\n if (knobProperty.fixed) {\n knobs.knobsPosition[index] = scaledValueToKnobsPositionValue(\n defaultValues[index],\n minPointValue,\n inverseStepValue\n );\n }\n });\n\n onChange(knobs);\n\n this.setState({\n knobsPositions: knobs.knobsPosition,\n });\n };\n\n /**\n * Function executed before a change.\n *\n * executes the callback provided by the user with the values and position of the knobs\n *\n * @param {Array} knobsPosition - An array containing the current positions of the knobs.\n * @memberof HvSlider\n */\n onBeforeChangeHandler = (knobsPosition) => {\n const { onBeforeChange } = this.props;\n const knobs = this.generateKnobsPositionAndValues(knobsPosition);\n onBeforeChange(knobs);\n };\n\n /**\n * Function executed after a change.\n *\n * executes the callback provided by the user with the values and position of the knobs\n *\n * @param {Array} knobsPosition - An array containing the current positions of the knobs.\n * @memberof HvSlider\n */\n onAfterChangeHandler = (knobsPosition) => {\n const { onAfterChange } = this.props;\n const knobs = this.generateKnobsPositionAndValues(knobsPosition);\n onAfterChange(knobs);\n };\n\n /**\n * Function used to create a custom knob for the slider.\n *\n * TODO: This should be isolated because is creating a sub component,\n * but there were some problems regarding the underlying component losing\n * references of the handlers disabling the focus.\n *\n * @param {Object} props - An object containing the properties of the knobs.\n * @memberof HvSlider\n */\n createKnob = (props) => {\n const { minPointValue, markDigits, knobProperties, formatTooltip, classes } = this.props;\n const { stepValue } = this.state;\n const { value, dragging, index, style, ...restProps } = props;\n\n const knobValue = this.knobsPositionToScaledValue(value, minPointValue, stepValue).toFixed(\n markDigits\n );\n if (dragging) {\n style.backgroundColor = knobProperties[index].dragColor;\n } else {\n style.backgroundColor = knobProperties[index].color;\n }\n\n return (\n <Tooltip\n prefixCls=\"rc-slider-tooltip\"\n overlay={formatTooltip(knobValue)}\n visible={dragging}\n placement=\"top\"\n key={index}\n overlayClassName={classes.sliderTooltip}\n >\n <Handle value={value} style={style} {...restProps}>\n <KnobRing hoverColor={knobProperties[index].hoverColor} dragging={dragging} />\n </Handle>\n </Tooltip>\n );\n };\n\n render() {\n const { divisionQuantity, classes } = this.props;\n\n const {\n knobsPositions,\n defaultKnobsPositions,\n rangesCount,\n knobStyles,\n trackStyles,\n marks,\n styles,\n } = this.state;\n\n return (\n <Range\n handle={this.createKnob}\n className={classes.root}\n min={0}\n max={divisionQuantity}\n step={1}\n marks={marks}\n dotStyle={styles.dot}\n onChange={this.onChangeHandler}\n onBeforeChange={this.onBeforeChangeHandler}\n onAfterChange={this.onAfterChangeHandler}\n value={knobsPositions.length > 0 ? knobsPositions : undefined}\n allowCross={false}\n defaultValue={defaultKnobsPositions}\n count={rangesCount}\n railStyle={styles.rail}\n handleStyle={knobStyles.knobInner}\n trackStyle={trackStyles}\n />\n );\n }\n}\n\nHvSlider.propTypes = {\n /**\n * The values array to apply to the component\n */\n values: PropTypes.arrayOf(PropTypes.number),\n /**\n * The default values array to apply to the component\n */\n defaultValues: PropTypes.arrayOf(PropTypes.number).isRequired,\n /**\n * The object used to set the knob properties,\n * for every item in the array a new knob will be created.\n */\n knobProperties: PropTypes.arrayOf(\n PropTypes.shape({\n color: PropTypes.string,\n defaultValue: PropTypes.number,\n hidden: PropTypes.bool,\n fixed: PropTypes.bool,\n hoverColor: PropTypes.string,\n trackColor: PropTypes.string,\n dragColor: PropTypes.string,\n })\n ).isRequired,\n /**\n * The object used to set the mark properties individually.\n */\n markProperties: PropTypes.arrayOf(\n PropTypes.shape({\n position: PropTypes.number,\n label: PropTypes.string,\n })\n ),\n /**\n * the function executed before a change will ocurr in the slider.\n * it will receive an object like\n * {\n * knobsPosition: [],\n * knobsValues: []\n * }\n */\n onBeforeChange: PropTypes.func,\n /**\n * the function executed while a change is ocurring in the slider.\n * it will receive an object like\n * {\n * knobsPosition: [],\n * knobsValues: []\n * }\n */\n onChange: PropTypes.func,\n /**\n * the function executed after a change ocurred in the slider.\n * it will receive an object like\n * {\n * knobsPosition: [],\n * knobsValues: []\n * }\n */\n onAfterChange: PropTypes.func,\n /**\n * the separation in points between marks.\n * example: if 10 divisions and a markstep of 2 there will be 5 marks.\n */\n markStep: PropTypes.number,\n /**\n * how many subdivisions there are in the slider.\n */\n divisionQuantity: PropTypes.number,\n /**\n * the value of the first point in the slider from left to right.\n */\n minPointValue: PropTypes.number,\n /**\n * the value of the last point in the slider from left to right.\n */\n maxPointValue: PropTypes.number,\n /**\n * the nax number of decimals if no format function is applied\n */\n markDigits: PropTypes.number,\n /**\n * a formatting function used to add format to the marks in the track,\n * the function receives the mark text\n */\n formatMark: PropTypes.func,\n /**\n * a formatting function used to add format to the tooltip in the track,\n * the function receives the mark text\n */\n formatTooltip: PropTypes.func,\n /**\n * if `true` the knobs can't have the same value, if `false` knobs can have the same value.\n */\n noOverlap: PropTypes.bool,\n /**\n * the classes object to be applied into the root object.\n */\n classes: PropTypes.shape({\n /**\n * Style applied to the root of the component.\n */\n root: PropTypes.string,\n /**\n * Style applied to the dot.\n */\n dot: PropTypes.string,\n /**\n * Style applied to the rail.\n */\n rail: PropTypes.string,\n /**\n * Style applied to the inner of the knob.\n */\n knobInner: PropTypes.string,\n /**\n * Style applied to the outside of the knob.\n */\n knobOuter: PropTypes.string,\n /**\n * Style applied when the knob is hidden.\n */\n knobHidden: PropTypes.string,\n /**\n * Style applied last hidden knob.\n */\n knobHiddenLast: PropTypes.string,\n /**\n * Style applied to the track.\n */\n track: PropTypes.string,\n /**\n * Style applied to the mark.\n */\n mark: PropTypes.string,\n /**\n * Style applied to the tooltip.\n */\n sliderTooltip: PropTypes.string,\n }).isRequired,\n\n theme: PropTypes.any.isRequired,\n};\n\nHvSlider.defaultProps = {\n markStep: 1,\n markDigits: 0,\n noOverlap: true,\n values: [],\n formatMark: (mark) => mark,\n formatTooltip: (mark) => mark,\n markProperties: [],\n divisionQuantity: 100,\n minPointValue: 0,\n maxPointValue: 100,\n onBeforeChange: () => {},\n onChange: () => {},\n onAfterChange: () => {},\n};\n\nexport default withStyles(styleCreator, { name: \"HvSlider\", withTheme: true })(HvSlider);\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AACA;AACA;AACA;AAEA,OAAOA,KAAP,MAAkB,OAAlB;AACA,OAAOC,SAAP,MAAsB,YAAtB;AACA,SAASC,KAAT,EAAgBC,MAAhB,QAA8B,WAA9B;AACA,OAAOC,OAAP,MAAoB,YAApB;AACA,SAASC,UAAT,QAA2B,mBAA3B;AACA,OAAOC,QAAP,MAAqB,YAArB;AACA,OAAOC,YAAP,MAAyB,UAAzB;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AACA,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,cA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AAC6F,YAAT,GAAwB;EACtB3B,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;AAgBA,eAAe5E,UAAU,CAACE,YAAD,EAAe;EAAE+G,IAAI,EAAE,UAAR;EAAoBC,SAAS,EAAE;AAA/B,CAAf,CAAV,CAAgE/F,QAAhE,CAAf"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { default as
|
|
1
|
+
export { default as useHvData } from "./useTable";
|
|
2
2
|
export * from "./useTable";
|
|
3
3
|
|
|
4
4
|
export { default as useHvTableStyles } from "./useTableStyles";
|
|
@@ -27,3 +27,9 @@ export * from "./useHeaderGroups";
|
|
|
27
27
|
|
|
28
28
|
export { default as useHvResizeColumns } from "./useResizeColumns";
|
|
29
29
|
export * from "./useResizeColumns";
|
|
30
|
+
|
|
31
|
+
export { default as useHvGlobalFilter } from "./useGlobalFilter";
|
|
32
|
+
export * from "./useGlobalFilter";
|
|
33
|
+
|
|
34
|
+
export { default as useHvFilters } from "./useFilters";
|
|
35
|
+
export * from "./useFilters";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { default as
|
|
1
|
+
export { default as useHvData } from "./useTable";
|
|
2
2
|
export { default as useHvTableStyles } from "./useTableStyles";
|
|
3
3
|
export { default as useHvSortBy } from "./useSortBy";
|
|
4
4
|
export { default as useHvTableSticky } from "./useSticky";
|
|
@@ -8,4 +8,6 @@ export { default as useHvBulkActions } from "./useBulkActions";
|
|
|
8
8
|
export { default as useHvRowExpand } from "./useRowExpand";
|
|
9
9
|
export { default as useHvHeaderGroups } from "./useHeaderGroups";
|
|
10
10
|
export { default as useHvResizeColumns } from "./useResizeColumns";
|
|
11
|
+
export { default as useHvGlobalFilter } from "./useGlobalFilter";
|
|
12
|
+
export { default as useHvFilters } from "./useFilters";
|
|
11
13
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["default","
|
|
1
|
+
{"version":3,"file":"index.js","names":["default","useHvData","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 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,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;AACA,SAASV,OAAO,IAAIW,iBAApB,QAA6C,mBAA7C;AACA,SAASX,OAAO,IAAIY,YAApB,QAAwC,cAAxC"}
|
|
@@ -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 @@
|
|
|
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 `
|
|
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 {
|
|
29
|
+
<Usage>{'import { useHvData } from "@hitachivantara/uikit-react-lab";'}</Usage>
|
|
30
30
|
|
|
31
31
|
<Preview withToolbar>
|
|
32
|
-
<Story inline story={stories.
|
|
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 `
|
|
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 `
|
|
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 `
|
|
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 `
|
|
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,CAASF,aAAa,GAAGX,aAAzB,IAA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;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;AACA;AAEA,OAAOA,KAAP,MA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K,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,4 +1,4 @@
|
|
|
1
|
-
export { default as
|
|
1
|
+
export { default as useHvData } from "./useTable";
|
|
2
2
|
export * from "./useTable";
|
|
3
3
|
|
|
4
4
|
export { default as useHvTableStyles } from "./useTableStyles";
|
|
@@ -27,3 +27,9 @@ export * from "./useHeaderGroups";
|
|
|
27
27
|
|
|
28
28
|
export { default as useHvResizeColumns } from "./useResizeColumns";
|
|
29
29
|
export * from "./useResizeColumns";
|
|
30
|
+
|
|
31
|
+
export { default as useHvGlobalFilter } from "./useGlobalFilter";
|
|
32
|
+
export * from "./useGlobalFilter";
|
|
33
|
+
|
|
34
|
+
export { default as useHvFilters } from "./useFilters";
|
|
35
|
+
export * from "./useFilters";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { default as
|
|
1
|
+
export { default as useHvData } from "./useTable";
|
|
2
2
|
export { default as useHvTableStyles } from "./useTableStyles";
|
|
3
3
|
export { default as useHvSortBy } from "./useSortBy";
|
|
4
4
|
export { default as useHvTableSticky } from "./useSticky";
|
|
@@ -8,4 +8,6 @@ export { default as useHvBulkActions } from "./useBulkActions";
|
|
|
8
8
|
export { default as useHvRowExpand } from "./useRowExpand";
|
|
9
9
|
export { default as useHvHeaderGroups } from "./useHeaderGroups";
|
|
10
10
|
export { default as useHvResizeColumns } from "./useResizeColumns";
|
|
11
|
+
export { default as useHvGlobalFilter } from "./useGlobalFilter";
|
|
12
|
+
export { default as useHvFilters } from "./useFilters";
|
|
11
13
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["default","
|
|
1
|
+
{"version":3,"file":"index.js","names":["default","useHvData","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 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,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;AACA,SAASV,OAAO,IAAIW,iBAApB,QAA6C,mBAA7C;AACA,SAASX,OAAO,IAAIY,YAApB,QAAwC,cAAxC"}
|
|
@@ -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 @@
|
|
|
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"}
|