@shopgate/engage 7.32.0-beta.14 → 7.32.0-beta.16

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (80) hide show
  1. package/cart/components/CartItem/CartItemQuantityPicker.js +1 -1
  2. package/components/Badge/Badge.d.ts.map +1 -1
  3. package/components/Badge/Badge.js +1 -0
  4. package/components/index.d.ts +1 -0
  5. package/components/index.d.ts.map +1 -1
  6. package/components/index.js +3 -1
  7. package/components/v2/IconButton/IconButton.d.ts +72 -0
  8. package/components/v2/IconButton/IconButton.d.ts.map +1 -0
  9. package/components/v2/IconButton/IconButton.js +169 -0
  10. package/components/v2/IconButton/index.d.ts +3 -0
  11. package/components/v2/IconButton/index.d.ts.map +1 -0
  12. package/components/v2/IconButton/index.js +1 -0
  13. package/components/v2/index.d.ts +1 -0
  14. package/components/v2/index.d.ts.map +1 -1
  15. package/components/v2/index.js +1 -0
  16. package/filter/components/FilterItem/index.js +9 -2
  17. package/filter/components/FilterPageContent/components/ApplyButton/index.d.ts +21 -0
  18. package/filter/components/FilterPageContent/components/ApplyButton/index.d.ts.map +1 -0
  19. package/filter/components/FilterPageContent/components/ApplyButton/index.js +25 -52
  20. package/filter/components/FilterPageContent/components/FilterButtonBar/index.d.ts +8 -0
  21. package/filter/components/FilterPageContent/components/FilterButtonBar/index.d.ts.map +1 -0
  22. package/filter/components/FilterPageContent/components/FilterButtonBar/index.js +63 -0
  23. package/filter/components/FilterPageContent/components/ResetButton/index.d.ts +17 -0
  24. package/filter/components/FilterPageContent/components/ResetButton/index.d.ts.map +1 -0
  25. package/filter/components/FilterPageContent/components/ResetButton/index.js +24 -46
  26. package/filter/components/FilterPageContent/components/Selector/components/Selected/index.d.ts +19 -0
  27. package/filter/components/FilterPageContent/components/Selector/components/Selected/index.d.ts.map +1 -0
  28. package/filter/components/FilterPageContent/components/Selector/components/Selected/index.js +25 -46
  29. package/filter/components/FilterPageContent/components/Selector/components/Toggle/index.d.ts +14 -0
  30. package/filter/components/FilterPageContent/components/Selector/components/Toggle/index.d.ts.map +1 -0
  31. package/filter/components/FilterPageContent/components/Selector/components/Toggle/index.js +13 -46
  32. package/filter/components/FilterPageContent/components/Selector/components/ValueCheckbox/index.d.ts +25 -0
  33. package/filter/components/FilterPageContent/components/Selector/components/ValueCheckbox/index.d.ts.map +1 -0
  34. package/filter/components/FilterPageContent/components/Selector/components/ValueCheckbox/index.js +77 -0
  35. package/filter/components/FilterPageContent/components/Selector/index.d.ts +43 -0
  36. package/filter/components/FilterPageContent/components/Selector/index.d.ts.map +1 -0
  37. package/filter/components/FilterPageContent/components/Selector/index.js +52 -40
  38. package/filter/components/FilterPageContent/index.d.ts +16 -0
  39. package/filter/components/FilterPageContent/index.d.ts.map +1 -0
  40. package/filter/components/FilterPageContent/index.js +51 -57
  41. package/filter/components/PriceSlider/components/Label/index.js +69 -94
  42. package/filter/components/PriceSlider/index.js +43 -33
  43. package/filter/helpers/buildFilterParamsForFetchFiltersRequest.d.ts +8 -0
  44. package/filter/helpers/buildFilterParamsForFetchFiltersRequest.d.ts.map +1 -0
  45. package/filter/helpers/buildInitialFilters.d.ts +7 -0
  46. package/filter/helpers/buildInitialFilters.d.ts.map +1 -0
  47. package/filter/helpers/buildUpdatedFilters.d.ts +7 -0
  48. package/filter/helpers/buildUpdatedFilters.d.ts.map +1 -0
  49. package/filter/helpers/index.d.ts +5 -0
  50. package/filter/helpers/index.d.ts.map +1 -0
  51. package/filter/helpers/translateFilterLabel.d.ts +8 -0
  52. package/filter/helpers/translateFilterLabel.d.ts.map +1 -0
  53. package/filter/providers/FilterPageProvider.context.d.ts +157 -0
  54. package/filter/providers/FilterPageProvider.context.d.ts.map +1 -0
  55. package/filter/providers/FilterPageProvider.d.ts +24 -0
  56. package/filter/providers/FilterPageProvider.d.ts.map +1 -0
  57. package/filter/providers/FilterPageProvider.js +77 -132
  58. package/locations/components/GlobalLocationSwitcher/GlobalLocationSwitcherBar.js +4 -2
  59. package/package.json +7 -7
  60. package/page/widgets/CategoryList/CategoryList.js +2 -1
  61. package/product/components/FilterBar/components/Content/components/FilterButton/index.js +38 -46
  62. package/product/components/FilterBar/components/Content/components/FilterChips/components/FilterChip/index.d.ts +38 -0
  63. package/product/components/FilterBar/components/Content/components/FilterChips/components/FilterChip/index.d.ts.map +1 -0
  64. package/product/components/FilterBar/components/Content/components/FilterChips/components/FilterChip/index.js +88 -0
  65. package/product/components/FilterBar/components/Content/components/FilterChips/index.js +54 -35
  66. package/product/components/FilterBar/components/Content/components/Sort/index.js +1 -1
  67. package/product/components/FilterBar/components/Content/index.js +7 -3
  68. package/product/components/FilterBar/index.js +11 -22
  69. package/product/components/ProductFilters/index.js +2 -6
  70. package/product/components/ProductGrid/components/Item/components/ItemFavoritesButton/index.js +0 -1
  71. package/product/components/ProductGridPrice/index.js +1 -1
  72. package/settings/reducers/appSettings.js +1 -1
  73. package/styles/theme/createDefaultThemeOptions/index.d.ts +11 -1
  74. package/styles/theme/createDefaultThemeOptions/index.d.ts.map +1 -1
  75. package/styles/theme/createDefaultThemeOptions/index.js +17 -5
  76. package/styles/theme/createTheme/createComponents.types.d.ts +27 -0
  77. package/styles/theme/createTheme/createComponents.types.d.ts.map +1 -1
  78. package/styles/theme/createTheme/createComponents.types.js +31 -4
  79. package/filter/components/FilterPageContent/components/Selector/components/ValueButton/index.js +0 -69
  80. package/product/components/FilterBar/components/Content/components/FilterChips/connector.js +0 -22
