@usereactify/search 5.56.4 → 5.56.5

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/CHANGELOG.md CHANGED
@@ -2,6 +2,13 @@
2
2
 
3
3
  All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
4
4
 
5
+ ### [5.56.5](https://bitbucket.org/usereactify/reactify-search-ui/compare/release-v5.56.4...release-v5.56.5) (2025-01-07)
6
+
7
+
8
+ ### Bug Fixes
9
+
10
+ * clamp values of slider filters to whole numbers within react-slider helper ([84002be](https://bitbucket.org/usereactify/reactify-search-ui/commit/84002bed13e25b6f075385f308c0eac8265a18a5))
11
+
5
12
  ### [5.56.4](https://bitbucket.org/usereactify/reactify-search-ui/compare/release-v5.56.3...release-v5.56.4) (2025-01-06)
6
13
 
7
14
 
package/dist/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@usereactify/search",
3
3
  "description": "React UI library for Reactify Search",
4
- "version": "5.56.4",
4
+ "version": "5.56.5",
5
5
  "license": "MIT",
6
6
  "main": "dist/src/index.js",
7
7
  "types": "dist/src/index.d.ts",
@@ -8,14 +8,19 @@ const react_1 = __importDefault(require("react"));
8
8
  const useReactSliderProps = (filter, filterValue, filterRange, handleChange) => {
9
9
  const reactSliderProps = react_1.default.useMemo(() => {
10
10
  var _a;
11
+ const filterValueParsed = [
12
+ parseInt((filterValue[0] ? filterValue[0] : filterRange[0]).toFixed(0)),
13
+ parseInt((filterValue[1] ? filterValue[1] : filterRange[1]).toFixed(0)),
14
+ ];
15
+ const filterRangeParsed = [
16
+ parseInt(filterRange[0].toFixed(0)),
17
+ parseInt(filterRange[1].toFixed(0)),
18
+ ];
11
19
  return {
12
- value: [
13
- filterValue[0] ? filterValue[0] : filterRange[0],
14
- filterValue[1] ? filterValue[1] : filterRange[1],
15
- ],
16
- defaultValue: [filterRange[0], filterRange[1]],
17
- min: filterRange[0],
18
- max: filterRange[1],
20
+ value: filterValueParsed,
21
+ defaultValue: [filterRangeParsed[0], filterRangeParsed[1]],
22
+ min: filterRangeParsed[0],
23
+ max: filterRangeParsed[1],
19
24
  step: parseInt((_a = filter.displaySliderStep) !== null && _a !== void 0 ? _a : "5"),
20
25
  pearling: true,
21
26
  minDistance: 0,
@@ -1 +1 @@
1
- {"version":3,"file":"useReactSliderProps.js","sourceRoot":"","sources":["../../../../src/hooks/react-slider/useReactSliderProps.ts"],"names":[],"mappings":";;;;;;AAAA,kDAA0B;AAInB,MAAM,mBAAmB,GAAG,CACjC,MAAyB,EACzB,WAA6B,EAC7B,WAA6B,EAC7B,YAA+C,EAW/C,EAAE;IACF,MAAM,gBAAgB,GAAG,eAAK,CAAC,OAAO,CAEpC,GAAG,EAAE;;QACL,OAAO;YACL,KAAK,EAAE;gBACL,WAAW,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC;gBAChD,WAAW,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC;aACjD;YACD,YAAY,EAAE,CAAC,WAAW,CAAC,CAAC,CAAC,EAAE,WAAW,CAAC,CAAC,CAAC,CAAC;YAC9C,GAAG,EAAE,WAAW,CAAC,CAAC,CAAC;YACnB,GAAG,EAAE,WAAW,CAAC,CAAC,CAAC;YACnB,IAAI,EAAE,QAAQ,CAAC,MAAA,MAAM,CAAC,iBAAiB,mCAAI,GAAG,CAAC;YAC/C,QAAQ,EAAE,IAAI;YACd,WAAW,EAAE,CAAC;YACd,QAAQ,EAAE,CAAC,KAAK,EAAE,EAAE,CAClB,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE;SACjE,CAAC;IACJ,CAAC,EAAE,CAAC,MAAM,CAAC,iBAAiB,EAAE,WAAW,EAAE,WAAW,EAAE,YAAY,CAAC,CAAC,CAAC;IAEvE,OAAO,gBAAgB,CAAC;AAC1B,CAAC,CAAC;AApCW,QAAA,mBAAmB,uBAoC9B","sourcesContent":["import React from \"react\";\nimport { ConfigFilterFacet } from \"../../types\";\nimport ReactSlider from \"react-slider\";\n\nexport const useReactSliderProps = (\n filter: ConfigFilterFacet,\n filterValue: [number, number],\n filterRange: [number, number],\n handleChange: (value: [number, number]) => void\n): Pick<\n React.ComponentProps<typeof ReactSlider>,\n | \"value\"\n | \"defaultValue\"\n | \"min\"\n | \"max\"\n | \"step\"\n | \"pearling\"\n | \"minDistance\"\n | \"onChange\"\n> => {\n const reactSliderProps = React.useMemo<\n ReturnType<typeof useReactSliderProps>\n >(() => {\n return {\n value: [\n filterValue[0] ? filterValue[0] : filterRange[0],\n filterValue[1] ? filterValue[1] : filterRange[1],\n ],\n defaultValue: [filterRange[0], filterRange[1]],\n min: filterRange[0],\n max: filterRange[1],\n step: parseInt(filter.displaySliderStep ?? \"5\"),\n pearling: true,\n minDistance: 0,\n onChange: (value) =>\n Array.isArray(value) ? handleChange([value[0], value[1]]) : {},\n };\n }, [filter.displaySliderStep, filterValue, filterRange, handleChange]);\n\n return reactSliderProps;\n};\n"]}
1
+ {"version":3,"file":"useReactSliderProps.js","sourceRoot":"","sources":["../../../../src/hooks/react-slider/useReactSliderProps.ts"],"names":[],"mappings":";;;;;;AAAA,kDAA0B;AAInB,MAAM,mBAAmB,GAAG,CACjC,MAAyB,EACzB,WAA6B,EAC7B,WAA6B,EAC7B,YAA+C,EAW/C,EAAE;IACF,MAAM,gBAAgB,GAAG,eAAK,CAAC,OAAO,CAEpC,GAAG,EAAE;;QACL,MAAM,iBAAiB,GAAqB;YAC1C,QAAQ,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC,CAAC,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,uBA0C9B","sourcesContent":["import React from \"react\";\nimport { ConfigFilterFacet } from \"../../types\";\nimport ReactSlider from \"react-slider\";\n\nexport const useReactSliderProps = (\n filter: ConfigFilterFacet,\n filterValue: [number, number],\n filterRange: [number, number],\n handleChange: (value: [number, number]) => void\n): Pick<\n React.ComponentProps<typeof ReactSlider>,\n | \"value\"\n | \"defaultValue\"\n | \"min\"\n | \"max\"\n | \"step\"\n | \"pearling\"\n | \"minDistance\"\n | \"onChange\"\n> => {\n const reactSliderProps = React.useMemo<\n ReturnType<typeof useReactSliderProps>\n >(() => {\n const filterValueParsed: [number, number] = [\n parseInt((filterValue[0] ? filterValue[0] : filterRange[0]).toFixed(0)),\n parseInt((filterValue[1] ? filterValue[1] : filterRange[1]).toFixed(0)),\n ];\n const filterRangeParsed: [number, number] = [\n parseInt(filterRange[0].toFixed(0)),\n parseInt(filterRange[1].toFixed(0)),\n ];\n\n return {\n value: filterValueParsed,\n defaultValue: [filterRangeParsed[0], filterRangeParsed[1]],\n min: filterRangeParsed[0],\n max: filterRangeParsed[1],\n step: parseInt(filter.displaySliderStep ?? \"5\"),\n pearling: true,\n minDistance: 0,\n onChange: (value) =>\n Array.isArray(value) ? handleChange([value[0], value[1]]) : {},\n };\n }, [filter.displaySliderStep, filterValue, filterRange, handleChange]);\n\n return reactSliderProps;\n};\n"]}
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@usereactify/search",
3
3
  "description": "React UI library for Reactify Search",
4
- "version": "5.56.4",
4
+ "version": "5.56.5",
5
5
  "license": "MIT",
6
6
  "main": "dist/src/index.js",
7
7
  "types": "dist/src/index.d.ts",