@bytebrand/fe-ui-core 4.2.250 → 4.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (123) hide show
  1. package/__tests__/utils/CommonUtils/getOfferSliders.test.ts +2 -4
  2. package/common.ts +2 -6
  3. package/package.json +2 -4
  4. package/source/components/AccordionWidget/AccordionWidget.tsx +3 -1
  5. package/source/components/Breadcrumbs/Breadcrumbs.tsx +3 -3
  6. package/source/components/Checkout/CheckoutStepper/CheckoutStepper.styl +190 -2
  7. package/source/components/Checkout/CheckoutStepper/CheckoutStepper.tsx +16 -15
  8. package/source/components/Checkout/OrderOverviewItem/OrderOverviewItem.styl +2 -2
  9. package/source/components/Checkout/OrderOverviewItem/OrderOverviewItem.tsx +3 -3
  10. package/source/components/FormattedNumber/FormattedNumber.tsx +3 -2
  11. package/source/components/InfoBlocks/FirstInfoBlock/FirstInfoBlockItem/FirstInfoBlockItem.styl +6 -4
  12. package/source/components/OfferDetailedSection/partials/PanelConfig.tsx +3 -0
  13. package/source/components/OfferPanel/MuiOfferPeriod/{MuiOfferPeriod.theme.tsx → MuiOfferPeriod.theme.js} +13 -8
  14. package/source/components/OfferPanel/MuiOfferPeriod/MuiOfferPeriod.tsx +4 -28
  15. package/source/components/OfferPanel/OfferCheckboxGroup/CheckboxContainer.tsx +12 -6
  16. package/source/components/OfferPanel/OfferCheckboxGroup/OfferCheckboxGroup.tsx +1 -1
  17. package/source/components/OfferPanel/OfferPanel.tsx +1 -1
  18. package/source/components/OfferPanel/OfferPeriod/OfferPeriod.tsx +4 -0
  19. package/source/components/OfferPanel/RangeGroup/RangeGroup.tsx +4 -6
  20. package/source/components/PriceRatingDetailed/PriceRatingDetailed.tsx +2 -6
  21. package/source/components/SearchFilters/filters/AlternativeID.tsx +53 -42
  22. package/source/components/SearchFilters/filters/DriveType.tsx +1 -1
  23. package/source/components/SearchFilters/filters/EmissionSticker.tsx +1 -1
  24. package/source/components/SearchFilters/filters/FirstRegistration.tsx +1 -0
  25. package/source/components/SearchFilters/filters/InteriorColor.tsx +1 -1
  26. package/source/components/SearchFilters/filters/InteriorMaterial.tsx +1 -2
  27. package/source/components/SearchFilters/filters/Mileage.tsx +1 -1
  28. package/source/components/SearchFilters/filters/Power.tsx +17 -36
  29. package/source/components/SearchFilters/filters/StateOptions.tsx +1 -0
  30. package/source/components/SearchFilters/filters/Transmission.tsx +1 -1
  31. package/source/components/SearchPage/SearchChips/SearchChips.tsx +1 -1
  32. package/source/components/SearchPageMobile/FiltersDetailed/BodyType.tsx +3 -3
  33. package/source/components/SearchPageMobile/FiltersDetailed/Consumption.tsx +2 -2
  34. package/source/components/SearchPageMobile/FiltersDetailed/Doors.tsx +1 -1
  35. package/source/components/SearchPageMobile/FiltersDetailed/MakeModel.tsx +1 -1
  36. package/source/components/SearchWidget/ColorWidget/BodyColorWidget.tsx +3 -3
  37. package/source/components/SearchWidget/EnvironmentWidget/EnvironmentWidget.tsx +3 -3
  38. package/source/components/SearchWidget/HighlightsWidget/HighlightsWidget.tsx +2 -2
  39. package/source/components/SearchWidget/StateWidget/StateWidget.tsx +2 -1
  40. package/source/components/SearchWidgetsMobile/BasicDataWidgetMobile/BasicDataWidgetMobile.tsx +4 -4
  41. package/source/components/SearchWidgetsMobile/EquipmentsWidget/EquipmentsWidget.tsx +16 -16
  42. package/source/components/SearchWidgetsMobile/HighlightsWidgetMobile/HighlightsWidgetMobile.tsx +1 -1
  43. package/source/components/SearchWidgetsMobile/InteriorWidget/InteriorWidget.tsx +1 -1
  44. package/source/components/SearchWidgetsMobile/SafetyWidget/SafetyWidget.tsx +6 -6
  45. package/source/components/Stepper/Stepper.tsx +3 -4
  46. package/source/components/UserDashboardPage/sections/OrderStatusSection/AdditionalOrderInfo.styl +2 -11
  47. package/source/components/UserDashboardPage/sections/OrderStatusSection/AdditionalOrderInfo.tsx +5 -5
  48. package/source/components/UserDashboardPage/sections/OrderStatusSection/OrderStatusCar.tsx +38 -57
  49. package/source/components/UserDashboardPage/sections/OrderStatusSection/OrderStatusCard.tsx +2 -2
  50. package/source/components/UserDashboardPage/sections/OrderStatusSection/OrderStatusSection.tsx +101 -183
  51. package/source/components/UserDashboardPage/sections/RequestedCarsSection/RequestedCarsSection.tsx +7 -5
  52. package/source/components/Vehicle/VehicleFormattedPrice/VehicleFormattedPrice.tsx +7 -33
  53. package/source/components/VehicleDetailedSidebar/VehicleDetailedSidebar.styl +2 -10
  54. package/source/components/VehicleDetailedSidebar/VehicleDetailedSidebar.tsx +14 -54
  55. package/source/components/VehicleDetailedSidebar/partials/Price.styl +1 -5
  56. package/source/components/VehicleDetailedSidebar/partials/Price.tsx +1 -2
  57. package/source/components/VehicleDetailedSidebar/partials/PriceContent.styl +5 -16
  58. package/source/components/VehicleDetailedSidebar/partials/PriceContent.tsx +4 -9
  59. package/source/components/VehicleDetailedSidebar/partials/Properties.tsx +1 -1
  60. package/source/components/VehicleDetailedSlider/VehicleDetailedSlider.styl +0 -45
  61. package/source/components/VehicleDetailedSlider/VehicleDetailedSlider.tsx +42 -121
  62. package/source/components/VehicleDetailedSlider/partials/PriceData.styl +1 -4
  63. package/source/components/VehicleDetailedSlider/partials/PriceData.tsx +1 -8
  64. package/source/components/VehicleDetailedSlider/partials/Stats.tsx +2 -2
  65. package/source/components/VehicleSmallCard/VehicleData/VechiclePriceItem/VechiclePriceItem.tsx +7 -9
  66. package/source/components/VehicleSmallCard/VehicleData/VehiclePrice/VehiclePrice.styl +1 -35
  67. package/source/components/VehicleSmallCard/VehicleData/VehiclePrice/VehiclePrice.tsx +3 -9
  68. package/source/components/VehicleSmallCard/VehicleData/VehicleTitle/VehicleTitle.styl +2 -11
  69. package/source/components/VehicleSmallCard/VehicleData/VehicleTitle/VehicleTitle.tsx +1 -2
  70. package/source/components/VehicleSmallCard/VehicleSmallCard.styl +1 -3
  71. package/source/components/VehicleSmallCard/VehicleSmallCard.tsx +7 -3
  72. package/source/components/_common/Badge/Badge.styl +0 -3
  73. package/source/components/_common/Badge/Badge.tsx +1 -1
  74. package/source/components/_common/Button/Button.tsx +4 -5
  75. package/source/components/_common/Checkbox/FormCheckbox.tsx +4 -4
  76. package/source/components/_common/CheckboxMaterial/CheckboxMaterial.tsx +1 -1
  77. package/source/components/_common/Chip/Chip.tsx +3 -1
  78. package/source/components/_common/ExpansionPanel/ExpansionPanel.tsx +3 -3
  79. package/source/components/_common/IconSVG/IconSVGConfig.tsx +0 -2
  80. package/source/components/_common/IconSVG/SVG/flags/SK.tsx +1 -0
  81. package/source/components/_common/IconSVG/SVG/slider/360New.tsx +1 -1
  82. package/source/components/_common/MaterialAccordion/MaterialAccordion.tsx +30 -22
  83. package/source/components/_common/MaterialAutocomplete/MaterialAutocomplete.styled.tsx +8 -8
  84. package/source/components/_common/MaterialDatePicker/MaterialDatePicker.styled.tsx +1 -0
  85. package/source/components/_common/MaterialSelect/MaterialSelect.styled.tsx +15 -12
  86. package/source/components/_common/MaterialSelect/MaterialSelect.tsx +3 -3
  87. package/source/components/_common/MaterialSwitch/MaterialSwitch.tsx +1 -3
  88. package/source/components/_common/MaterialTooltip/MaterialTooltip.styled.tsx +1 -1
  89. package/source/components/_common/MaterialTooltip/MaterialTooltip.tsx +3 -3
  90. package/source/components/_common/Modal/CookieModal.tsx +3 -1
  91. package/source/components/_common/Modal/Modal.styled.tsx +1 -2
  92. package/source/components/_common/Modal/Modal.tsx +5 -1
  93. package/source/components/_common/Modal/ModalsConfig.tsx +1 -5
  94. package/source/components/_common/Modal/modals/ManageCookieModal/ManageCookieModal.styl +7 -23
  95. package/source/components/_common/Modal/modals/ManageCookieModal/ManageCookieModal.tsx +36 -84
  96. package/source/components/_common/Modal/modals/PreviewCookieModal/PreviewCookieModal.styl +14 -29
  97. package/source/components/_common/Modal/modals/PreviewCookieModal/PreviewCookieModal.tsx +10 -17
  98. package/source/components/_common/OfferRequestButtonWrapper/OfferRequestButtonWrapper.tsx +4 -12
  99. package/source/components/_common/Range/Range.tsx +14 -27
  100. package/source/components/_common/UserMenu/MaterialMenu.styled.tsx +1 -0
  101. package/source/components/_common/UserMenu/MaterialMenu.tsx +3 -3
  102. package/source/components/_common/UserMenu/MaterialMenuItem.tsx +20 -42
  103. package/source/components/_common/UserMenu/NestedMenu.tsx +1 -1
  104. package/source/components/_common/withStats/withStats.styl +0 -3
  105. package/source/components/_common/withStats/withStats.tsx +16 -19
  106. package/source/components/containers/SearchPage/FiltersContainer/FiltersContainer.styl +1 -14
  107. package/source/components/containers/SearchPage/FiltersContainer/FiltersContainer.tsx +42 -78
  108. package/source/framework/constants/common.ts +60 -89
  109. package/source/framework/constants/highlights.ts +1 -1
  110. package/source/framework/constants.ts +1 -1
  111. package/source/framework/types/types.ts +4 -9
  112. package/source/framework/utils/CommonUtils.ts +62 -73
  113. package/source/framework/utils/DateUtils.ts +2 -10
  114. package/source/locales/data.ts +2 -2
  115. package/tslint.json +2 -1
  116. package/utils.ts +0 -2
  117. package/__tests__/components/UserDasboardPage/sections/CheckoutSection/CheckoutSection.test.tsx +0 -613
  118. package/__tests__/components/UserDasboardPage/sections/FavoriteSection/FavoriteSection.test.tsx +0 -335
  119. package/source/components/UserDashboardPage/sections/CheckoutSection/CheckoutSection.styl +0 -38
  120. package/source/components/UserDashboardPage/sections/CheckoutSection/CheckoutSection.tsx +0 -120
  121. package/source/components/UserDashboardPage/sections/FavoriteSection/FavoriteSection.styl +0 -22
  122. package/source/components/UserDashboardPage/sections/FavoriteSection/FavoriteSection.tsx +0 -84
  123. package/source/components/_common/IconSVG/SVG/slider/YoutubeButton.tsx +0 -26