@@ -1,78 +1,72 @@
1
- import React, { Fragment } from 'react';
2
- import PropTypes from 'prop-types';
3
- import { SurroundPortals, ResponsiveContainer } from '@shopgate/engage/components';
1
+ import { Fragment } from 'react';
2
+ import { SurroundPortals } from '@shopgate/engage/components';
4
3
  import { useFilterPage } from '@shopgate/engage/filter/hooks';
4
+ import { makeStyles } from '@shopgate/engage/styles';
5
5
  import { PORTAL_FILTER_PRICE_RANGE, PORTAL_FILTER_PAGE_CONTENT, FILTER_TYPE_RANGE, FILTER_TYPE_MULTISELECT, PriceSlider } from '@shopgate/engage/filter';
6
6
  import Selector from "./components/Selector";
7
- import ApplyButton from "./components/ApplyButton";
8
- import ResetButton from "./components/ResetButton";
9
-
7
+ import FilterButtonBar from "./components/FilterButtonBar";
8
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
9
+ const useStyles = makeStyles()(theme => ({
10
+ content: {
11
+ color: theme.palette.text.primary,
12
+ [theme.breakpoints.up('md')]: {
13
+ width: '100%',
14
+ maxWidth: 640,
15
+ margin: '0 auto'
16
+ }
17
+ }
18
+ }));
10
19
  /**
11
20
  * The FilterPageContent component renders all filters for the filter page.
12
- * @param {Object} props The component props.
13
- * @param {React.ComponentType} props.AppBarComponent The component to be rendered as the app bar
14
- * @returns {JSX.Element}
21
+ * @returns The rendered component.
15
22
  */
