@bytebrand/fe-ui-core 4.2.240 → 4.2.242
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/package.json +1 -1
- package/source/components/Checkout/CheckoutStepper/CheckoutStepper.styl +190 -2
- package/source/components/Checkout/OrderOverviewItem/OrderOverviewItem.styl +2 -2
- package/source/components/Checkout/OrderOverviewItem/OrderOverviewItem.tsx +3 -3
- package/source/components/InfoBlocks/FirstInfoBlock/FirstInfoBlockItem/FirstInfoBlockItem.styl +6 -4
- package/source/components/UserDashboardPage/sections/OrderStatusSection/AdditionalOrderInfo.styl +1 -5
- package/source/components/UserDashboardPage/sections/OrderStatusSection/AdditionalOrderInfo.tsx +1 -1
- package/source/components/UserDashboardPage/sections/OrderStatusSection/OrderStatusCar.tsx +27 -43
- package/source/components/UserDashboardPage/sections/OrderStatusSection/OrderStatusSection.tsx +27 -62
- package/source/components/VehicleDetailedSidebar/VehicleDetailedSidebar.styl +1 -9
- package/source/components/VehicleDetailedSidebar/VehicleDetailedSidebar.tsx +32 -36
- package/source/components/VehicleDetailedSidebar/partials/PriceContent.tsx +1 -1
- package/source/components/VehicleDetailedSlider/VehicleDetailedSlider.styl +0 -45
- package/source/components/VehicleDetailedSlider/VehicleDetailedSlider.tsx +42 -112
- package/source/components/VehicleDetailedSlider/partials/Stats.tsx +2 -2
- package/source/components/VehicleSmallCard/VehicleData/VechiclePriceItem/VechiclePriceItem.tsx +2 -4
- package/source/components/VehicleSmallCard/VehicleData/VehiclePrice/VehiclePrice.styl +1 -35
- package/source/components/VehicleSmallCard/VehicleData/VehiclePrice/VehiclePrice.tsx +2 -8
- 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.tsx +1 -0
- package/source/components/_common/Button/Button.tsx +2 -4
- package/source/components/_common/IconSVG/IconSVGConfig.tsx +0 -2
- package/source/components/_common/MaterialAutocomplete/MaterialAutocomplete.styled.tsx +8 -8
- package/source/components/_common/MaterialSelect/MaterialSelect.styled.tsx +4 -4
- package/source/components/_common/OfferRequestButtonWrapper/OfferRequestButtonWrapper.tsx +4 -12
- package/source/components/_common/withStats/withStats.styl +0 -3
- package/source/components/_common/withStats/withStats.tsx +15 -18
- package/source/components/containers/SearchPage/FiltersContainer/FiltersContainer.styl +1 -3
- package/source/components/containers/SearchPage/FiltersContainer/FiltersContainer.tsx +7 -7
- package/source/framework/types/types.ts +0 -2
- package/source/framework/utils/CommonUtils.ts +0 -1
- package/source/framework/utils/DateUtils.ts +0 -8
- package/source/components/_common/IconSVG/SVG/slider/YoutubeButton.tsx +0 -26
|
@@ -10,7 +10,6 @@ import styles from './VehicleDetailedSidebar.styl';
|
|
|
10
10
|
import { vehicleProps } from '../../locales/data';
|
|
11
11
|
import { IVehicleDetailedSidebarProps } from '../../framework/types/types';
|
|
12
12
|
import DealerInfo from '../Alternative/DealerInfo';
|
|
13
|
-
import { Skeleton } from '@mui/material';
|
|
14
13
|
|
|
15
14
|
declare global {
|
|
16
15
|
interface Window {
|
|
@@ -36,8 +35,7 @@ const VehicleDetailedSidebar: FunctionComponent<IVehicleDetailedSidebarProps> =
|
|
|
36
35
|
originUrl,
|
|
37
36
|
// isAlternative,
|
|
38
37
|
infoSections,
|
|
39
|
-
onCurrentSalesPriceChange
|
|
40
|
-
isFetching
|
|
38
|
+
onCurrentSalesPriceChange
|
|
41
39
|
} = props;
|
|
42
40
|
const ref = useRef(null);
|
|
43
41
|
const [offerBlockOpen, setOfferBlockOpen] = useState(false);
|
|
@@ -147,34 +145,34 @@ const VehicleDetailedSidebar: FunctionComponent<IVehicleDetailedSidebarProps> =
|
|
|
147
145
|
|
|
148
146
|
return (
|
|
149
147
|
<>
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
148
|
+
<div className={styles.detailedInfo}>
|
|
149
|
+
<Title {...titleProps} />
|
|
150
|
+
<Price {...priceProps} />
|
|
151
|
+
<Price {...priceProps} isSticky={true} />
|
|
152
|
+
{isMobileOnly && (
|
|
153
|
+
<div
|
|
154
|
+
ref={ref}
|
|
155
|
+
data-locale='de-DE'
|
|
156
|
+
data-template-id='5419b6a8b0d04a076446a9ad'
|
|
157
|
+
data-businessunit-id='46edfd1c0000640005017f22'
|
|
158
|
+
data-style-height='32px'
|
|
159
|
+
data-style-width='100%'
|
|
160
|
+
data-theme='light'
|
|
161
|
+
data-style-alignment='center'
|
|
162
|
+
>
|
|
163
|
+
<a
|
|
164
|
+
href='https://de.trustpilot.com/review/www.auto.de'
|
|
165
|
+
target='_blank'
|
|
166
|
+
rel='noopener noreferrer'
|
|
164
167
|
>
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
)}
|
|
174
|
-
{props.children}
|
|
175
|
-
</div> : <div className={styles.skeletonInfoContainer}><Skeleton /></div>
|
|
176
|
-
}
|
|
177
|
-
{!isFetching ? <div>{isAlternativeType &&
|
|
168
|
+
Trustpilot
|
|
169
|
+
</a>
|
|
170
|
+
</div>
|
|
171
|
+
)}
|
|
172
|
+
{props.children}
|
|
173
|
+
</div>
|
|
174
|
+
<div>
|
|
175
|
+
{isAlternativeType &&
|
|
178
176
|
<DealerInfo
|
|
179
177
|
t={t}
|
|
180
178
|
infoSections={infoSections}
|
|
@@ -184,12 +182,10 @@ const VehicleDetailedSidebar: FunctionComponent<IVehicleDetailedSidebarProps> =
|
|
|
184
182
|
currentSalesPrice={currentSalesPrice}
|
|
185
183
|
onCurrentSalesPriceChange={onCurrentSalesPriceChange}
|
|
186
184
|
/>}
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
</Hidden> : <div className={styles.skeletonInfoContainer}><Skeleton /></div>
|
|
192
|
-
}
|
|
185
|
+
</div>
|
|
186
|
+
<Hidden xs sm md>
|
|
187
|
+
<div className={`${styles.detailedInfo} ${styles.highlights}`}>{carLoaded && <Properties {...propertiesProps} />}</div>
|
|
188
|
+
</Hidden>
|
|
193
189
|
</>
|
|
194
190
|
);
|
|
195
191
|
};
|
|
@@ -108,7 +108,7 @@ const PriceContent: React.FunctionComponent<IPriceContentProps> = ({
|
|
|
108
108
|
className={styles.infoIcon}
|
|
109
109
|
customDimensions
|
|
110
110
|
/>
|
|
111
|
-
<span>{
|
|
111
|
+
<span>{t('sidebar.adjustRate')}</span>
|
|
112
112
|
<IconSVG name='menuArrow' className={`${styles.arrowDownIcon} ${offerBlockOpen ? styles.arrowUpIcon : ''}`} customDimensions />
|
|
113
113
|
</span>
|
|
114
114
|
</span>
|
|
@@ -100,48 +100,3 @@
|
|
|
100
100
|
|
|
101
101
|
.blurred
|
|
102
102
|
filter: blur(3px)
|
|
103
|
-
|
|
104
|
-
.frame
|
|
105
|
-
aspect-ratio:4/3
|
|
106
|
-
height: auto;
|
|
107
|
-
border-radius: 10px;
|
|
108
|
-
display: block;
|
|
109
|
-
border: none;
|
|
110
|
-
|
|
111
|
-
.noYoutubeWrapper
|
|
112
|
-
margin: 82px auto 0;
|
|
113
|
-
width: 487px;
|
|
114
|
-
display: flex;
|
|
115
|
-
flex-direction: column;
|
|
116
|
-
align-items: center;
|
|
117
|
-
+media-phone-only()
|
|
118
|
-
margin: 40px auto 0;
|
|
119
|
-
width: 297px;
|
|
120
|
-
|
|
121
|
-
svg
|
|
122
|
-
+media-phone-only()
|
|
123
|
-
width: 79px;
|
|
124
|
-
height: 56px;
|
|
125
|
-
|
|
126
|
-
.youtubeCookiesText
|
|
127
|
-
font-size: 28px;
|
|
128
|
-
font-weight: 400;
|
|
129
|
-
line-height: 36px;
|
|
130
|
-
margin:62px 0px 54px;
|
|
131
|
-
display: block;
|
|
132
|
-
text-align: center;
|
|
133
|
-
+media-phone-only()
|
|
134
|
-
margin: 36px auto 39px;
|
|
135
|
-
font-size:17px;
|
|
136
|
-
line-height: 21px
|
|
137
|
-
|
|
138
|
-
.btn
|
|
139
|
-
height: 38px!important
|
|
140
|
-
+media-phone-only()
|
|
141
|
-
height: 30px!important
|
|
142
|
-
font-size:13px;
|
|
143
|
-
|
|
144
|
-
.btn:first-child
|
|
145
|
-
margin-right:22px!important
|
|
146
|
-
+media-phone-only()
|
|
147
|
-
margin-right:5px!important
|
|
@@ -13,38 +13,31 @@ import withMagnifyGlassImage from '../_common/MagnifyGlass/MagnifyGlass';
|
|
|
13
13
|
import { IImage, IPrice, SliderType } from '../../framework/types/types';
|
|
14
14
|
import { PLACEHOLDER_IMAGE_SMALL_URL } from '../../framework/constants/common';
|
|
15
15
|
import { VehicleDetailedSliderTranslate } from '../../locales/data';
|
|
16
|
-
import SvgYoutubeButton from '../_common/IconSVG/SVG/slider/YoutubeButton';
|
|
17
|
-
import Button from '../_common/Button/Button';
|
|
18
|
-
import { updateCookieList } from '../../framework/utils/CommonUtils';
|
|
19
|
-
|
|
20
|
-
|
|
21
16
|
|
|
22
17
|
import styles from './VehicleDetailedSlider.styl';
|
|
23
18
|
|
|
24
19
|
interface IProps {
|
|
25
20
|
t: (phrase: string, config?: any) => string;
|
|
26
21
|
price: IPrice;
|
|
27
|
-
photos: IImage[];
|
|
28
|
-
exteriorPhotos: IImage[];
|
|
22
|
+
photos: IImage [];
|
|
23
|
+
exteriorPhotos: IImage [];
|
|
29
24
|
interiorPhoto: IImage;
|
|
30
25
|
mainImageUrl: string;
|
|
31
26
|
mainImageBlur: boolean;
|
|
32
27
|
statsData: any;
|
|
33
28
|
isFavorite: boolean;
|
|
34
29
|
showNewLabel: boolean;
|
|
35
|
-
activeTab:
|
|
30
|
+
activeTab:number;
|
|
36
31
|
make: string;
|
|
37
32
|
model: string;
|
|
38
33
|
subModel: string;
|
|
39
34
|
powerKW: number;
|
|
40
35
|
powerPS: number;
|
|
41
|
-
financingConfig:
|
|
42
|
-
youtubeId: string;
|
|
36
|
+
financingConfig:any;
|
|
43
37
|
showModal?: (id: string, props?: any) => void;
|
|
44
38
|
hideModal: (id: string) => void;
|
|
45
39
|
onCarFavorite: (event: MouseEvent<HTMLElement>) => void;
|
|
46
|
-
showDownPayment:
|
|
47
|
-
handleSentryInit?: () => void;
|
|
40
|
+
showDownPayment:boolean;
|
|
48
41
|
}
|
|
49
42
|
|
|
50
43
|
interface IState {
|
|
@@ -53,8 +46,6 @@ interface IState {
|
|
|
53
46
|
smallLoaded: boolean;
|
|
54
47
|
largeLoaded1: boolean;
|
|
55
48
|
largeLoaded01: boolean;
|
|
56
|
-
videoSrc: string;
|
|
57
|
-
showYoutube: boolean;
|
|
58
49
|
}
|
|
59
50
|
|
|
60
51
|
const MagnifyGlassImage = withMagnifyGlassImage(Image);
|
|
@@ -71,21 +62,17 @@ class VehicleDetailedSlider extends Component<IProps, IState> {
|
|
|
71
62
|
};
|
|
72
63
|
|
|
73
64
|
private slider: any;
|
|
74
|
-
|
|
75
65
|
private imagesCache: string[] = [];
|
|
76
66
|
|
|
77
67
|
constructor(props: IProps) {
|
|
78
68
|
super(props);
|
|
79
|
-
|
|
80
|
-
const youtubeConfig = !cookieConfig?.marketing?.includes('youtube');
|
|
69
|
+
|
|
81
70
|
this.state = {
|
|
82
71
|
activeSlide: 0,
|
|
83
72
|
largeLoaded: false,
|
|
84
73
|
smallLoaded: false,
|
|
85
74
|
largeLoaded1: false,
|
|
86
|
-
largeLoaded01: false
|
|
87
|
-
videoSrc: '',
|
|
88
|
-
showYoutube: youtubeConfig
|
|
75
|
+
largeLoaded01: false
|
|
89
76
|
};
|
|
90
77
|
}
|
|
91
78
|
|
|
@@ -93,11 +80,7 @@ class VehicleDetailedSlider extends Component<IProps, IState> {
|
|
|
93
80
|
this.slider.slickGoTo(0);
|
|
94
81
|
};
|
|
95
82
|
|
|
96
|
-
|
|
97
|
-
componentDidUpdate(prevProps: IProps, prevState: IState) {
|
|
98
|
-
const cookieConfig = JSON.parse(localStorage.getItem('cookieConfig')) || {};
|
|
99
|
-
const showYoutube = !cookieConfig?.marketing?.includes('youtube');
|
|
100
|
-
console.log('showYoutube', showYoutube);
|
|
83
|
+
componentDidUpdate(prevProps: IProps) {
|
|
101
84
|
if (prevProps.photos.length !== this.props.photos.length && this.props.photos.length === 0) {
|
|
102
85
|
this.setState(() => ({
|
|
103
86
|
largeLoaded: false,
|
|
@@ -106,15 +89,10 @@ class VehicleDetailedSlider extends Component<IProps, IState> {
|
|
|
106
89
|
largeLoaded01: false
|
|
107
90
|
}));
|
|
108
91
|
}
|
|
109
|
-
if (showYoutube !== prevState.showYoutube) {
|
|
110
|
-
this.setState(() => ({
|
|
111
|
-
showYoutube: showYoutube
|
|
112
|
-
}));
|
|
113
|
-
}
|
|
114
92
|
}
|
|
115
93
|
|
|
116
94
|
handleOpenSliderModal = (sliderType: SliderType) => {
|
|
117
|
-
const { t = (phrase: string) => _get(VehicleDetailedSliderTranslate(statsData), phrase, phrase), photos, exteriorPhotos, interiorPhoto, showModal, hideModal, statsData
|
|
95
|
+
const { t = (phrase: string) => _get(VehicleDetailedSliderTranslate(statsData), phrase, phrase), photos, exteriorPhotos, interiorPhoto, showModal, hideModal, statsData } = this.props;
|
|
118
96
|
const { activeSlide } = this.state;
|
|
119
97
|
|
|
120
98
|
showModal('VEHICLE_DETAILED_SLIDER_MODAL', {
|
|
@@ -130,22 +108,12 @@ class VehicleDetailedSlider extends Component<IProps, IState> {
|
|
|
130
108
|
onClose: (index: number) => {
|
|
131
109
|
this.slider.slickGoTo(index, true);
|
|
132
110
|
hideModal('VEHICLE_DETAILED_SLIDER_MODAL');
|
|
133
|
-
}
|
|
134
|
-
handleSentryInit: handleSentryInit
|
|
111
|
+
}
|
|
135
112
|
});
|
|
136
113
|
};
|
|
137
114
|
|
|
138
|
-
handleSlideChange = (_currentSlide: any, nextSlide: number) => {
|
|
139
|
-
const { photos } = this.props;
|
|
140
|
-
if (photos[nextSlide].videoUrl) {
|
|
141
|
-
this.setState({ videoSrc: `https://www.youtube.com/embed/${photos[nextSlide].videoUrl}` })
|
|
142
|
-
} else {
|
|
143
|
-
this.setState({ videoSrc: null })
|
|
144
|
-
}
|
|
145
|
-
}
|
|
146
|
-
|
|
147
115
|
getImages = () => {
|
|
148
|
-
const { photos, mainImageUrl, mainImageBlur
|
|
116
|
+
const { photos, mainImageUrl, mainImageBlur } = this.props;
|
|
149
117
|
const { activeSlide, largeLoaded, smallLoaded, largeLoaded1, largeLoaded01 } = this.state;
|
|
150
118
|
|
|
151
119
|
const imageProps = {
|
|
@@ -155,7 +123,6 @@ class VehicleDetailedSlider extends Component<IProps, IState> {
|
|
|
155
123
|
className: styles.image,
|
|
156
124
|
withLoader: false
|
|
157
125
|
};
|
|
158
|
-
|
|
159
126
|
if (Array.isArray(photos) && photos.length > 0 && largeLoaded && smallLoaded && largeLoaded1 && largeLoaded01) {
|
|
160
127
|
let isMouseDown = false;
|
|
161
128
|
let isDragging = false;
|
|
@@ -180,24 +147,11 @@ class VehicleDetailedSlider extends Component<IProps, IState> {
|
|
|
180
147
|
isDragging = false;
|
|
181
148
|
};
|
|
182
149
|
|
|
183
|
-
const updateCookies = () => {
|
|
184
|
-
const cookieConfig = localStorage.getItem('cookieConfig');
|
|
185
|
-
const conf = JSON.parse(cookieConfig);
|
|
186
|
-
const indexToRemove = conf.marketing.indexOf('youtube');
|
|
187
|
-
if (indexToRemove !== -1) {
|
|
188
|
-
conf.marketing.splice(indexToRemove, 1);
|
|
189
|
-
}
|
|
190
|
-
const showYoutube = !conf?.marketing?.includes('youtube');
|
|
191
|
-
this.setState({ showYoutube: showYoutube })
|
|
192
|
-
localStorage.setItem('cookieConfig', JSON.stringify(conf));
|
|
193
|
-
updateCookieList(handleSentryInit);
|
|
194
|
-
}
|
|
195
|
-
|
|
196
|
-
|
|
197
150
|
const imagesCount = photos.length;
|
|
198
151
|
const currentSlide = activeSlide;
|
|
199
152
|
const prevSlide = (activeSlide - 1 % imagesCount + imagesCount) % imagesCount;
|
|
200
153
|
const nextSlide = (activeSlide + 1 % imagesCount + imagesCount) % imagesCount;
|
|
154
|
+
|
|
201
155
|
return photos.map((item: IImage, index: number) => {
|
|
202
156
|
const showImage = index === currentSlide || index === prevSlide || index === nextSlide || this.imagesCache[index] !== undefined;
|
|
203
157
|
const imageUrlSmall = _get(item, 'imageUrlSmall', null);
|
|
@@ -206,15 +160,16 @@ class VehicleDetailedSlider extends Component<IProps, IState> {
|
|
|
206
160
|
this.imagesCache[currentSlide] = imageUrlLarge;
|
|
207
161
|
this.imagesCache[prevSlide] = imageUrlLarge;
|
|
208
162
|
this.imagesCache[nextSlide] = imageUrlLarge;
|
|
163
|
+
|
|
209
164
|
return (
|
|
210
165
|
<div
|
|
211
166
|
className={styles.photo}
|
|
212
167
|
key={imageUrlLarge}
|
|
213
168
|
onMouseDown={handleMouseDown}
|
|
214
169
|
onMouseMove={handleMouseMove}
|
|
215
|
-
onMouseUp={
|
|
170
|
+
onMouseUp={handleMouseUp}
|
|
216
171
|
>
|
|
217
|
-
{showImage &&
|
|
172
|
+
{showImage && (
|
|
218
173
|
<MagnifyGlassImage
|
|
219
174
|
src={index !== 0 ? imageUrlLarge : null}
|
|
220
175
|
srcSmall={index === 0 ? imageUrlSmall : null}
|
|
@@ -222,77 +177,54 @@ class VehicleDetailedSlider extends Component<IProps, IState> {
|
|
|
222
177
|
{...imageProps}
|
|
223
178
|
/>
|
|
224
179
|
)}
|
|
225
|
-
{showImage && item.videoUrl && this.state.showYoutube && (
|
|
226
|
-
<iframe
|
|
227
|
-
width='100%'
|
|
228
|
-
height='441'
|
|
229
|
-
src={this.state.videoSrc}
|
|
230
|
-
title='YouTube Video'
|
|
231
|
-
className={styles.frame}
|
|
232
|
-
></iframe>
|
|
233
|
-
)}
|
|
234
|
-
{showImage && item.videoUrl && !this.state.showYoutube && this.state.videoSrc && (
|
|
235
|
-
<div className={styles.noYoutubeWrapper}>
|
|
236
|
-
<SvgYoutubeButton></SvgYoutubeButton>
|
|
237
|
-
<span className={styles.youtubeCookiesText}>{t('youtube.acceptCookiesText')}</span>
|
|
238
|
-
<div>
|
|
239
|
-
<Button variant='text' className={styles.btn} onClick={() => window.open('https://www.youtube.com/howyoutubeworks/our-commitments/protecting-user-data/', '_blank')}>
|
|
240
|
-
{t('youtube.dataProtection')}
|
|
241
|
-
</Button>
|
|
242
|
-
<Button color='primary' className={styles.btn} onClick={updateCookies}>{t('youtube.allow')}</Button>
|
|
243
|
-
</div>
|
|
244
|
-
</div>
|
|
245
|
-
)}
|
|
246
180
|
</div>
|
|
247
181
|
);
|
|
248
182
|
});
|
|
249
183
|
}
|
|
184
|
+
|
|
250
185
|
if (mainImageUrl) {
|
|
251
186
|
const imagesCount = Array.isArray(photos) && photos.length > 0 ? photos.length : 0;
|
|
252
187
|
const prevSlide = (activeSlide - 1 % imagesCount + imagesCount) % imagesCount;
|
|
253
188
|
const nextSlide = (activeSlide + 1 % imagesCount + imagesCount) % imagesCount;
|
|
254
189
|
return (
|
|
255
190
|
// preload cached photos from props
|
|
256
|
-
|
|
257
191
|
<div className={classnames(styles.photo, { [styles.blurred]: (mainImageBlur && mainImageUrl !== PLACEHOLDER_IMAGE_SMALL_URL) })} key={mainImageUrl}>
|
|
258
|
-
{(!largeLoaded || !smallLoaded || !largeLoaded1 || !largeLoaded01) && <Image src={mainImageUrl} {...imageProps} />}
|
|
192
|
+
{(!largeLoaded || !smallLoaded || !largeLoaded1 || !largeLoaded01) && <Image src={mainImageUrl} {...imageProps} /> }
|
|
259
193
|
|
|
260
|
-
{Array.isArray(photos) && photos.length > 0 && <Image
|
|
261
|
-
style={{ display: 'none' }}
|
|
262
|
-
src={photos[activeSlide]
|
|
263
|
-
onLoad={() => this.setState({ smallLoaded: true })}
|
|
194
|
+
{ Array.isArray(photos) && photos.length > 0 && <Image
|
|
195
|
+
style={ { display: 'none' } }
|
|
196
|
+
src={ photos[activeSlide].imageUrlSmall }
|
|
197
|
+
onLoad={ () => this.setState({ smallLoaded: true }) }
|
|
264
198
|
{...imageProps}
|
|
265
|
-
|
|
199
|
+
/>
|
|
266
200
|
}
|
|
267
|
-
{Array.isArray(photos) && photos.length > 0 && <Image
|
|
268
|
-
style={{ display: 'none' }}
|
|
269
|
-
src={photos[activeSlide]
|
|
270
|
-
onLoad={() => this.setState({ largeLoaded: true })}
|
|
201
|
+
{ Array.isArray(photos) && photos.length > 0 && <Image
|
|
202
|
+
style={ { display: 'none' } }
|
|
203
|
+
src={ photos[activeSlide].imageUrlLarge }
|
|
204
|
+
onLoad={ () => this.setState({ largeLoaded: true }) }
|
|
271
205
|
{...imageProps}
|
|
272
|
-
|
|
206
|
+
/>
|
|
273
207
|
}
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
onLoad={() => this.setState({ largeLoaded1: true })}
|
|
208
|
+
{ Array.isArray(photos) && photos.length > 0 && <Image
|
|
209
|
+
style={ { display: 'none' } }
|
|
210
|
+
src={ photos[nextSlide].imageUrlLarge }
|
|
211
|
+
onLoad={ () => this.setState({ largeLoaded1: true }) }
|
|
279
212
|
{...imageProps}
|
|
280
|
-
|
|
213
|
+
/>
|
|
281
214
|
}
|
|
282
|
-
{Array.isArray(photos) && photos.length > 0 && <Image
|
|
283
|
-
style={{ display: 'none' }}
|
|
284
|
-
src={photos[prevSlide]
|
|
285
|
-
onLoad={() => this.setState({ largeLoaded01: true })}
|
|
215
|
+
{ Array.isArray(photos) && photos.length > 0 && <Image
|
|
216
|
+
style={ { display: 'none' } }
|
|
217
|
+
src={ photos[prevSlide].imageUrlLarge }
|
|
218
|
+
onLoad={ () => this.setState({ largeLoaded01: true }) }
|
|
286
219
|
{...imageProps}
|
|
287
|
-
|
|
220
|
+
/>
|
|
288
221
|
}
|
|
289
222
|
</div>
|
|
290
223
|
);
|
|
291
|
-
|
|
292
224
|
}
|
|
293
225
|
|
|
294
226
|
return (
|
|
295
|
-
<div className={styles.noPhoto}
|
|
227
|
+
<div className={styles.noPhoto}/>
|
|
296
228
|
);
|
|
297
229
|
};
|
|
298
230
|
|
|
@@ -317,6 +249,7 @@ class VehicleDetailedSlider extends Component<IProps, IState> {
|
|
|
317
249
|
onCarFavorite
|
|
318
250
|
} = this.props;
|
|
319
251
|
const { activeSlide } = this.state;
|
|
252
|
+
|
|
320
253
|
const sliderProps = {
|
|
321
254
|
autoPlay: false,
|
|
322
255
|
speed: 300,
|
|
@@ -325,7 +258,6 @@ class VehicleDetailedSlider extends Component<IProps, IState> {
|
|
|
325
258
|
arrows: Array.isArray(photos) && photos.length > 0,
|
|
326
259
|
slidesToShow: 1,
|
|
327
260
|
slidesToScroll: 1,
|
|
328
|
-
beforeChange: this.handleSlideChange,
|
|
329
261
|
afterChange: (index: number) => {
|
|
330
262
|
this.setState({
|
|
331
263
|
activeSlide: index
|
|
@@ -358,16 +290,14 @@ class VehicleDetailedSlider extends Component<IProps, IState> {
|
|
|
358
290
|
return (
|
|
359
291
|
<div className={styles.sliderWrap}>
|
|
360
292
|
{isMobileOnly &&
|
|
361
|
-
<Title {...{ t, make, model, subModel, powerKW, powerPS, onCarFavorite, isFavorite }}
|
|
293
|
+
<Title {...{ t, make, model, subModel, powerKW, powerPS, onCarFavorite, isFavorite }}/>
|
|
362
294
|
}
|
|
363
295
|
<div className={styles.slider}>
|
|
364
|
-
|
|
296
|
+
<PriceData {...priceProps}/>
|
|
365
297
|
<Slider ref={slider => (this.slider = slider)} {...sliderProps}>
|
|
366
298
|
{this.getImages()}
|
|
367
299
|
</Slider>
|
|
368
|
-
{
|
|
369
|
-
isMobileOnly ? <MobileStats {...statsProps} /> : <Stats {...statsProps} />
|
|
370
|
-
) : null}
|
|
300
|
+
{isMobileOnly ? <MobileStats {...statsProps} /> : <Stats {...statsProps}/>}
|
|
371
301
|
</div>
|
|
372
302
|
</div>
|
|
373
303
|
);
|
|
@@ -43,7 +43,7 @@ const Stats: FunctionComponent<IProps> = (props) => {
|
|
|
43
43
|
</div>
|
|
44
44
|
)}
|
|
45
45
|
</div>
|
|
46
|
-
|
|
46
|
+
<div className={styles.statsContainer}>
|
|
47
47
|
{totalCarImpCount > 0 && (
|
|
48
48
|
<div className={`${styles.statsBlock} ${styles.saveCarAsFavorites}`}>
|
|
49
49
|
<span>{t('slider.customersLookingTheCar', { count: totalCarImpCount })}</span>
|
|
@@ -54,7 +54,7 @@ const Stats: FunctionComponent<IProps> = (props) => {
|
|
|
54
54
|
<span>{t('slider.saveCarAsFavorites', { count: totalFavCount })}</span>
|
|
55
55
|
</div>
|
|
56
56
|
)}
|
|
57
|
-
</div>
|
|
57
|
+
</div>
|
|
58
58
|
</div>
|
|
59
59
|
);
|
|
60
60
|
};
|
package/source/components/VehicleSmallCard/VehicleData/VechiclePriceItem/VechiclePriceItem.tsx
CHANGED
|
@@ -36,7 +36,6 @@ export interface IVehiclePriceItemProps {
|
|
|
36
36
|
combineRefAlternative?: boolean;
|
|
37
37
|
postfix?: string;
|
|
38
38
|
margin?: number;
|
|
39
|
-
isMarge?: boolean;
|
|
40
39
|
}
|
|
41
40
|
class VehiclePriceItem extends React.Component<IVehiclePriceItemProps> {
|
|
42
41
|
routeToActiveTab = () => {
|
|
@@ -71,8 +70,7 @@ class VehiclePriceItem extends React.Component<IVehiclePriceItemProps> {
|
|
|
71
70
|
showAboIcon = false,
|
|
72
71
|
isPriceDisable = false,
|
|
73
72
|
isNewPriceCategory = false,
|
|
74
|
-
isStrikeShown = false
|
|
75
|
-
isMarge
|
|
73
|
+
isStrikeShown = false
|
|
76
74
|
} = this.props;
|
|
77
75
|
|
|
78
76
|
const stylesItem = classnames(
|
|
@@ -152,7 +150,7 @@ class VehiclePriceItem extends React.Component<IVehiclePriceItemProps> {
|
|
|
152
150
|
<span className={styles.noPrice}>---</span>
|
|
153
151
|
)}
|
|
154
152
|
|
|
155
|
-
{isStrikeShown && isTotal &&
|
|
153
|
+
{isStrikeShown && isTotal && (
|
|
156
154
|
<VehicleFormattedPrice
|
|
157
155
|
numbersAfterDot={0}
|
|
158
156
|
className={styles.oldPrice}
|
|
@@ -127,38 +127,4 @@
|
|
|
127
127
|
margin-right: 5px;
|
|
128
128
|
|
|
129
129
|
+media-tablet-landscape-up()
|
|
130
|
-
margin-right: 10px;
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
.landingButton
|
|
134
|
-
position: relative;
|
|
135
|
-
padding: 0px 10px;
|
|
136
|
-
background-color: transparent;
|
|
137
|
-
border-radius: 4px;
|
|
138
|
-
color: #005ccb;
|
|
139
|
-
border: 1px solid #666CFF80;
|
|
140
|
-
font-size: 16px;
|
|
141
|
-
cursor: pointer;
|
|
142
|
-
overflow: hidden;
|
|
143
|
-
z-index: 0;
|
|
144
|
-
|
|
145
|
-
.landingButton::before
|
|
146
|
-
content: "";
|
|
147
|
-
position: absolute;
|
|
148
|
-
top: 50%;
|
|
149
|
-
left: 50%;
|
|
150
|
-
transform: translate(-50%, -50%);
|
|
151
|
-
width: 30%;
|
|
152
|
-
height: 100%;
|
|
153
|
-
background-color: #82b1ff91;
|
|
154
|
-
border-radius: 20%;
|
|
155
|
-
opacity: 0;
|
|
156
|
-
transition: width 0.7s ease-out, height 0.7s ease-out, opacity 0.7s ease-out;
|
|
157
|
-
z-index: -1;
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
.landingButton:active::before
|
|
161
|
-
width: 200%;
|
|
162
|
-
height: 200%;
|
|
163
|
-
opacity: 1;
|
|
164
|
-
transition: width 0.7s ease-out, height 0.7s ease-out, opacity 0.7s ease-out;
|
|
130
|
+
margin-right: 10px;
|
|
@@ -136,7 +136,6 @@ const VehiclePrice: React.FC<IVehiclePriceSectionProps> = (props: IVehiclePriceS
|
|
|
136
136
|
const buttonClassNames = classnames(
|
|
137
137
|
classButton,
|
|
138
138
|
styles.buttonDetails,
|
|
139
|
-
{ [styles.landingButton]: vehicleComponentName === 'landing' },
|
|
140
139
|
{ [styles.isAlternativeButton]: typeAlternative }
|
|
141
140
|
);
|
|
142
141
|
|
|
@@ -196,8 +195,7 @@ const VehiclePrice: React.FC<IVehiclePriceSectionProps> = (props: IVehiclePriceS
|
|
|
196
195
|
{
|
|
197
196
|
isTotal: true,
|
|
198
197
|
totalCurrent: margin ? margin : currentSalesPriceExtra,
|
|
199
|
-
title: t('vehicleProps:title.marge')
|
|
200
|
-
isMarge: true
|
|
198
|
+
title: t('vehicleProps:title.marge')
|
|
201
199
|
}
|
|
202
200
|
] : [
|
|
203
201
|
...priceItemsGlobal,
|
|
@@ -256,7 +254,6 @@ const VehiclePrice: React.FC<IVehiclePriceSectionProps> = (props: IVehiclePriceS
|
|
|
256
254
|
routeObj={routeObj}
|
|
257
255
|
vehicleComponentName={vehicleComponentName}
|
|
258
256
|
combineRefAlternative={combineRefAlternative}
|
|
259
|
-
isMarge={props.isMarge}
|
|
260
257
|
/>
|
|
261
258
|
))}
|
|
262
259
|
{vehicleComponentName === 'favorite' && showCompareCheckboxes && (
|
|
@@ -276,10 +273,7 @@ const VehiclePrice: React.FC<IVehiclePriceSectionProps> = (props: IVehiclePriceS
|
|
|
276
273
|
</Button>
|
|
277
274
|
) : null}
|
|
278
275
|
{showOfferBtn ? (
|
|
279
|
-
|
|
280
|
-
<button className={buttonClassNames} onClick={onDetailsClick}>{t('vehicleProps:title.toOffer')}</button>
|
|
281
|
-
) :
|
|
282
|
-
<Button variant={offerBtnVariantCondition} className={buttonClassNames} onClick={onDetailsClick}>{t('vehicleProps:title.toOffer')}</Button>
|
|
276
|
+
<Button variant={offerBtnVariantCondition} className={buttonClassNames} onClick={onDetailsClick}>{t('vehicleProps:title.toOffer')}</Button>
|
|
283
277
|
) : ''}
|
|
284
278
|
</section>
|
|
285
279
|
);
|
|
@@ -28,9 +28,6 @@
|
|
|
28
28
|
display block
|
|
29
29
|
+media-tablet-landscape-up()
|
|
30
30
|
display flex
|
|
31
|
-
&.wrapTitlesAlternative
|
|
32
|
-
+media-tablet-landscape-up()
|
|
33
|
-
flex-wrap: wrap
|
|
34
31
|
&.wrapTitlesFavorite
|
|
35
32
|
display: flex;
|
|
36
33
|
+media-tablet-landscape-up()
|
|
@@ -60,7 +57,7 @@
|
|
|
60
57
|
|
|
61
58
|
+media-tablet-landscape-up()
|
|
62
59
|
margin: 0 0 -1px 3px
|
|
63
|
-
|
|
60
|
+
max-width: 100%;
|
|
64
61
|
|
|
65
62
|
.optionTitle
|
|
66
63
|
display: flex
|
|
@@ -75,7 +72,6 @@
|
|
|
75
72
|
margin-top: 3px;
|
|
76
73
|
+media-tablet-landscape-up()
|
|
77
74
|
margin-left: 8px;
|
|
78
|
-
width: 100%
|
|
79
75
|
margin-top: 0;
|
|
80
76
|
&.optionTitleFavorite
|
|
81
77
|
font-size: 12px;
|
|
@@ -87,12 +83,7 @@
|
|
|
87
83
|
margin-left: 8px;
|
|
88
84
|
&.optionTitleIsAlternative
|
|
89
85
|
overflow: hidden;
|
|
90
|
-
|
|
91
|
-
margin: 5px 0 0 0
|
|
92
|
-
+media-tablet-landscape-up()
|
|
93
|
-
max-width: 260px;
|
|
94
|
-
+media-tablet-landscape-up()
|
|
95
|
-
margin-left: 0
|
|
86
|
+
max-width: 260px;
|
|
96
87
|
|
|
97
88
|
.sponsored
|
|
98
89
|
font-weight: 700
|
|
@@ -33,8 +33,7 @@ const VehicleTitle: React.FC<IVehicleTitleProps> = ({
|
|
|
33
33
|
styles.wrapTitles,
|
|
34
34
|
{ [styles.wrapTitlesFavorite]: vehicleComponentName === 'favorite' },
|
|
35
35
|
{ [styles.wrapTitlesRecently]: vehicleComponentName === 'recently' || vehicleComponentName === 'landing' || vehicleComponentName === 'main' },
|
|
36
|
-
{ [styles.wrapTitlesSearch]: vehicleComponentName === 'search' || vehicleComponentName === 'myVehicles' }
|
|
37
|
-
{ [styles.wrapTitlesAlternative]: combineRefAlternative }
|
|
36
|
+
{ [styles.wrapTitlesSearch]: vehicleComponentName === 'search' || vehicleComponentName === 'myVehicles' }
|
|
38
37
|
);
|
|
39
38
|
const optionTitleClassName = classnames(
|
|
40
39
|
styles.optionTitle,
|
|
@@ -34,6 +34,7 @@ interface IVehicleSmallCardProps {
|
|
|
34
34
|
language?: string;
|
|
35
35
|
vehicleComponentName?: 'comparable' | 'landing' | 'search' | 'main' | 'myVehicles' | 'favorite' | 'recently';
|
|
36
36
|
isTop?: boolean;
|
|
37
|
+
isDealer?: boolean;
|
|
37
38
|
isDealerSuperAdmin?: boolean;
|
|
38
39
|
isReferenceSearch?: boolean;
|
|
39
40
|
dashboardButtonText?: string;
|