@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
@@ -105,6 +105,12 @@ export declare const componentsSchema: {
105
105
  readonly price: {
106
106
  readonly vars: {
107
107
  readonly color: "";
108
+ readonly default: "";
109
+ readonly sale: "";
110
+ readonly striked: "";
111
+ readonly fontFamily: "";
112
+ readonly fontWeight: "";
113
+ readonly fontSize: "";
108
114
  };
109
115
  };
110
116
  readonly button: {
@@ -114,10 +120,18 @@ export declare const componentsSchema: {
114
120
  readonly textColor: "";
115
121
  };
116
122
  };
123
+ readonly iconButton: {
124
+ readonly vars: {
125
+ readonly background: "";
126
+ readonly borderRadius: "";
127
+ readonly boxShadow: "";
128
+ };
129
+ };
117
130
  readonly input: {
118
131
  readonly vars: {
119
132
  readonly background: "";
120
133
  readonly border: "";
134
+ readonly text: "";
121
135
  };
122
136
  };
123
137
  readonly separatorLine: {
@@ -253,6 +267,12 @@ export declare const componentsDefaults: {
253
267
  borderRadius: string;
254
268
  };
255
269
  };
270
+ iconButton: {
271
+ vars: {
272
+ background: (t: Theme) => string;
273
+ borderRadius: (t: Theme) => string | number;
274
+ };
275
+ };
256
276
  border: {
257
277
  vars: {
258
278
  light: string;
@@ -263,12 +283,19 @@ export declare const componentsDefaults: {
263
283
  price: {
264
284
  vars: {
265
285
  color: (t: Theme) => string;
286
+ default: (t: Theme) => string;
287
+ sale: (t: Theme) => string;
288
+ striked: (t: Theme) => string;
289
+ fontFamily: string;
290
+ fontWeight: string;
291
+ fontSize: string;
266
292
  };
267
293
  };
268
294
  input: {
269
295
  vars: {
270
296
  background: string;
271
297
  border: string;
298
+ text: (t: Theme) => string;
272
299
  };
273
300
  };
274
301
  separatorLine: {
@@ -1 +1 @@
1
- {"version":3,"file":"createComponents.types.d.ts","sourceRoot":"","sources":["../../../../styles/theme/createTheme/createComponents.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AAEzC,KAAK,KAAK,GAAG,IAAI,CAAC,SAAS,EAAE,YAAY,CAAC,CAAC;AAE3C;;;GAGG;AACH,KAAK,IAAI,GAAG,MAAM,GAAG,MAAM,GAAG,OAAO,GAAG,IAAI,GAAG,SAAS,CAAC;AAEzD;;;;;;;;;;GAUG;AACH,MAAM,MAAM,mBAAmB,CAAC,MAAM,IAClC,MAAM,GACN,MAAM,GACN,CAAC,CAAC,KAAK,EAAE,MAAM,KAAK,MAAM,GAAG,MAAM,CAAC,CAAC;AAEzC;;;;;;;;;;GAUG;AACH,MAAM,MAAM,oBAAoB,CAAC,OAAO,IACtC,OAAO,SAAS,IAAI,GAAG,MAAM,GA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 fontFamily: '',
100
+ fontWeight: '',
101
+ fontSize: ''
96
102
  }
97
103
  },
98
104
  button: {
@@ -102,10 +108,18 @@ export const componentsSchema = {
102
108
  textColor: ''
103
109
  }
104
110
  },
111
+ iconButton: {
112
+ vars: {
113
+ background: '',
114
+ borderRadius: '',
115
+ boxShadow: ''
116
+ }
117
+ },
105
118
  input: {
106
119
  vars: {
107
120
  background: '',
108
- border: ''
121
+ border: '',
122
+ text: ''
109
123
  }
110
124
  },
111
125
  separatorLine: {
@@ -242,6 +256,12 @@ export const componentsDefaults = {
242
256
  borderRadius: 'var(--sg-shape-borderRadius, 4px)'
243
257
  }
244
258
  },
259
+ iconButton: {
260
+ vars: {
261
+ background: t => t.palette.background.surface,
262
+ borderRadius: t => t.shape.borderRadius
263
+ }
264
+ },
245
265
  border: {
246
266
  vars: {
247
267
  light: '#F2F2F2',
@@ -251,13 +271,20 @@ export const componentsDefaults = {
251
271
  },
252
272
  price: {
253
273
  vars: {
254
- color: t => t.palette.primary.main
274
+ color: t => t.palette.primary.main,
275
+ default: t => t.palette.text.primary,
276
+ sale: t => t.palette.primary.main,
277
+ striked: t => t.palette.grey.dark,
278
+ fontFamily: 'inherit',
279
+ fontWeight: 'inherit',
280
+ fontSize: '16px'
255
281
  }
256
282
  },
257
283
  input: {
258
284
  vars: {
259
285
  background: '#F2F2F2',
260
- border: '#CCCCCC'
286
+ border: '#CCCCCC',
287
+ text: t => t.palette.text.primary
261
288
  }
262
289
  },
263
290
  separatorLine: {
@@ -1,69 +0,0 @@
1
- import React, { memo, useMemo } from 'react';
2
- import PropTypes from 'prop-types';
3
- import { makeStyles } from '@shopgate/engage/styles';
4
- import { jsx as _jsx } from "react/jsx-runtime";
5
- const useStyles = makeStyles()(theme => {
6
- const inactive = {
7
- border: `1px solid ${theme.components.border.medium}`,
8
- borderRadius: 2,
9
- color: 'inherit',
10
- height: 42,
11
- marginLeft: 8,
12
- marginBottom: 8,
13
- maxWidth: '100%',
14
- minWidth: 42,
15
- outline: 0,
16
- overflow: 'hidden',
17
- padding: '0 8px',
18
- textOverflow: 'ellipsis',
19
- whiteSpace: 'nowrap',
20
- transition: 'color 100ms cubic-bezier(0.25, 0.1, 0.25, 1), border-color 100ms cubic-bezier(0.25, 0.1, 0.25, 1)',
21
- willChange: 'color, border-color'
22
- };
23
- return {
24
- inactive,
25
- active: {
26
- ...inactive,
27
- borderColor: theme.palette.secondary.main,
28
- color: theme.palette.secondary.main
29
- }
30
- };
31
- });
32
-
33
- /**
34
- * The value button component.
35
- * @param {Object} props Props.
36
- * @returns {JSX.Element}
37
- */
38
- const ValueButton = ({
39
- id,
40
- isActive,
41
- label,
42
- onClick
43
- }) => {
44
- const {
45
- classes,
46
- cx
47
- } = useStyles();
48
- const buttonClassName = useMemo(() => cx({
49
- [classes.inactive]: !isActive,
50
- [classes.active]: isActive
51
- }), [classes.active, classes.inactive, isActive, cx]);
52
- return /*#__PURE__*/_jsx("button", {
53
- className: buttonClassName,
54
- value: id,
55
- onClick: onClick,
56
- "data-test-id": id,
57
- type: "button",
58
- role: "checkbox",
59
- "aria-checked": isActive,
60
- children: label
61
- });
62
- };
63
- ValueButton.defaultProps = {
64
- id: null,
65
- label: null,
66
- isActive: false,
67
- onClick() {}
68
- };
69
- export default /*#__PURE__*/memo(ValueButton);
@@ -1,22 +0,0 @@
1
- import { connect } from 'react-redux';
2
- import { getCurrentPathname } from '@shopgate/engage/core';
3
- import { updateFilters } from '@shopgate/pwa-common-commerce/filter/action-creators';
4
-
5
- /**
6
- * Maps the contents of the state to the component props.
7
- * @param {Object} state The current application state.
8
- * @return {Object} The extended component props.
9
- */
10
- const mapStateToProps = state => ({
11
- currentPathname: getCurrentPathname(state)
12
- });
13
-
14
- /**
15
- * @param {Function} dispatch The redux dispatch function.
16
- * @param {Object} props The components props.
17
- * @return {Object}
18
- */
19
- const mapDispatchToProps = {
20
- updateFilters
21
- };
22
- export default connect(mapStateToProps, mapDispatchToProps);