@bytebrand/fe-ui-core 4.2.251 → 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.
- package/__tests__/utils/CommonUtils/getOfferSliders.test.ts +2 -4
- package/common.ts +2 -6
- package/package.json +2 -3
- package/source/components/AccordionWidget/AccordionWidget.tsx +3 -1
- package/source/components/Breadcrumbs/Breadcrumbs.tsx +3 -3
- package/source/components/Checkout/CheckoutStepper/CheckoutStepper.styl +190 -2
- package/source/components/Checkout/CheckoutStepper/CheckoutStepper.tsx +16 -15
- package/source/components/Checkout/OrderOverviewItem/OrderOverviewItem.styl +2 -2
- package/source/components/Checkout/OrderOverviewItem/OrderOverviewItem.tsx +3 -3
- package/source/components/FormattedNumber/FormattedNumber.tsx +3 -2
- package/source/components/InfoBlocks/FirstInfoBlock/FirstInfoBlockItem/FirstInfoBlockItem.styl +6 -4
- package/source/components/OfferDetailedSection/partials/PanelConfig.tsx +3 -0
- package/source/components/OfferPanel/MuiOfferPeriod/{MuiOfferPeriod.theme.tsx → MuiOfferPeriod.theme.js} +13 -8
- package/source/components/OfferPanel/MuiOfferPeriod/MuiOfferPeriod.tsx +4 -28
- package/source/components/OfferPanel/OfferCheckboxGroup/CheckboxContainer.tsx +12 -6
- package/source/components/OfferPanel/OfferCheckboxGroup/OfferCheckboxGroup.tsx +1 -1
- package/source/components/OfferPanel/OfferPanel.tsx +1 -1
- package/source/components/OfferPanel/OfferPeriod/OfferPeriod.tsx +4 -0
- package/source/components/OfferPanel/RangeGroup/RangeGroup.tsx +4 -6
- package/source/components/PriceRatingDetailed/PriceRatingDetailed.tsx +2 -6
- package/source/components/SearchFilters/filters/AlternativeID.tsx +53 -42
- package/source/components/SearchFilters/filters/DriveType.tsx +1 -1
- package/source/components/SearchFilters/filters/EmissionSticker.tsx +1 -1
- package/source/components/SearchFilters/filters/FirstRegistration.tsx +1 -0
- package/source/components/SearchFilters/filters/InteriorColor.tsx +1 -1
- package/source/components/SearchFilters/filters/InteriorMaterial.tsx +1 -2
- package/source/components/SearchFilters/filters/Mileage.tsx +1 -1
- package/source/components/SearchFilters/filters/Power.tsx +17 -36
- package/source/components/SearchFilters/filters/StateOptions.tsx +1 -0
- package/source/components/SearchFilters/filters/Transmission.tsx +1 -1
- package/source/components/SearchPage/SearchChips/SearchChips.tsx +1 -1
- package/source/components/SearchPageMobile/FiltersDetailed/BodyType.tsx +3 -3
- package/source/components/SearchPageMobile/FiltersDetailed/Consumption.tsx +2 -2
- package/source/components/SearchPageMobile/FiltersDetailed/Doors.tsx +1 -1
- package/source/components/SearchPageMobile/FiltersDetailed/MakeModel.tsx +1 -1
- package/source/components/SearchWidget/ColorWidget/BodyColorWidget.tsx +3 -3
- package/source/components/SearchWidget/EnvironmentWidget/EnvironmentWidget.tsx +3 -3
- package/source/components/SearchWidget/HighlightsWidget/HighlightsWidget.tsx +2 -2
- package/source/components/SearchWidget/StateWidget/StateWidget.tsx +2 -1
- package/source/components/SearchWidgetsMobile/BasicDataWidgetMobile/BasicDataWidgetMobile.tsx +4 -4
- package/source/components/SearchWidgetsMobile/EquipmentsWidget/EquipmentsWidget.tsx +16 -16
- package/source/components/SearchWidgetsMobile/HighlightsWidgetMobile/HighlightsWidgetMobile.tsx +1 -1
- package/source/components/SearchWidgetsMobile/InteriorWidget/InteriorWidget.tsx +1 -1
- package/source/components/SearchWidgetsMobile/SafetyWidget/SafetyWidget.tsx +6 -6
- package/source/components/Stepper/Stepper.tsx +3 -4
- package/source/components/UserDashboardPage/sections/OrderStatusSection/AdditionalOrderInfo.styl +2 -11
- package/source/components/UserDashboardPage/sections/OrderStatusSection/AdditionalOrderInfo.tsx +5 -5
- package/source/components/UserDashboardPage/sections/OrderStatusSection/OrderStatusCar.tsx +38 -57
- package/source/components/UserDashboardPage/sections/OrderStatusSection/OrderStatusCard.tsx +2 -2
- package/source/components/UserDashboardPage/sections/OrderStatusSection/OrderStatusSection.tsx +101 -183
- package/source/components/UserDashboardPage/sections/RequestedCarsSection/RequestedCarsSection.tsx +7 -5
- package/source/components/Vehicle/VehicleFormattedPrice/VehicleFormattedPrice.tsx +7 -33
- package/source/components/VehicleDetailedSidebar/VehicleDetailedSidebar.styl +2 -10
- package/source/components/VehicleDetailedSidebar/VehicleDetailedSidebar.tsx +14 -54
- package/source/components/VehicleDetailedSidebar/partials/Price.styl +1 -5
- package/source/components/VehicleDetailedSidebar/partials/Price.tsx +1 -2
- package/source/components/VehicleDetailedSidebar/partials/PriceContent.styl +5 -16
- package/source/components/VehicleDetailedSidebar/partials/PriceContent.tsx +4 -9
- package/source/components/VehicleDetailedSidebar/partials/Properties.tsx +1 -1
- package/source/components/VehicleDetailedSlider/VehicleDetailedSlider.styl +0 -45
- package/source/components/VehicleDetailedSlider/VehicleDetailedSlider.tsx +42 -121
- package/source/components/VehicleDetailedSlider/partials/PriceData.styl +1 -4
- package/source/components/VehicleDetailedSlider/partials/PriceData.tsx +1 -8
- package/source/components/VehicleDetailedSlider/partials/Stats.tsx +2 -2
- package/source/components/VehicleSmallCard/VehicleData/VechiclePriceItem/VechiclePriceItem.tsx +7 -9
- package/source/components/VehicleSmallCard/VehicleData/VehiclePrice/VehiclePrice.styl +1 -35
- package/source/components/VehicleSmallCard/VehicleData/VehiclePrice/VehiclePrice.tsx +3 -9
- package/source/components/VehicleSmallCard/VehicleData/VehicleTitle/VehicleTitle.styl +2 -11
- package/source/components/VehicleSmallCard/VehicleData/VehicleTitle/VehicleTitle.tsx +1 -2
- package/source/components/VehicleSmallCard/VehicleSmallCard.styl +1 -3
- package/source/components/VehicleSmallCard/VehicleSmallCard.tsx +7 -3
- package/source/components/_common/Badge/Badge.styl +0 -3
- package/source/components/_common/Badge/Badge.tsx +1 -1
- package/source/components/_common/Button/Button.tsx +4 -5
- package/source/components/_common/Checkbox/FormCheckbox.tsx +4 -4
- package/source/components/_common/CheckboxMaterial/CheckboxMaterial.tsx +1 -1
- package/source/components/_common/Chip/Chip.tsx +3 -1
- package/source/components/_common/ExpansionPanel/ExpansionPanel.tsx +3 -3
- package/source/components/_common/IconSVG/IconSVGConfig.tsx +0 -2
- package/source/components/_common/IconSVG/SVG/flags/SK.tsx +1 -0
- package/source/components/_common/IconSVG/SVG/slider/360New.tsx +1 -1
- package/source/components/_common/MaterialAccordion/MaterialAccordion.tsx +30 -22
- package/source/components/_common/MaterialAutocomplete/MaterialAutocomplete.styled.tsx +8 -8
- package/source/components/_common/MaterialDatePicker/MaterialDatePicker.styled.tsx +1 -0
- package/source/components/_common/MaterialSelect/MaterialSelect.styled.tsx +15 -12
- package/source/components/_common/MaterialSelect/MaterialSelect.tsx +3 -3
- package/source/components/_common/MaterialSwitch/MaterialSwitch.tsx +1 -3
- package/source/components/_common/MaterialTooltip/MaterialTooltip.styled.tsx +1 -1
- package/source/components/_common/MaterialTooltip/MaterialTooltip.tsx +3 -3
- package/source/components/_common/Modal/CookieModal.tsx +3 -1
- package/source/components/_common/Modal/Modal.styled.tsx +1 -2
- package/source/components/_common/Modal/Modal.tsx +5 -1
- package/source/components/_common/Modal/ModalsConfig.tsx +1 -5
- package/source/components/_common/Modal/modals/ManageCookieModal/ManageCookieModal.styl +7 -23
- package/source/components/_common/Modal/modals/ManageCookieModal/ManageCookieModal.tsx +36 -84
- package/source/components/_common/Modal/modals/PreviewCookieModal/PreviewCookieModal.styl +14 -29
- package/source/components/_common/Modal/modals/PreviewCookieModal/PreviewCookieModal.tsx +10 -17
- package/source/components/_common/OfferRequestButtonWrapper/OfferRequestButtonWrapper.tsx +4 -12
- package/source/components/_common/Range/Range.tsx +14 -27
- package/source/components/_common/UserMenu/MaterialMenu.styled.tsx +1 -0
- package/source/components/_common/UserMenu/MaterialMenu.tsx +3 -3
- package/source/components/_common/UserMenu/MaterialMenuItem.tsx +20 -42
- package/source/components/_common/UserMenu/NestedMenu.tsx +1 -1
- package/source/components/_common/withStats/withStats.styl +0 -3
- package/source/components/_common/withStats/withStats.tsx +16 -19
- package/source/components/containers/SearchPage/FiltersContainer/FiltersContainer.styl +1 -14
- package/source/components/containers/SearchPage/FiltersContainer/FiltersContainer.tsx +42 -78
- package/source/framework/constants/common.ts +60 -89
- package/source/framework/constants/highlights.ts +1 -1
- package/source/framework/constants.ts +1 -1
- package/source/framework/types/types.ts +4 -9
- package/source/framework/utils/CommonUtils.ts +62 -73
- package/source/framework/utils/DateUtils.ts +2 -10
- package/source/framework/vehiclesProps/decoratedLightProps.tsx +2 -1
- package/source/framework/vehiclesProps/decoratedProps.tsx +2 -1
- package/source/locales/data.ts +2 -2
- package/tslint.json +2 -1
- package/utils.ts +0 -2
- package/__tests__/components/UserDasboardPage/sections/CheckoutSection/CheckoutSection.test.tsx +0 -613
- package/__tests__/components/UserDasboardPage/sections/FavoriteSection/FavoriteSection.test.tsx +0 -335
- package/source/components/UserDashboardPage/sections/CheckoutSection/CheckoutSection.styl +0 -38
- package/source/components/UserDashboardPage/sections/CheckoutSection/CheckoutSection.tsx +0 -120
- package/source/components/UserDashboardPage/sections/FavoriteSection/FavoriteSection.styl +0 -22
- package/source/components/UserDashboardPage/sections/FavoriteSection/FavoriteSection.tsx +0 -84
- 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
|
-
|
|
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
|
|
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(
|
|
25
|
-
const [marketingMasterSwitch, setMarketingMasterSwitch] = useState(
|
|
26
|
-
const [analyticsSwitches, setAnalyticsSwitches] = useState
|
|
27
|
-
const [marketingSwitches, setMarketingSwitches] = useState
|
|
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.
|
|
32
|
-
|
|
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.
|
|
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.
|
|
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?:
|
|
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
|
-
|
|
118
|
-
|
|
119
|
-
<
|
|
120
|
-
|
|
121
|
-
|
|
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
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
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
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
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()}
|
|
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:
|
|
4
|
+
padding: 26px 60px 38px
|
|
5
5
|
text-align: center
|
|
6
6
|
box-sizing: border-box
|
|
7
7
|
max-width: 600px
|
|
8
|
-
+media-
|
|
9
|
-
padding:
|
|
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:
|
|
26
|
-
line-height:
|
|
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-
|
|
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:
|
|
31
|
+
margin-top: 20px
|
|
45
32
|
display: flex
|
|
46
33
|
justify-content: space-between
|
|
47
34
|
gap: 36px;
|
|
48
|
-
+media-
|
|
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-
|
|
42
|
+
+media-phone-only()
|
|
56
43
|
font-size: 11px !important
|
|
57
44
|
|
|
58
45
|
.outlinedBtnLeft
|
|
59
|
-
|
|
60
|
-
justify-content: flex-end;
|
|
46
|
+
float: right;
|
|
61
47
|
color: #005CCB;
|
|
62
48
|
font-size: 16px;
|
|
63
49
|
text-decoration: none;
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
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
|
-
<
|
|
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
|
-
|
|
39
|
-
|
|
40
|
-
|
|
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
|
|
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
|
-
<
|
|
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
|
|
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
|
-
|
|
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
|
|
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 {
|
|
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 =
|
|
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
|
-
|
|
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={
|
|
55
|
+
max={max}
|
|
69
56
|
step={step}
|
|
70
57
|
disableSwap={isMobileOnly ? true : false}
|
|
71
58
|
valueLabelDisplay='auto'
|
|
72
59
|
valueLabelFormat={formttedValue}
|
|
73
|
-
value={
|
|
74
|
-
onChange={
|
|
60
|
+
value={value}
|
|
61
|
+
onChange={(event: Event, value: number | number[]) => onChange(event, value)}
|
|
75
62
|
sx={{
|
|
76
63
|
color: '#005CCB'
|
|
77
64
|
}}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import React, { useState
|
|
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<
|
|
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
|
|
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<
|
|
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
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
{
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
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={
|
|
37
|
+
onClick={(e: React.MouseEvent<HTMLSpanElement>) => {
|
|
38
|
+
onClick(e);
|
|
39
|
+
handleClose();
|
|
40
|
+
}}
|
|
63
41
|
divider={divider}
|
|
64
42
|
disableRipple={isComponent ? true : false}
|
|
65
|
-
|
|
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<
|
|
20
|
+
const handleClick = (event: React.MouseEvent<HTMLElement>) => {
|
|
21
21
|
setAnchorEl(event.currentTarget);
|
|
22
22
|
};
|
|
23
23
|
const handleClose = () => {
|
|
@@ -71,7 +71,7 @@ const withStats = (WrappedComponent: any) => ({
|
|
|
71
71
|
const delimiters = { xs: '|', sm: '|', md: 'von' };
|
|
72
72
|
|
|
73
73
|
return (
|
|
74
|
-
<div className={
|
|
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 &&
|
|
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
|
-
{
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
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
|
|