16
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
17
23
  const FilterPageContent = ({
18
- AppBarComponent
24
+ AppBarComponent = null
19
25
  }) => {
26
+ const {
27
+ classes
28
+ } = useStyles();
20
29
  const {
21
30
  apiFilters,
22
- resetPossible,
23
- hasChanged,
24
- applyFilters,
25
- resetAllFilters,
26
31
  getSelectedFilterValues,
27
32
  updateSelectedFilterValues
28
33
  } = useFilterPage();
29
34
  return /*#__PURE__*/_jsxs(SurroundPortals, {
30
35
  portalName: PORTAL_FILTER_PAGE_CONTENT,
31
36
  children: [AppBarComponent && /*#__PURE__*/_jsx(AppBarComponent, {
32
- title: "titles.filter",
33
- right: /*#__PURE__*/_jsx(ApplyButton, {
34
- disabled: !hasChanged,
35
- onClick: applyFilters
36
- })
37
- }), apiFilters.map(filter => {
38
- const portalProps = {
39
- filter
40
- };
41
- const value = getSelectedFilterValues(filter.id);
42
- if (filter.type === FILTER_TYPE_RANGE) {
43
- return /*#__PURE__*/_jsx(Fragment, {
44
- children: /*#__PURE__*/_jsx(SurroundPortals, {
45
- portalName: PORTAL_FILTER_PRICE_RANGE,
46
- portalProps: portalProps,
47
- children: /*#__PURE__*/_jsx(PriceSlider, {
48
- id: filter.id,
49
- min: filter.minimum,
50
- max: filter.maximum,
51
- onChange: updateSelectedFilterValues,
52
- value: value
53
- }, filter.id)
54
- })
37
+ title: "titles.filter"
38
+ }), /*#__PURE__*/_jsx("div", {
39
+ className: classes.content,
40
+ children: apiFilters.map(filter => {
41
+ const portalProps = {
42
+ filter
43
+ };
44
+ const value = getSelectedFilterValues(filter.id);
45
+ if (filter.type === FILTER_TYPE_RANGE) {
46
+ return /*#__PURE__*/_jsx(Fragment, {
47
+ children: /*#__PURE__*/_jsx(SurroundPortals, {
48
+ portalName: PORTAL_FILTER_PRICE_RANGE,
49
+ portalProps: portalProps,
50
+ children: /*#__PURE__*/_jsx(PriceSlider, {
51
+ id: filter.id,
52
+ min: filter.minimum,
53
+ max: filter.maximum,
54
+ onChange: updateSelectedFilterValues,
55
+ value: value
56
+ }, filter.id)
57
+ })
58
+ }, filter.id);
59
+ }
60
+ return /*#__PURE__*/_jsx(Selector, {
61
+ id: filter.id,
62
+ label: filter.label,
63
+ values: filter.values,
64
+ multi: filter.type === FILTER_TYPE_MULTISELECT,
65
+ onChange: updateSelectedFilterValues,
66
+ selected: value
55
67
  }, filter.id);
56
- }
57
- return /*#__PURE__*/_jsx(Selector, {
58
- id: filter.id,
59
- label: filter.label,
60
- values: filter.values,
61
- multi: filter.type === FILTER_TYPE_MULTISELECT,
62
- onChange: updateSelectedFilterValues,
63
- selected: value
64
- }, filter.id);
65
- }), /*#__PURE__*/_jsx(ResponsiveContainer, {
66
- breakpoint: "<sm",
67
- appAlways: true,
68
- children: /*#__PURE__*/_jsx(ResetButton, {
69
- disabled: !resetPossible,
70
- onClick: resetAllFilters
71
68
  })
72
- })]
69
+ }), /*#__PURE__*/_jsx(FilterButtonBar, {})]
73
70
  });
74
71
  };
75
- FilterPageContent.defaultProps = {
76
- AppBarComponent: null
77
- };
78
72
  export default FilterPageContent;
@@ -1,5 +1,5 @@
1
1
  import "core-js/modules/es.string.replace.js";
2
- import React, { memo, useState, useEffect, useRef } from 'react';
2
+ import React, { memo, useState, useEffect } from 'react';
3
3
  import PropTypes from 'prop-types';
4
4
  import appConfig from '@shopgate/pwa-common/helpers/config';
5
5
  import { makeStyles, responsiveMediaQuery } from '@shopgate/engage/styles';
@@ -10,39 +10,23 @@ const {
10
10
  currency
11
11
  } = appConfig;
12
12
  const useStyles = makeStyles()(theme => ({
13
- price: {
14
- color: theme.palette.secondary.main,
15
- display: 'inline-block',
16
- fontWeight: theme.typography.fontWeightMedium,
17
- textAlign: 'center'
18
- },
19
- editableContainer: {
20
- position: 'relative'
21
- },
22
13
  editableField: {
23
- position: 'absolute',
24
- top: 0,
25
- left: 0,
14
+ color: theme.palette.text.primary,
15
+ fontWeight: theme.typography.fontWeightMedium,
26
16
  textAlign: 'center',
27
- background: 'transparent',
28
- zIndex: 2,
29
- textIndent: -800,
17
+ background: theme.palette.background.surface,
30
18
  outline: 'none',
31
- padding: 0,
32
- margin: 0,
33
- border: '1px solid transparent',
19
+ padding: theme.spacing(0.5, 0),
20
+ margin: theme.spacing(0, 0.5),
21
+ border: `1px solid ${theme.components.input.border}`,
34
22
  borderRadius: 3,
35
23
  ':focus': {
36
- background: theme.components.input.background,
37
- textIndent: 0,
38
24
  borderColor: theme.components.border.medium
39
25
  },
40
26
  [responsiveMediaQuery('>=xs', {
41
27
  webOnly: true
42
28
  })]: {
43
29
  borderColor: theme.palette.primary.main,
44
- padding: '4px 0',
45
- top: -4,
46
30
  ':focus': {
47
31
  borderColor: theme.palette.primary.main
48
32
  }
@@ -58,9 +42,24 @@ const useStyles = makeStyles()(theme => ({
58
42
  clip: 'rect(0, 0, 0, 0)',
59
43
  whiteSpace: 'nowrap',
60
44
  border: 0
45
+ },
46
+ priceField: {
47
+ display: 'inline-flex',
48
+ alignItems: 'center'
49
+ },
50
+ currencySymbol: {
51
+ color: theme.palette.text.secondary,
52
+ marginRight: theme.spacing(0.25)
61
53
  }
62
54
  }));
63
55
 
56
+ /**
57
+ * Builds the width a price field needs to fit the longer of its value and the highest price.
58
+ * @param {number} length Amount of characters the field has to fit.
59
+ * @returns {string}
60
+ */
61
+ const fieldWidth = length => `${length + 2}ch`;
62
+
64
63
  /**
65
64
  * The filter price range slider label component.
66
65
  * @param {Object} props The component props.
@@ -78,10 +77,6 @@ function Label(props) {
78
77
  } = props;
79
78
  const [minValue, setMinValue] = useState(priceMin);
80
79
  const [maxValue, setMaxValue] = useState(priceMax);
81
- const [minOffset, setMinOffset] = useState(0);
82
- const [maxOffset, setMMaxOffset] = useState(0);
83
- const minRef = useRef(null);
84
- const maxRef = useRef(null);
85
80
 
86
81
  // Set new values, when prices change from outside.
87
82
  useEffect(() => {
@@ -89,12 +84,6 @@ function Label(props) {
89
84
  setMaxValue(priceMax);
90
85
  }, [priceMin, priceMax]);
91
86
 
92
- // Store the leftOffset when the reference changes.
93
- useEffect(() => {
94
- setMinOffset(minRef.current.offsetLeft);
95
- setMMaxOffset(maxRef.current.offsetLeft);
96
- }, [minRef, maxRef]);
97
-
98
87
  /**
99
88
  * Selects the field content on click.
100
89
  * @param {SyntheticEvent} event The click event object.
@@ -102,7 +91,7 @@ function Label(props) {
102
91
  function handleFieldClick({
103
92
  target
104
93
  }) {
105
- target.setSelectionRange(0, target.value.length);
94
+ target.select();
106
95
  }
107
96
 
108
97
  /**
@@ -135,7 +124,6 @@ function Label(props) {
135
124
  currency
136
125
  }).format('0').replace('0.00', '');
137
126
  return /*#__PURE__*/_jsxs("div", {
138
- className: classes.editableContainer,
139
127
  children: [/*#__PURE__*/_jsx("span", {
140
128
  className: classes.srOnly,
141
129
  children: i18n.text('price.range', {
@@ -147,70 +135,57 @@ function Label(props) {
147
135
  "aria-hidden": true,
148
136
  children: [/*#__PURE__*/_jsx(I18n.Placeholder, {
149
137
  forKey: "fromPrice",
150
- children: /*#__PURE__*/_jsx("span", {
151
- className: classes.price,
152
- style: {
153
- minWidth: priceLength
154
- },
155
- ref: minRef,
156
- children: /*#__PURE__*/_jsx(I18n.Price, {
157
- price: priceMin,
158
- currency: currency,
159
- fractions: false
160
- })
138
+ children: /*#__PURE__*/_jsxs("span", {
139
+ className: classes.priceField,
140
+ children: [/*#__PURE__*/_jsx("span", {
141
+ "aria-hidden": true,
142
+ className: classes.currencySymbol,
143
+ id: "price-slider-currency-label-min",
144
+ children: currencySymbol
145
+ }), /*#__PURE__*/_jsx("input", {
146
+ type: "number",
147
+ inputMode: "numeric",
148
+ pattern: "[0-9]*",
149
+ id: "priceMin",
150
+ name: "priceMin",
151
+ value: minValue,
152
+ onChange: handleChangeMin,
153
+ onClick: handleFieldClick,
154
+ style: {
155
+ width: fieldWidth(Math.max(priceLength, String(minValue).length))
156
+ },
157
+ className: classes.editableField,
158
+ "aria-label": i18n.text('price.range_from'),
159
+ "aria-describedby": "price-slider-currency-label-min"
160
+ })]
161
161
  })
162
162
  }), /*#__PURE__*/_jsx(I18n.Placeholder, {
163
163
  forKey: "toPrice",
164
- children: /*#__PURE__*/_jsx("span", {
165
- className: classes.price,
166
- style: {
167
- minWidth: priceLength
168
- },
169
- ref: maxRef,
170
- children: /*#__PURE__*/_jsx(I18n.Price, {
171
- price: priceMax,
172
- currency: currency,
173
- fractions: false
174
- })
164
+ children: /*#__PURE__*/_jsxs("span", {
165
+ className: classes.priceField,
166
+ children: [/*#__PURE__*/_jsx("span", {
167
+ "aria-hidden": true,
168
+ className: classes.currencySymbol,
169
+ id: "price-slider-currency-label-max",
170
+ children: currencySymbol
171
+ }), /*#__PURE__*/_jsx("input", {
172
+ type: "number",
173
+ inputMode: "numeric",
174
+ pattern: "[0-9]*",
175
+ id: "priceMax",
176
+ name: "priceMax",
177
+ value: maxValue,
178
+ onChange: handleChangeMax,
179
+ onClick: handleFieldClick,
180
+ style: {
181
+ width: fieldWidth(Math.max(priceLength, String(maxValue).length))
182
+ },
183
+ className: classes.editableField,
184
+ "aria-label": i18n.text('price.range_to'),
185
+ "aria-describedby": "price-slider-currency-label-max"
186
+ })]
175
187
  })
176
188
  })]
177
- }), /*#__PURE__*/_jsx("span", {
178
- "aria-hidden": true,
179
- hidden: true,
180
- id: "price-slider-currency-label",
181
- children: currencySymbol
182
- }), /*#__PURE__*/_jsx("input", {
183
- type: "number",
184
- inputMode: "numeric",
185
- pattern: "[0-9]*",
186
- id: "priceMin",
187
- name: "priceMin",
188
- value: minValue,
189
- onChange: handleChangeMin,
190
- onClick: handleFieldClick,
191
- style: {
192
- width: priceLength,
193
- left: minOffset
194
- },
195
- className: classes.editableField,
196
- "aria-label": i18n.text('price.range_from'),
197
- "aria-describedby": "price-slider-currency-label"
198
- }), /*#__PURE__*/_jsx("input", {
199
- type: "number",
200
- inputMode: "numeric",
201
- pattern: "[0-9]*",
202
- id: "priceMax",
203
- name: "priceMax",
204
- value: maxValue,
205
- onChange: handleChangeMax,
206
- onClick: handleFieldClick,
207
- style: {
208
- width: priceLength,
209
- left: maxOffset
210
- },
211
- className: classes.editableField,
212
- "aria-label": i18n.text('price.range_to'),
213
- "aria-describedby": "price-slider-currency-label"
214
189
  })]
215
190
  });
216
191
  }
@@ -2,13 +2,14 @@ import React, { useState, useEffect, useCallback, useRef, memo } from 'react';
2
2
  import PropTypes from 'prop-types';
3
3
  import isEqual from 'lodash/isEqual';
4
4
  import { makeStyles } from '@shopgate/engage/styles';
5
- import { RangeSlider } from '@shopgate/engage/components';
5
+ import { Accordion, RangeSlider } from '@shopgate/engage/components';
6
+ import { i18n } from '@shopgate/engage/core/helpers';
6
7
  import { FilterItem } from '@shopgate/engage/filter';
7
8
  import Label from "./components/Label";
8
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
9
+ import { jsx as _jsx } from "react/jsx-runtime";
9
10
  const useStyles = makeStyles()(theme => ({
10
- wrapper: {
11
- padding: theme.spacing(1.5, 2)
11
+ accordionContent: {
12
+ padding: theme.spacing(0, 2, 1)
12
13
  },
13
14
  rangeSliderContainer: {
14
15
  paddingTop: theme.spacing(2),
@@ -27,18 +28,18 @@ const useStyles = makeStyles()(theme => ({
27
28
  marginRight: theme.spacing(1)
28
29
  },
29
30
  rangeSliderHandleInner: {
30
- background: theme.palette.common.white,
31
- border: `1px solid ${theme.components.border.light}`,
32
- boxShadow: theme.shadows[2],
31
+ background: theme.palette.grey.light,
32
+ boxShadow: '0 0 8px rgba(0, 0, 0, .32)',
33
33
  ...theme.applyStyles('dark', {
34
- boxShadow: 'none',
35
- border: 'none'
34
+ background: '#F2F2F2'
36
35
  }),
37
36
  borderRadius: '50%',
38
37
  width: theme.spacing(3),
39
38
  height: theme.spacing(3)
40
39
  },
41
- rangeSliderHandleOuter: {}
40
+ rangeSliderHandleOuter: {
41
+ padding: theme.spacing(1)
42
+ }
42
43
  }));
43
44
 
44
45
  /**
@@ -79,31 +80,40 @@ const PriceSlider = ({
79
80
  }, [id, onChange]);
80
81
  const priceMin = Math.floor(value[0] / 100);
81
82
  const priceMax = Math.ceil(value[1] / 100);
82
- const priceLength = `${(max / 100).toString().length + 2}ch`;
83
+ const priceLength = (max / 100).toString().length;
84
+ const renderLabel = useCallback(() => /*#__PURE__*/_jsx(Label, {
85
+ priceLength: priceLength,
86
+ priceMax: priceMax,
87
+ priceMin: priceMin,
88
+ onChange: handleChange
89
+ }), [handleChange, priceLength, priceMax, priceMin]);
83
90
  return /*#__PURE__*/_jsx(FilterItem, {
84
- children: /*#__PURE__*/_jsxs("div", {
85
- className: classes.wrapper,
91
+ children: /*#__PURE__*/_jsx("div", {
86
92
  "data-test-id": "priceRangeSlider",
87
- children: [/*#__PURE__*/_jsx(Label, {
88
- priceLength: priceLength,
89
- priceMax: priceMax,
90
- priceMin: priceMin,
91
- onChange: handleChange
92
- }), /*#__PURE__*/_jsx(RangeSlider, {
93
- classNames: {
94
- container: classes.rangeSliderContainer,
95
- outerRange: classes.rangeSliderOuterRange,
96
- range: classes.rangeSliderRange,
97
- handleInner: classes.rangeSliderHandleInner,
98
- handleOuter: classes.rangeSliderHandleOuter
99
- },
100
- easing: useLinearEasing ? 'linear' : 'exponential',
101
- factor: 3,
102
- max: max,
103
- min: min,
104
- onChange: handleChange,
105
- value: value
106
- })]
93
+ children: /*#__PURE__*/_jsx(Accordion, {
94
+ openWithChevron: true,
95
+ startOpened: true,
96
+ renderLabel: renderLabel,
97
+ contentClassName: classes.accordionContent,
98
+ handleLabel: i18n.text('filter.filter_by', {
99
+ label: i18n.text('filter.label.price')
100
+ }),
101
+ children: /*#__PURE__*/_jsx(RangeSlider, {
102
+ classNames: {
103
+ container: classes.rangeSliderContainer,
104
+ outerRange: classes.rangeSliderOuterRange,
105
+ range: classes.rangeSliderRange,
106
+ handleInner: classes.rangeSliderHandleInner,
107
+ handleOuter: classes.rangeSliderHandleOuter
108
+ },
109
+ easing: useLinearEasing ? 'linear' : 'exponential',
110
+ factor: 3,
111
+ max: max,
112
+ min: min,
113
+ onChange: handleChange,
114
+ value: value
115
+ })
116
+ })
107
117
  })
108
118
  });
109
119
  };
@@ -0,0 +1,8 @@
1
+ export default buildFilterParamsForFetchFiltersRequest;
2
+ /**
3
+ * Creates the filter params to be used with a fetchFilters request.
4
+ * @param {Object} filters All configured filters
5
+ * @return {Object}
6
+ */
7
+ declare function buildFilterParamsForFetchFiltersRequest(filters?: Object): Object;
8
+ //# sourceMappingURL=buildFilterParamsForFetchFiltersRequest.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"buildFilterParamsForFetchFiltersRequest.d.ts","sourceRoot":"","sources":["../../../filter/helpers/buildFilterParamsForFetchFiltersRequest.js"],"names":[],"mappings":";AAEA;;;;GAIG;AACH,mEAHW,MAAM,GACL,MAAM,CAuCjB"}
@@ -0,0 +1,7 @@
1
+ /**
2
+ * @param {Object} filters The available filters.
3
+ * @param {Object} activeFilters The selected filters.
4
+ * @returns {Object}
5
+ */
6
+ export default function buildInitialFilters(filters: Object, activeFilters: Object): Object;
7
+ //# sourceMappingURL=buildInitialFilters.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"buildInitialFilters.d.ts","sourceRoot":"","sources":["../../../filter/helpers/buildInitialFilters.js"],"names":[],"mappings":"AAEA;;;;GAIG;AACH,qDAJW,MAAM,iBACN,MAAM,GACJ,MAAM,CAwBlB"}
@@ -0,0 +1,7 @@
1
+ /**
2
+ * @param {Object} initialFilters The filters before they where modified.
3
+ * @param {Object} updatedFilters The filters after they where modified.
4
+ * @return {Object}
5
+ */
6
+ export default function buildUpdatedFilters(initialFilters: Object, updatedFilters: Object): Object;
7
+ //# sourceMappingURL=buildUpdatedFilters.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"buildUpdatedFilters.d.ts","sourceRoot":"","sources":["../../../filter/helpers/buildUpdatedFilters.js"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,4DAJW,MAAM,kBACN,MAAM,GACL,MAAM,CAgCjB"}
@@ -0,0 +1,5 @@
1
+ export { default as buildInitialFilters } from "./buildInitialFilters";
2
+ export { default as buildUpdatedFilters } from "./buildUpdatedFilters";
3
+ export { default as buildFilterParamsForFetchFiltersRequest } from "./buildFilterParamsForFetchFiltersRequest";
4
+ export { translateFilterLabel } from "./translateFilterLabel";
5
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../filter/helpers/index.js"],"names":[],"mappings":""}
@@ -0,0 +1,8 @@
1
+ /**
2
+ * Translate filter label
3
+ * @param {string} id filter id.
4
+ * @param {string} label filter label.
5
+ * @returns {string}
6
+ */
7
+ export function translateFilterLabel(id: string, label: string): string;
8
+ //# sourceMappingURL=translateFilterLabel.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"translateFilterLabel.d.ts","sourceRoot":"","sources":["../../../filter/helpers/translateFilterLabel.js"],"names":[],"mappings":"AAEA;;;;;GAKG;AACH,yCAJW,MAAM,SACN,MAAM,GACJ,MAAM,CAIlB"}