@@ -1,12 +1,12 @@
1
1
  import React, { useEffect, useState } from 'react';
2
2
  import _merge from 'lodash/merge';
3
3
  import classNames from 'classnames';
4
- import _get from 'lodash/get';
4
+
5
5
  import IconSVG from '../../../IconSVG/IconSVG';
6
6
  import Button from '../../../Button/Button';
7
7
  import MaterialAccordionGroup from '../../../MaterialAccordionGroup/MaterialAccordionGroup';
8
8
  import MaterialSwitch from '../../../MaterialSwitch/MaterialSwitch';
9
- import { COOKIE_SCHEMA, COOKIE_SCHEMA_LINKS } from '../../../../../framework/constants/common';
9
+ import { COOKIE_SCHEMA } from '../../../../../framework/constants/common';
10
10
  import { updateCookieList } from '../../../../../framework/utils/CommonUtils';
11
11
 
12
12
  import styles from './ManageCookieModal.styl';
@@ -16,25 +16,16 @@ interface IManageCookieModal {
16
16
  handleSentryInit?: () => void;
17
17
  }
18
18
 
19
- interface IMarketingSwitches {
20
- [key: string]: any;
21
- }
22
-
23
19
  const ManageCookieModal = ({ toggleModal, handleSentryInit } : IManageCookieModal) => {
24
- const [analytcisMasterSwitch, setAnalyticsMasterSwitch] = useState(false);
25
- const [marketingMasterSwitch, setMarketingMasterSwitch] = useState(false);
26
- const [analyticsSwitches, setAnalyticsSwitches] = useState<IMarketingSwitches>({});
27
- const [marketingSwitches, setMarketingSwitches] = useState<IMarketingSwitches>({});
20
+ const [analytcisMasterSwitch, setAnalyticsMasterSwitch] = useState(true);
21
+ const [marketingMasterSwitch, setMarketingMasterSwitch] = useState(true);
22
+ const [analyticsSwitches, setAnalyticsSwitches] = useState({});
23
+ const [marketingSwitches, setMarketingSwitches] = useState({});
28
24
 
29
25
  useEffect(
30
26
  () => {
31
- const newAnalyticsSwitches = Object.values(COOKIE_SCHEMA.analytics)
32
- .reduce((acc, val) => acc.concat(val), [])
33
- .reduce((acc, item) => ({ ...acc, [item]: false }), {});
34
-
35
- const newMarketingSwitches = Object.values(COOKIE_SCHEMA.marketing)
36
- .reduce((acc, val) => acc.concat(val), [])
37
- .reduce((acc, item) => ({ ...acc, [item]: false }), {});
27
+ const newAnalyticsSwitches = Object.keys(COOKIE_SCHEMA.analytics).reduce((acc, item) => ({ ...acc, [item]: true }), {});
28
+ const newMarketingSwitches = Object.keys(COOKIE_SCHEMA.marketing).reduce((acc, item) => ({ ...acc, [item]: true }), {});
38
29
  setAnalyticsSwitches(newAnalyticsSwitches);
39
30
  setMarketingSwitches(newMarketingSwitches);
40
31
  },
@@ -42,18 +33,13 @@ const ManageCookieModal = ({ toggleModal, handleSentryInit } : IManageCookieModa
42
33
  );
43
34
 
44
35
  const onHandleAnalyticsSwitchValue = (value: boolean) => {
45
- const newAnalyticsSwitches = Object.values(COOKIE_SCHEMA.analytics)
46
- .reduce((acc, val) => acc.concat(val), [])
47
- .reduce((acc, item) => ({ ...acc, [item]: value }), {});
48
-
36
+ const newAnalyticsSwitches = Object.keys(analyticsSwitches).reduce((acc, item) => ({ ...acc, [item]: value }), {});
49
37
  setAnalyticsSwitches(newAnalyticsSwitches);
50
38
  setAnalyticsMasterSwitch(value);
51
39
  };
52
40
 
53
41
  const onHandleMarketingSwitchValue = (value: boolean) => {
54
- const newMarketingSwitches = Object.values(COOKIE_SCHEMA.marketing)
55
- .reduce((acc, val) => acc.concat(val), [])
56
- .reduce((acc, item) => ({ ...acc, [item]: value }), {});
42
+ const newMarketingSwitches = Object.keys(marketingSwitches).reduce((acc, item) => ({ ...acc, [item]: value }), {});
57
43
  setMarketingSwitches(newMarketingSwitches);
58
44
  setMarketingMasterSwitch(value);
59
45
  };
@@ -74,7 +60,7 @@ const ManageCookieModal = ({ toggleModal, handleSentryInit } : IManageCookieModa
74
60
  onChange: () => {}
75
61
  };
76
62
 
77
- const onAccept = (value?: Record<string, any>) => {
63
+ const onAccept = (value?: object) => {
78
64
  const cookieConfig = value || {
79
65
  marketing: Object.keys(marketingSwitches).filter(i => !marketingSwitches[i]) || [],
80
66
  analytics: Object.keys(analyticsSwitches).filter(i => !analyticsSwitches[i]) || []
@@ -83,22 +69,6 @@ const ManageCookieModal = ({ toggleModal, handleSentryInit } : IManageCookieModa
83
69
  updateCookieList(handleSentryInit);
84
70
  toggleModal();
85
71
  };
86
-
87
- const onHandleChangeInnerSwitchAnalytics = (cookiesFromCategory: any, isChecked: boolean) => {
88
- const updatedSwitches = { ...analyticsSwitches };
89
- for (const item of cookiesFromCategory) {
90
- updatedSwitches[item] = !isChecked
91
- }
92
- setAnalyticsSwitches(updatedSwitches);
93
- };
94
-
95
- const onHandleChangeInnerSwitchMarketing = (cookiesFromCategory: any, isChecked: boolean) => {
96
- const updatedSwitches = { ...marketingSwitches };
97
- for (const item of cookiesFromCategory) {
98
- updatedSwitches[item] = !isChecked
99
- }
100
- setMarketingSwitches(updatedSwitches);
101
- };
102
72
 
103
73
  return (
104
74
  <div className={styles.modalWrapper}>
@@ -113,16 +83,12 @@ const ManageCookieModal = ({ toggleModal, handleSentryInit } : IManageCookieModa
113
83
  switchProps={necessarySwitchProps}
114
84
  >
115
85
  <span>Wir verwenden Browser-Cookies, die notwendig sind, damit die Website wie vorgesehen funktioniert. Beispiel: Wir speichern Ihre Präferenzen bei der Datenerfassung auf der Website, damit wir sie berücksichtigen können, wenn Sie auf unsere Website zurückkehren. Sie können diese Cookies in den Einstellungen Ihres Browsers deaktivieren, aber wenn Sie dies tun, funktioniert die Website möglicherweise nicht wie vorgesehen.</span>
116
- {Object.keys(COOKIE_SCHEMA.necessary).map(cookie => {
117
- const getLinkFromCategory = _get(COOKIE_SCHEMA_LINKS, [cookie], '');
118
- return (
119
- <div className={styles.switchBlock} key={cookie} >
120
- <span className={styles.switchBlockTitle}>{cookie}</span>
121
- <a className={styles.switchBlockLink} href={getLinkFromCategory} target='_blank'>Datenschutzbestimmungen</a>
122
- <MaterialSwitch sx={{ marginLeft: 'auto' }} disabled={true} value={true} onChange={() => {}} />
123
- </div>
124
- );
125
- })}
86
+ {Object.keys(COOKIE_SCHEMA.necessary).map(cookie =>
87
+ <div className={styles.switchBlock} key={cookie} >
88
+ <span>{`${COOKIE_SCHEMA.necessary[cookie].name} (${cookie})`}</span>
89
+ <MaterialSwitch disabled={true} value={true} onChange={() => {}} />
90
+ </div>
91
+ )}
126
92
  </MaterialAccordionGroup>
127
93
  <MaterialAccordionGroup
128
94
  title='Analytisch'
@@ -131,22 +97,15 @@ const ManageCookieModal = ({ toggleModal, handleSentryInit } : IManageCookieModa
131
97
  switchProps={analyticsSwitchProps}
132
98
  >
133
99
  <span>Um das Nutzerverhalten zu verstehen und Ihnen ein relevanteres Surferlebnis zu bieten oder den Inhalt unserer Website zu personalisieren. Beispiel: Wir sammeln Informationen darüber, welche Seiten Sie besuchen, damit wir Ihnen relevantere Informationen präsentieren können.</span>
134
- {Object.keys(COOKIE_SCHEMA.analytics).map(cookie => {
135
- const getItemsFromCategory = _get(COOKIE_SCHEMA, `analytics['${cookie}']`, null);
136
- const getLinkFromCategory = _get(COOKIE_SCHEMA_LINKS, [cookie], '');
137
- const isChecked = getItemsFromCategory.every((item: string) => analyticsSwitches[item] === false);
138
- return (
139
- <div className={styles.switchBlock} key={cookie} >
140
- <span className={styles.switchBlockTitle}>{cookie}</span>
141
- <a className={styles.switchBlockLink} href={getLinkFromCategory} target='_blank'>Datenschutzbestimmungen</a>
142
- <MaterialSwitch
143
- sx={{ marginLeft: 'auto' }}
144
- value={analytcisMasterSwitch}
145
- onChange={() => onHandleChangeInnerSwitchAnalytics(getItemsFromCategory, isChecked)}
146
- />
147
- </div>
148
- );
149
- })}
100
+ {Object.keys(COOKIE_SCHEMA.analytics).map(cookie =>
101
+ <div className={styles.switchBlock} key={cookie} >
102
+ <span>{`${COOKIE_SCHEMA.analytics[cookie].name} (${cookie})`}</span>
103
+ <MaterialSwitch
104
+ value={analyticsSwitches[cookie]}
105
+ onChange={() => { setAnalyticsSwitches(s => ({ ...s, [cookie]: !s[cookie] })); }}
106
+ />
107
+ </div>
108
+ )}
150
109
  </MaterialAccordionGroup>
151
110
  <MaterialAccordionGroup
152
111
  title='Marketing'
@@ -155,26 +114,19 @@ const ManageCookieModal = ({ toggleModal, handleSentryInit } : IManageCookieModa
155
114
  switchProps={marketingSwitchProps}
156
115
  >
157
116
  <span>Zur Personalisierung und Messung der Effektivität von Werbung auf unserer Website und anderen Websites. Beispiel: Wir können Ihnen eine personalisierte Werbung auf der Grundlage der von Ihnen besuchten Seiten auf unserer Website anzeigen.</span>
158
- {Object.keys(COOKIE_SCHEMA.marketing).map(cookie => {
159
- const getItemsFromCategory = _get(COOKIE_SCHEMA, `marketing['${cookie}']`, null);
160
- const getLinkFromCategory = _get(COOKIE_SCHEMA_LINKS, [cookie], '');
161
- const isChecked = getItemsFromCategory.every((item: string) => marketingSwitches[item] === false);
162
- return (
163
- <div className={styles.switchBlock} key={cookie} >
164
- <span className={styles.switchBlockTitle}>{cookie}</span>
165
- <a className={styles.switchBlockLink} href={getLinkFromCategory} target='_blank'>Datenschutzbestimmungen</a>
166
- <MaterialSwitch
167
- sx={{ marginLeft: 'auto' }}
168
- value={marketingMasterSwitch}
169
- onChange={() => onHandleChangeInnerSwitchMarketing(getItemsFromCategory, isChecked)}
170
- />
171
- </div>
172
- )
173
- })}
117
+ {Object.keys(COOKIE_SCHEMA.marketing).map(cookie =>
118
+ <div className={styles.switchBlock} key={cookie} >
119
+ <span>{`${COOKIE_SCHEMA.marketing[cookie].name} (${cookie})`}</span>
120
+ <MaterialSwitch
121
+ value={marketingSwitches[cookie]}
122
+ onChange={() => setMarketingSwitches(s => ({ ...s, [cookie]: !s[cookie] }))}
123
+ />
124
+ </div>
125
+ )}
174
126
  </MaterialAccordionGroup>
175
127
  </div>
176
128
  <div className={styles.buttonsContainer}>
177
- <Button onClick={() => onAccept()} className={classNames(styles.modalBtn, styles.outlinedBtn)} >Auswahl speichern</Button>
129
+ <Button onClick={() => onAccept()}className={classNames(styles.modalBtn, styles.outlinedBtn)} variant='outlined'>Auswahl speichern</Button>
178
130
  <Button onClick={() => onAccept({})} className={styles.modalBtn}>Alles akzeptieren</Button>
179
131
  </div>
180
132
  </div>
@@ -1,12 +1,12 @@
1
1
  @import '../../../../../theme/mixins.styl';
2
2
 
3
3
  .modalWrapper
4
- padding: 28px 58px 28px
4
+ padding: 26px 60px 38px
5
5
  text-align: center
6
6
  box-sizing: border-box
7
7
  max-width: 600px
8
- +media-tablet-down()
9
- padding: 16px 15px 28px
8
+ +media-phone-only()
9
+ padding: 13px 15px 28px
10
10
 
11
11
  .modalTitle
12
12
  font-family: sans-serif
@@ -16,52 +16,37 @@
16
16
  color: rgba(76, 78, 100, 0.87)
17
17
  margin-top: 20px
18
18
 
19
- +media-tablet-down()
20
- font-size: 16px;
21
- margin-top: 8px;
22
-
23
19
  .modalContent
24
20
  font-family: sans-serif
25
- font-size: 14px;
26
- line-height: 16px;
21
+ font-size: 16px;
22
+ line-height: 24px;
27
23
  text-align: justify;
28
24
  letter-spacing: 0.15px;
29
25
  color: rgba(76, 78, 100, 0.87);
30
26
  margin-top: 20px
31
- +media-tablet-down()
32
- column-gap: 0;
33
- max-height: 320px;
34
- overflow-y: scroll;
35
- padding-right: 10px;
36
- margin-right: -10px;
37
- margin-top: 8px
38
-
39
- .logoContainer
40
- display: flex
41
- justify-content: space-between
27
+ +media-phone-only()
28
+ column-gap: 0
42
29
 
43
30
  .buttonsContainer
44
- margin-top: 12px
31
+ margin-top: 20px
45
32
  display: flex
46
33
  justify-content: space-between
47
34
  gap: 36px;
48
- +media-tablet-down()
35
+ +media-phone-only()
49
36
  column-gap: 0
50
37
 
51
38
  .modalBtn
52
39
  height: 38px
53
40
  text-transform: capitalize !important
54
41
  min-width: calc(50% - 18px) !important
55
- +media-tablet-down()
42
+ +media-phone-only()
56
43
  font-size: 11px !important
57
44
 
58
45
  .outlinedBtnLeft
59
- display: flex;
60
- justify-content: flex-end;
46
+ float: right;
61
47
  color: #005CCB;
62
48
  font-size: 16px;
63
49
  text-decoration: none;
64
- margin-top: 12px;
65
- margin-bottom: 0;
66
- margin-left: auto;
67
- max-width: 80px;
50
+
51
+ .clearfix
52
+ clear: both;
@@ -18,28 +18,21 @@ const PreviewCookieModal = ({ toggleModal, setModal, handleSentryInit } : IPrevi
18
18
  toggleModal();
19
19
  };
20
20
 
21
- const onDisableAll = () => {
22
- localStorage.setItem('cookieConfig', JSON.stringify({
23
- 'marketing':['cf','cip','cnac','car','test_cookie','IDE', 'bid','youtube'],
24
- 'analytics':['sentry','callback','locale','uid','PugT','demdex','cto_bundle','tuuid','tuuid_lu','c','CMID','CMPS','CMPRO','uuid2','um','umeh','KRTBCOOKIE_97','IDSYNC','dpm','_kuid_','visitor-id','data-c-ts','data-c','CMTS','mv_tokens','A3','mv_tokens_eu-v1','am_tokens','am_tokens_eu-v1','iteo','_fbp','_clck','_clsk','_uetsid','_uetvid','analytics_storage','ad_storage','functionality_storage','personalization_storage','security_storage','hotjar']
25
- }));
26
- updateCookieList(handleSentryInit);
27
- toggleModal();
28
- };
29
-
30
21
  return (
31
22
  <div className={styles.modalWrapper}>
32
- <div className={styles.logoContainer}>
33
- <IconSVG name='autodeLogo' customDimensions />
34
- <Button onClick={onDisableAll} className={styles.modalBtn}>Nur notwendige Cookies</Button>
35
- </div>
23
+ <IconSVG name='autodeLogo' customDimensions />
36
24
  <div className={styles.modalTitle}>Nach den Cookies geht die Fahrt weiter.</div>
37
25
  <div className={styles.modalContent}>
38
- Wir verwenden Cookies und ähnliche Technologien (insg. „Cookies“). Cookies die notwendig sind, damit die Website wie vorgesehen funktioniert, werden standardmäßig gesetzt. Cookies, die dazu dienen das Nutzerverhalten zu verstehen und Ihnen ein relevantes bzw. personalisiertes Surferlebnis zu bieten, sowie Cookies zur Personalisierung und Messung der Effektivität von Werbung auf unserer und anderen Websites setzen wir nur mit Ihrer Einwilligung ein. Unsere Partner führen diese Daten möglicherweise mit weiteren Daten zusammen, die Sie ihnen bereitgestellt oder die sie im Rahmen Ihrer Nutzung gesammelt haben. Durch Klick auf "Zustimmen" akzeptieren Sie alle Cookies und die beschriebene Verarbeitung Ihrer Daten. Bevor Sie Ihre Zustimmung erteilen, beachten Sie bitte, dass wir Ihre Daten auch mit Partnern mit Sitz in den USA teilen. Die USA weisen kein mit der EU vergleichbares Datenschutzniveau auf. Es besteht das Risiko, dass US-Behörden Zugriff auf Ihre Daten haben und Sie Ihre Betroffenenrechte nicht durchsetzen können. Über "Anpassen" können Sie Ihre Einwilligungen individuell anpassen. Dies ist auch später jederzeit im Bereich&nbsp;
39
- <a href={`${environment}/datenschutz/`} target='_blank' style={{ textDecoration: 'underline', color: 'rgba(76,78,100,0.87)' }}>Cookie-Richtlinie</a> möglich. Weitere Informationen finden Sie in unserer&nbsp;
40
- <a href={`${environment}/datenschutz/`} target='_blank' style={{ textDecoration: 'underline', color: 'rgba(76,78,100,0.87)' }}>Datenschutzerklärung</a>.
26
+ Wenn Sie auf "Zustimmen" klicken, ermöglichen Sie uns über Cookies das Nutzerverhalten
27
+ für alle User zu optimieren und Ihnen individuelle Empfehlungen auch auf Drittseiten anzuzeigen.
28
+ Durch die Zustimmung erteilen Sie uns Ihre ausdrückliche Einwilligung.
29
+ Über "Anpassen" können Sie Ihre Einwilligungen individuell anpassen.
30
+ Dies ist auch später jederzeit im Bereich "Cookie-Richtlinie" möglich.
31
+ Die relevante Datenschutzerklärung finden Sie&nbsp;
32
+ <a href={`${environment}/datenschutz/`} target='_blank' style={{ textDecoration: 'underline', color: 'rgba(76,78,100,0.87)' }}>hier</a>.
33
+ <a href={`${environment}/impressum/`} target='_blank' className={styles.outlinedBtnLeft}>Impressum</a>
41
34
  </div>
42
- <a href={`${environment}/impressum/`} target='_blank' className={styles.outlinedBtnLeft}>Impressum</a>
35
+ <div className={styles.clearfix}></div>
43
36
  <div className={styles.buttonsContainer}>
44
37
  <Button onClick={() => setModal('MANAGE_COOKIE_MODAL')} className={styles.modalBtn} variant='outlined'>Anpassen</Button>
45
38
  <Button onClick={onAcceptAll} className={styles.modalBtn}>zustimmen</Button>
@@ -23,18 +23,13 @@ const OfferRequestBtnWrapper: React.FunctionComponent<IOfferRequestButtonWrapper
23
23
  const dealerId = _get(car, 'metaData.ownerId') || null;
24
24
  const carId = _get(car, '_id', '');
25
25
  const onAutoDeIdClick = () => {
26
- btnEl.current?.click();
26
+ btnEl.current.onClick();
27
27
  };
28
28
 
29
29
  const controlsContainerClassName = classnames(
30
30
  styles.controlsContainer,
31
31
  controlsClassContainer
32
32
  );
33
-
34
- const getRef = (ref: HTMLButtonElement): void => {
35
- btnEl.current = ref;
36
- };
37
-
38
33
  return (
39
34
  <>
40
35
  <div className={controlsContainerClassName}>
@@ -46,9 +41,8 @@ const OfferRequestBtnWrapper: React.FunctionComponent<IOfferRequestButtonWrapper
46
41
  _: void,
47
42
  isLoading: boolean,
48
43
  isSale: boolean,
49
- isAlternative: boolean,
50
- isSuccess: boolean
51
- ) => {
44
+ isAlternative: boolean
45
+ ) => {
52
46
  const { metaData } = car;
53
47
  const isAlternativeType = !!metaData && !!metaData.type;
54
48
  const offerButtonClassName = classnames(
@@ -58,12 +52,10 @@ const OfferRequestBtnWrapper: React.FunctionComponent<IOfferRequestButtonWrapper
58
52
  { [styles.isAlternativeButton]: isAlternative || isSale || isAlternativeType }
59
53
  );
60
54
 
61
-
62
55
  const getRequestButtonTitle = () => {
63
56
  if (isSale) return t('sidebar.requestOfferSale');
64
57
  // tslint:disable-next-line:no-else-after-return
65
58
  else if (isAlternativeType) return t('sidebar.importRequest');
66
- else if (isSuccess) return t('CheckoutPage:onlineCheckoutModal.toMyOrder');
67
59
  else if (hasCheckout) return t('vehicleProps:title.toCheckoutCar');
68
60
  else if (isOfferRequested) return t('CheckoutPage:onlineCheckoutModal.redirectBtn');
69
61
  else return t('sidebar.requestOffer');
@@ -71,10 +63,10 @@ const OfferRequestBtnWrapper: React.FunctionComponent<IOfferRequestButtonWrapper
71
63
 
72
64
  return (
73
65
  <StyledButton
66
+ refs={btnEl}
74
67
  className={offerButtonClassName}
75
68
  onClick={onClick}
76
69
  loading={isLoading}
77
- getRef={getRef}
78
70
  >
79
71
  {isOfferRequested
80
72
  ? null
@@ -1,8 +1,8 @@
1
- import React, { useState, useEffect } from 'react';
1
+ import React from 'react';
2
2
  import FormattedNumber from '../../FormattedNumber/FormattedNumber';
3
3
  import { Slider } from '@mui/material';
4
4
  import { isMobileOnly } from 'react-device-detect';
5
- import { createTheme, ThemeProvider } from '@mui/material/styles';
5
+ import { ThemeProvider } from '@mui/material/styles';
6
6
 
7
7
  interface IRangeProps {
8
8
  children?: JSX.Element;
@@ -11,12 +11,10 @@ interface IRangeProps {
11
11
  step: number;
12
12
  units: string;
13
13
  value: number;
14
- withRangeLimit?: boolean;
15
14
  onChange: (event: Event, value: number | number[], activeThumb?: number) => void;
16
- maxFinancingFirstInstallment?: number;
17
15
  }
18
16
 
19
- const Theme = createTheme({
17
+ const Theme = {
20
18
  components: {
21
19
  MuiSlider: {
22
20
  styleOverrides: {
@@ -24,10 +22,15 @@ const Theme = createTheme({
24
22
  padding: '2px 6px',
25
23
  fontSize: 12
26
24
  }
25
+ },
26
+ palette: {
27
+ primary: {
28
+ main: '#005CCB'
29
+ }
27
30
  }
28
31
  }
29
- }
30
- });
32
+ },
33
+ };
31
34
 
32
35
  const Range: React.FC<IRangeProps> = ({
33
36
  min,
@@ -35,24 +38,8 @@ const Range: React.FC<IRangeProps> = ({
35
38
  step,
36
39
  value,
37
40
  units,
38
- withRangeLimit,
39
- onChange,
40
- maxFinancingFirstInstallment
41
+ onChange
41
42
  }: IRangeProps) => {
42
- const [rangeValue, setRangeValue] = useState<number | number[]>(0);
43
-
44
- useEffect(
45
- () => {
46
- setRangeValue(value);
47
- },
48
- [value]
49
- )
50
-
51
- const onChangeRange = (event: Event, value: number | number[]) => {
52
- setRangeValue(value);
53
- onChange(event, value)
54
- }
55
-
56
43
  const formttedValue = (value: number) => {
57
44
  return (
58
45
  <>
@@ -65,13 +52,13 @@ const Range: React.FC<IRangeProps> = ({
65
52
  <ThemeProvider theme={Theme}>
66
53
  <Slider
67
54
  min={min}
68
- max={withRangeLimit ? maxFinancingFirstInstallment : max}
55
+ max={max}
69
56
  step={step}
70
57
  disableSwap={isMobileOnly ? true : false}
71
58
  valueLabelDisplay='auto'
72
59
  valueLabelFormat={formttedValue}
73
- value={rangeValue}
74
- onChange={onChangeRange}
60
+ value={value}
61
+ onChange={(event: Event, value: number | number[]) => onChange(event, value)}
75
62
  sx={{
76
63
  color: '#005CCB'
77
64
  }}
@@ -1,5 +1,6 @@
1
1
  import { styled } from '@mui/system';
2
2
  import { createTheme } from '@mui/material/styles';
3
+ import zIndex from '@mui/material/styles/zIndex';
3
4
 
4
5
  export const Theme = createTheme({
5
6
  components: {
@@ -1,4 +1,4 @@
1
- import React, { useState, MouseEvent } from 'react';
1
+ import React, { useState } from 'react';
2
2
  import Menu from '@mui/material/Menu';
3
3
  import ListItem from './MaterialMenuItem';
4
4
  import { ThemeProvider } from '@mui/material/styles';
@@ -24,7 +24,7 @@ const MaterialMenu = ({ menuItems, headerComponent, onChange, isLang, containerC
24
24
  const [anchorEl, setAnchorEl] = useState<null | HTMLElement>(null);
25
25
  const [selectedIndex, setSelectedIndex] = React.useState(1);
26
26
  const open = Boolean(anchorEl);
27
- const handleClick = (event: MouseEvent<HTMLDivElement>) => {
27
+ const handleClick = (event: React.MouseEvent<HTMLElement>) => {
28
28
  setAnchorEl(event.currentTarget);
29
29
  };
30
30
  const handleClose = () => {
@@ -42,7 +42,7 @@ const MaterialMenu = ({ menuItems, headerComponent, onChange, isLang, containerC
42
42
  <ThemeProvider theme={Theme}>
43
43
  <div className={containerClassname}>
44
44
  <HeaderComponent
45
- onClick={(e: MouseEvent<HTMLDivElement>) => {
45
+ onClick={(e) => {
46
46
  if (anchorEl) {
47
47
  handleClose();
48
48
  } else {
@@ -10,59 +10,37 @@ interface IListItem {
10
10
  label: any;
11
11
  amount?: number;
12
12
  divider?: boolean;
13
- onClick?: (e: React.MouseEvent<HTMLLIElement>) => void;
13
+ onClick?: (e: React.MouseEvent<HTMLSpanElement>) => void;
14
14
  href?: string;
15
15
  isComponent?: boolean;
16
16
  isSelect?: boolean;
17
17
  Link?: any;
18
18
  handleClose?: () => void;
19
19
  isActive?: boolean;
20
- isExternalLink?: boolean;
21
20
  }
22
21
 
23
- const ListItem = ({ icon, label, amount, divider, onClick, href, isComponent, Link, handleClose, isActive, isExternalLink }: IListItem) => {
24
-
25
- const onMenuItemClick = (e: React.MouseEvent<HTMLLIElement>) => {
26
- onClick(e);
27
- handleClose();
28
- };
29
-
30
- const renderLink = () => {
31
- return (
32
- <>
33
- {isExternalLink ? (
34
- <a href={href}>
35
- <MenuItem
36
- divider={divider}
37
- >
38
- {icon && <ListItemIcon><IconSVG customDimensions name={icon} /></ListItemIcon>}
39
- <ListItemText>
40
- {label}
41
- </ListItemText>
42
- {(amount || amount === 0) && <AmountBlock>{amount}</AmountBlock>}
43
- </MenuItem>
44
- </a>
45
- ) : (
46
- <Link color='#4C4E64DE' variant='caption' to={href} underline='none' onClick={onClick}>
47
- <MenuItem divider={divider}>
48
- {icon && <ListItemIcon><IconSVG customDimensions name={icon} /></ListItemIcon>}
49
- <ListItemText>
50
- {label}
51
- </ListItemText>
52
- {(amount || amount === 0) && <AmountBlock>{amount}</AmountBlock>}
53
- </MenuItem>
54
- </Link>
55
- )}
56
- </>
57
- )
58
- }
59
-
60
- return !!href ? renderLink() : (
22
+ const ListItem = ({ icon, label, amount, divider, onClick, href, isComponent, Link, handleClose, isActive }: IListItem) => {
23
+ return !!href ? (
24
+ <Link color='#4C4E64DE' variant='caption' to={href} underline='none' onClick={onClick}>
25
+ <MenuItem
26
+ divider={divider}
27
+ >
28
+ {icon && <ListItemIcon><IconSVG customDimensions name={icon} /></ListItemIcon>}
29
+ <ListItemText>
30
+ {label}
31
+ </ListItemText>
32
+ {(amount || amount === 0) && <AmountBlock>{amount}</AmountBlock>}
33
+ </MenuItem>
34
+ </Link>
35
+ ) : (
61
36
  <MenuItem
62
- onClick={onMenuItemClick}
37
+ onClick={(e: React.MouseEvent<HTMLSpanElement>) => {
38
+ onClick(e);
39
+ handleClose();
40
+ }}
63
41
  divider={divider}
64
42
  disableRipple={isComponent ? true : false}
65
- selected={!!isActive ? isActive : false}
43
+ isactive={!!isActive ? isActive.toString() : 'false'}
66
44
  >
67
45
  {icon && <ListItemIcon><IconSVG customDimensions name={icon} /></ListItemIcon>}
68
46
  <ListItemText>
@@ -17,7 +17,7 @@ export interface INestedMenuProps {
17
17
  const NestedMenu = ({ nestedItems, label, icon, amount }: INestedMenuProps) => {
18
18
  const [anchorEl, setAnchorEl] = useState<null | HTMLElement>(null);
19
19
  const open = Boolean(anchorEl);
20
- const handleClick = (event: React.MouseEvent<HTMLLIElement>) => {
20
+ const handleClick = (event: React.MouseEvent<HTMLElement>) => {
21
21
  setAnchorEl(event.currentTarget);
22
22
  };
23
23
  const handleClose = () => {
@@ -148,6 +148,3 @@ $indent = 10px
148
148
 
149
149
  .new
150
150
  text-transform: uppercase
151
-
152
- .imagesCount
153
- margin-left: 0 !important
@@ -71,7 +71,7 @@ const withStats = (WrappedComponent: any) => ({
71
71
  const delimiters = { xs: '|', sm: '|', md: 'von' };
72
72
 
73
73
  return (
74
- <div className={classnames(styles.section, styles.imagesCount)}>
74
+ <div className={styles.section}>
75
75
  {statsSize === 'md' ? <IconSVG name='common_camera' customDimensions className={styles.cameraIcon} /> : null}
76
76
  {!!imagesCount && <span>{`${activeSlide + 1} ${delimiters[statsSize]} ${imagesCount}`}</span>}
77
77
  </div>
@@ -79,7 +79,7 @@ const withStats = (WrappedComponent: any) => ({
79
79
  };
80
80
 
81
81
  const renderRotateSvg = (): JSX.Element => {
82
- const hasExteriorPhotos = hasInteriorExteriorPhoto && imagesCount > 0;
82
+ const hasExteriorPhotos = hasInteriorExteriorPhoto && Array.isArray(images) && images.length > 0;
83
83
  if (!hasExteriorPhotos) return null;
84
84
  return (
85
85
  <div className={styles.section}>
@@ -115,23 +115,20 @@ const withStats = (WrappedComponent: any) => ({
115
115
  const favoritesIconClassName = classnames(styles.statsStarIcon, { [styles.accented]: isFavoured });
116
116
 
117
117
  return (
118
- <>
119
- {(!!totalCarImpCount || !!totalFavCount) && <div className={styles.section}>
120
- {!!totalCarImpCount ? <div className={styles.statsViewsCount}>
121
- <IconSVG name='common_SliderEye' customDimensions className={styles.statsEyeIcon} />
122
- <span>
123
- {totalCarImpCount}
124
- </span>
125
- </div> : null}
126
- {!!totalFavCount ? <div className={favoritesClassName} onClick={onFavoriteClick}>
127
- <IconSVG name='star' customDimensions className={favoritesIconClassName} />
128
- <span>
129
- {totalFavCount}
130
- </span>
131
- </div> : null}
132
- </div>
133
- }
134
- </>
118
+ <div className={styles.section}>
119
+ {!!totalCarImpCount ? <div className={styles.statsViewsCount}>
120
+ <IconSVG name='common_SliderEye' customDimensions className={styles.statsEyeIcon} />
121
+ <span>
122
+ {totalCarImpCount}
123
+ </span>
124
+ </div> : null}
125
+ {!!totalFavCount ? <div className={favoritesClassName} onClick={onFavoriteClick}>
126
+ <IconSVG name='star' customDimensions className={favoritesIconClassName} />
127
+ <span>
128
+ {totalFavCount}
129
+ </span>
130
+ </div> : null}
131
+ </div>
135
132
  );
136
133
  };
137
134