@bytebrand/fe-ui-core 4.1.104 → 4.1.105
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/SearchPage/SearchTopBar/SearchTopBar.styl +2 -0
- package/source/components/VehicleSmallCard/VehicleData/VechiclePriceItem/VechiclePriceItem.styl +7 -0
- package/source/components/VehicleSmallCard/VehicleData/VechiclePriceItem/VechiclePriceItem.tsx +7 -4
- package/source/components/VehicleSmallCard/VehicleData/VehicleInfo/VehicleInfo.styl +10 -0
- package/source/components/VehicleSmallCard/VehicleData/VehicleInfo/VehicleInfo.tsx +8 -5
- package/source/components/VehicleSmallCard/VehicleData/VehiclePrice/VehiclePrice.styl +7 -0
- package/source/components/VehicleSmallCard/VehicleData/VehiclePrice/VehiclePrice.tsx +7 -3
- package/source/components/VehicleSmallCard/VehicleData/VehicleTitle/VehicleTitle.styl +7 -0
- package/source/components/VehicleSmallCard/VehicleData/VehicleTitle/VehicleTitle.tsx +3 -0
- package/source/components/VehicleSmallCard/VehicleSmallCard.styl +18 -0
- package/source/components/VehicleSmallCard/VehicleSmallCard.tsx +7 -2
- package/source/framework/types/types.ts +2 -2
package/package.json
CHANGED
package/source/components/VehicleSmallCard/VehicleData/VechiclePriceItem/VechiclePriceItem.styl
CHANGED
|
@@ -16,8 +16,15 @@
|
|
|
16
16
|
&.priceItemBuy
|
|
17
17
|
height: 52px;
|
|
18
18
|
|
|
19
|
+
&.priceItemRecently
|
|
20
|
+
height: 44px;
|
|
21
|
+
|
|
22
|
+
&.priceItemBuy
|
|
23
|
+
border-bottom: 1px solid rgba(76, 78, 100, 0.12);
|
|
24
|
+
|
|
19
25
|
&.priceItemComparable
|
|
20
26
|
+media-tablet-landscape-up()
|
|
27
|
+
height: 38px;
|
|
21
28
|
[class*='semimedium__']
|
|
22
29
|
font-size: 16px;
|
|
23
30
|
|
package/source/components/VehicleSmallCard/VehicleData/VechiclePriceItem/VechiclePriceItem.tsx
CHANGED
|
@@ -17,7 +17,7 @@ export interface IVehiclePriceItemProps {
|
|
|
17
17
|
showAboIcon: Boolean;
|
|
18
18
|
isPriceDisable: Boolean;
|
|
19
19
|
isAlternativeText?: string;
|
|
20
|
-
vehicleComponentName?: 'comparable' | 'landing' | 'search' | 'main' | 'myVehicles' | 'favorite';
|
|
20
|
+
vehicleComponentName?: 'comparable' | 'landing' | 'search' | 'main' | 'myVehicles' | 'favorite' | 'recently';
|
|
21
21
|
perMonthCurrent?: number;
|
|
22
22
|
iconName?: string;
|
|
23
23
|
perMonthOld?: number;
|
|
@@ -69,6 +69,7 @@ class VehiclePriceItem extends React.Component<IVehiclePriceItemProps> {
|
|
|
69
69
|
const stylesItem = classnames(
|
|
70
70
|
styles.priceItem,
|
|
71
71
|
{ [styles.priceItemFavorite]: vehicleComponentName === 'favorite' },
|
|
72
|
+
{ [styles.priceItemRecently]: vehicleComponentName === 'recently' },
|
|
72
73
|
{ [styles.priceItemComparable]: vehicleComponentName === 'comparable' || vehicleComponentName === 'landing' },
|
|
73
74
|
{ [styles.priceItemDisable]: isPriceDisable },
|
|
74
75
|
{ [styles.priceItemBuy]: isTotal }
|
|
@@ -77,9 +78,11 @@ class VehiclePriceItem extends React.Component<IVehiclePriceItemProps> {
|
|
|
77
78
|
const priceItemCategoryClassName = classnames(
|
|
78
79
|
styles.priceItemCategory,
|
|
79
80
|
{ [styles.priceItemCategorySearch]: vehicleComponentName === 'search' || vehicleComponentName === 'myVehicles' },
|
|
80
|
-
{ [styles.priceItemCategoryFavorite]: vehicleComponentName === 'favorite' },
|
|
81
81
|
{ [styles.priceItemCategoryComparable]: vehicleComponentName === 'comparable' || vehicleComponentName === 'landing' }
|
|
82
82
|
);
|
|
83
|
+
|
|
84
|
+
const addCustomTooltipClass = vehicleComponentName === 'favorite' || vehicleComponentName === 'recently';
|
|
85
|
+
|
|
83
86
|
return (
|
|
84
87
|
<div className={stylesItem}>
|
|
85
88
|
{React.createElement(linkTag, {
|
|
@@ -91,11 +94,11 @@ class VehiclePriceItem extends React.Component<IVehiclePriceItemProps> {
|
|
|
91
94
|
})}
|
|
92
95
|
{tooltipDescription && (
|
|
93
96
|
<Tooltip
|
|
94
|
-
tooltipClassName={
|
|
97
|
+
tooltipClassName={addCustomTooltipClass ? styles.tooltipWrapFavorites : ''}
|
|
95
98
|
description={tooltipDescription}
|
|
96
99
|
positionX={positionX}
|
|
97
100
|
positionY={positionY}
|
|
98
|
-
iconName={
|
|
101
|
+
iconName={addCustomTooltipClass ? 'infoIcon' : iconName}
|
|
99
102
|
/>
|
|
100
103
|
)}
|
|
101
104
|
{isNewPriceCategory && (
|
|
@@ -201,6 +201,16 @@
|
|
|
201
201
|
& .priceRatingSRL
|
|
202
202
|
margin: auto;
|
|
203
203
|
|
|
204
|
+
&.vehiclePropertiesRecently
|
|
205
|
+
grid-template-columns: 1fr;
|
|
206
|
+
display: grid;
|
|
207
|
+
grid-auto-rows: 44px;
|
|
208
|
+
padding: 0 10px;
|
|
209
|
+
|
|
210
|
+
& > .consumptionCombined
|
|
211
|
+
white-space: pre-line;
|
|
212
|
+
grid-row: 4;
|
|
213
|
+
|
|
204
214
|
&.vehiclePropertiesMyVehicles
|
|
205
215
|
&::after
|
|
206
216
|
+media-tablet-landscape-down()
|
|
@@ -78,7 +78,7 @@ const VehicleInfo: React.FC<IVehicleInfoProps> = (props) => {
|
|
|
78
78
|
icon: decoratedProps[prop].icon,
|
|
79
79
|
description: decoratedProps[prop].value,
|
|
80
80
|
className: styles[decoratedProps[prop].name],
|
|
81
|
-
classNameIcon: (vehicleComponentName === 'search' || 'myVehicles' || 'favorite') && styles.carIconSearch
|
|
81
|
+
classNameIcon: (vehicleComponentName === 'search' || 'myVehicles' || 'favorite' || 'recently') && styles.carIconSearch
|
|
82
82
|
}));
|
|
83
83
|
|
|
84
84
|
return mainPropertiesList.map((property: any, index: number) => (
|
|
@@ -94,15 +94,18 @@ const VehicleInfo: React.FC<IVehicleInfoProps> = (props) => {
|
|
|
94
94
|
{ [styles.vehiclePropertiesSearch]: vehicleComponentName === 'search' },
|
|
95
95
|
{ [styles.vehiclePropertiesFavorite]: vehicleComponentName === 'favorite' },
|
|
96
96
|
{ [styles.vehiclePropertiesMyVehicles]: vehicleComponentName === 'myVehicles' },
|
|
97
|
+
{ [styles.vehiclePropertiesRecently]: vehicleComponentName === 'recently' },
|
|
97
98
|
{ [styles.vehiclePropertiesIsAlternative]: combineRefAlternative },
|
|
98
99
|
);
|
|
99
100
|
|
|
101
|
+
const conditionForRating = vehicleComponentName === 'search' || 'myVehicles' || 'favorite' || 'recently';
|
|
102
|
+
|
|
100
103
|
return (
|
|
101
104
|
<>
|
|
102
105
|
{React.createElement(linkTag, {
|
|
103
106
|
children: (
|
|
104
107
|
<>
|
|
105
|
-
{vehicleComponentName === 'comparable' ? renderProperty(getMainPropertiesForComparableCars) : ''}
|
|
108
|
+
{vehicleComponentName === 'comparable' || vehicleComponentName === 'recently' ? renderProperty(getMainPropertiesForComparableCars) : ''}
|
|
106
109
|
{vehicleComponentName === 'main' ? renderProperty(getMainPropertiesForLandingCars) : ''}
|
|
107
110
|
{vehicleComponentName === 'landing' ? (
|
|
108
111
|
<>
|
|
@@ -130,9 +133,9 @@ const VehicleInfo: React.FC<IVehicleInfoProps> = (props) => {
|
|
|
130
133
|
t={t}
|
|
131
134
|
i18nPrefix={i18nPrefixForPriceRating ? `${i18nPrefixForPriceRating}priceRating.` : 'priceRating.'}
|
|
132
135
|
rating={getPriceRating(currentSalesPrice, mlCurrentSalesPricePredicted)}
|
|
133
|
-
className={`${styles.priceRating} ${
|
|
134
|
-
classLabel={
|
|
135
|
-
classSegmentWrapper={
|
|
136
|
+
className={`${styles.priceRating} ${conditionForRating ? styles.priceRatingSRL : ''}`}
|
|
137
|
+
classLabel={conditionForRating ? styles.priceRatingLabelSRL : ''}
|
|
138
|
+
classSegmentWrapper={conditionForRating ? styles.priceRatingSegmentWrapSRL : ''}
|
|
136
139
|
/>
|
|
137
140
|
</>
|
|
138
141
|
),
|
|
@@ -28,6 +28,9 @@
|
|
|
28
28
|
border-left: 1px solid rgba(76, 78, 100, 0.12)
|
|
29
29
|
gap: 3px;
|
|
30
30
|
|
|
31
|
+
&.vehiclePriceSectionRecently
|
|
32
|
+
padding: 1px 10px 0 10px
|
|
33
|
+
|
|
31
34
|
.vehiclePriceTitle
|
|
32
35
|
color: rgba(76, 78, 100, 0.87);
|
|
33
36
|
display flex;
|
|
@@ -53,6 +56,10 @@
|
|
|
53
56
|
font-size: 13px;
|
|
54
57
|
height: 46px;
|
|
55
58
|
|
|
59
|
+
&.vehiclePriceTitleRecently
|
|
60
|
+
font-size: 12px;
|
|
61
|
+
height: 42px;
|
|
62
|
+
|
|
56
63
|
.addOfferButton
|
|
57
64
|
white-space: normal
|
|
58
65
|
margin: 5px 0 !important;
|
|
@@ -23,7 +23,7 @@ export interface IVehiclePriceSectionProps {
|
|
|
23
23
|
showDashboardButton?: boolean;
|
|
24
24
|
dashboardButtonText?: string;
|
|
25
25
|
isNewPriceCategory?: boolean;
|
|
26
|
-
vehicleComponentName?: 'comparable' | 'landing' | 'search' | 'main' | 'myVehicles' | 'favorite';
|
|
26
|
+
vehicleComponentName?: 'comparable' | 'landing' | 'search' | 'main' | 'myVehicles' | 'favorite' | 'recently';
|
|
27
27
|
monthlyInstallment?: number;
|
|
28
28
|
oldMonthlyInstallment?: number;
|
|
29
29
|
positionY?: string;
|
|
@@ -120,12 +120,14 @@ class VehiclePrice extends React.Component<IVehiclePriceSectionProps> {
|
|
|
120
120
|
const vehiclePriceSectionClassName = classnames(
|
|
121
121
|
styles.vehiclePriceSection,
|
|
122
122
|
{ [styles.vehiclePriceSectionSearch]: vehicleComponentName === 'search' || vehicleComponentName === 'myVehicles' },
|
|
123
|
-
{ [styles.vehiclePriceSectionFavorite]: vehicleComponentName === 'favorite' }
|
|
123
|
+
{ [styles.vehiclePriceSectionFavorite]: vehicleComponentName === 'favorite' },
|
|
124
|
+
{ [styles.vehiclePriceSectionRecently]: vehicleComponentName === 'recently' }
|
|
124
125
|
);
|
|
125
126
|
|
|
126
127
|
const vehiclePriceTitleClassName = classnames(
|
|
127
128
|
styles.vehiclePriceTitle,
|
|
128
129
|
{ [styles.vehiclePriceTitleFavorite]: vehicleComponentName === 'favorite' },
|
|
130
|
+
{ [styles.vehiclePriceTitleRecently]: vehicleComponentName === 'recently' },
|
|
129
131
|
{ [styles.vehiclePriceTitleSearch]: vehicleComponentName === 'search' || 'myVehicles' }
|
|
130
132
|
);
|
|
131
133
|
const priceItemsGlobal = [
|
|
@@ -148,7 +150,9 @@ class VehiclePrice extends React.Component<IVehiclePriceSectionProps> {
|
|
|
148
150
|
}
|
|
149
151
|
];
|
|
150
152
|
|
|
151
|
-
const
|
|
153
|
+
const showAboCondition = vehicleComponentName !== 'favorite' && vehicleComponentName !== 'recently';
|
|
154
|
+
|
|
155
|
+
const Abo = showAboCondition ? [
|
|
152
156
|
{
|
|
153
157
|
perMonthOld: oldMonthlyInstallment,
|
|
154
158
|
perMonthCurrent: monthlyInstallment,
|
|
@@ -15,6 +15,8 @@
|
|
|
15
15
|
&.infoSectionMyVehicles
|
|
16
16
|
+media-phone-only()
|
|
17
17
|
display: flex
|
|
18
|
+
&.infoSectionRecently
|
|
19
|
+
padding: 12px 30px 12px 16px
|
|
18
20
|
|
|
19
21
|
.wrapTitles
|
|
20
22
|
display flex;
|
|
@@ -29,6 +31,8 @@
|
|
|
29
31
|
display: flex;
|
|
30
32
|
+media-tablet-landscape-up()
|
|
31
33
|
display: block;
|
|
34
|
+
&.wrapTitlesRecently
|
|
35
|
+
display: flex;
|
|
32
36
|
|
|
33
37
|
.manufacturerModel
|
|
34
38
|
font-size: 16px
|
|
@@ -71,6 +75,9 @@
|
|
|
71
75
|
+media-tablet-landscape-up()
|
|
72
76
|
margin-left: -3px;
|
|
73
77
|
margin-top: 3px;
|
|
78
|
+
&.optionTitleRecently
|
|
79
|
+
font-size: 12px;
|
|
80
|
+
margin-left: 8px;
|
|
74
81
|
&.optionTitleIsAlternative
|
|
75
82
|
overflow: hidden;
|
|
76
83
|
max-width: 260px;
|
|
@@ -25,17 +25,20 @@ const VehicleTitle: React.FC<IVehicleTitleProps> = ({
|
|
|
25
25
|
const infoSectionClassName = classnames(
|
|
26
26
|
styles.infoSection,
|
|
27
27
|
{ [styles.infoSectionSearch]: vehicleComponentName === 'search' },
|
|
28
|
+
{ [styles.infoSectionRecently]: vehicleComponentName === 'recently' },
|
|
28
29
|
{ [styles.infoSectionMyVehicles]: vehicleComponentName === 'myVehicles' }
|
|
29
30
|
);
|
|
30
31
|
|
|
31
32
|
const wrapTitlesClassName = classnames(
|
|
32
33
|
styles.wrapTitles,
|
|
33
34
|
{ [styles.wrapTitlesFavorite]: vehicleComponentName === 'favorite' },
|
|
35
|
+
{ [styles.wrapTitlesRecently]: vehicleComponentName === 'recently' },
|
|
34
36
|
{ [styles.wrapTitlesSearch]: vehicleComponentName === 'search' || vehicleComponentName === 'myVehicles' }
|
|
35
37
|
);
|
|
36
38
|
const optionTitleClassName = classnames(
|
|
37
39
|
styles.optionTitle,
|
|
38
40
|
{ [styles.optionTitleFavorite]: vehicleComponentName === 'favorite' },
|
|
41
|
+
{ [styles.optionTitleRecently]: vehicleComponentName === 'recently' },
|
|
39
42
|
{ [styles.optionTitleSearch]: vehicleComponentName === 'search' || vehicleComponentName === 'myVehicles' },
|
|
40
43
|
{ [styles.optionTitleIsAlternative]: combineRefAlternative }
|
|
41
44
|
);
|
|
@@ -90,6 +90,24 @@
|
|
|
90
90
|
'title title price'\
|
|
91
91
|
'image info price'
|
|
92
92
|
|
|
93
|
+
&.vehicleWrapRecently
|
|
94
|
+
grid-template-areas:
|
|
95
|
+
'title title'\
|
|
96
|
+
'image image'\
|
|
97
|
+
'info price'\
|
|
98
|
+
'seoText seoText'
|
|
99
|
+
grid-template-columns: 160px 1fr;
|
|
100
|
+
border: 1px solid rgba(76, 78, 100, 0.12);
|
|
101
|
+
border-radius: 10px;
|
|
102
|
+
padding-bottom: 15px;
|
|
103
|
+
|
|
104
|
+
& [class*='withStats__topWrapper']
|
|
105
|
+
left: 16px;
|
|
106
|
+
right: 16px;
|
|
107
|
+
|
|
108
|
+
& [class*='withStats__controls']
|
|
109
|
+
padding: 0 16px;
|
|
110
|
+
|
|
93
111
|
&.vehicleWrapMyVeicles
|
|
94
112
|
grid-template-areas:
|
|
95
113
|
'title title'\
|
|
@@ -32,7 +32,7 @@ interface IVehicleSmallCardProps {
|
|
|
32
32
|
t?: (key: string, options?: object) => string;
|
|
33
33
|
i18nPrefixForPriceRating?: string;
|
|
34
34
|
language?: string;
|
|
35
|
-
vehicleComponentName?: 'comparable' | 'landing' | 'search' | 'main' | 'myVehicles' | 'favorite';
|
|
35
|
+
vehicleComponentName?: 'comparable' | 'landing' | 'search' | 'main' | 'myVehicles' | 'favorite' | 'recently';
|
|
36
36
|
isTop?: boolean;
|
|
37
37
|
isDealer?: boolean;
|
|
38
38
|
isDealerSuperAdmin?: boolean;
|
|
@@ -164,6 +164,7 @@ const VehicleSmallCard: FunctionComponent<IVehicleSmallCardProps> = (props) => {
|
|
|
164
164
|
{ [styles.vehicleWrapComparable]: vehicleComponentName === 'comparable' },
|
|
165
165
|
{ [styles.vehicleWrapMyVeicles]: vehicleComponentName === 'myVehicles' },
|
|
166
166
|
{ [styles.vehicleWrapFavorite]: vehicleComponentName === 'favorite' },
|
|
167
|
+
{ [styles.vehicleWrapRecently]: vehicleComponentName === 'recently' },
|
|
167
168
|
{ [styles.topVehicle]: isTop },
|
|
168
169
|
{ [styles.disableBorder]: minimizeData },
|
|
169
170
|
{ [styles.isFirstReferenceCar]: isReferenceSearch && index === 0 && currentPage === 1 },
|
|
@@ -263,6 +264,10 @@ const VehicleSmallCard: FunctionComponent<IVehicleSmallCardProps> = (props) => {
|
|
|
263
264
|
e.preventDefault();
|
|
264
265
|
if (baseUrl) window.open(baseUrl, '_blank');
|
|
265
266
|
};
|
|
267
|
+
const showComponentLikeSlider = vehicleComponentName === 'search' ||
|
|
268
|
+
vehicleComponentName === 'myVehicles' ||
|
|
269
|
+
vehicleComponentName === 'favorite'
|
|
270
|
+
vehicleComponentName === 'recently';
|
|
266
271
|
return (
|
|
267
272
|
<section className={wrapperClassName} onClick={onContainerClick} id={id}>
|
|
268
273
|
{createElement(linkTag, {
|
|
@@ -278,7 +283,7 @@ const VehicleSmallCard: FunctionComponent<IVehicleSmallCardProps> = (props) => {
|
|
|
278
283
|
<>
|
|
279
284
|
{showSlider ? (
|
|
280
285
|
<>
|
|
281
|
-
{
|
|
286
|
+
{showComponentLikeSlider ? (
|
|
282
287
|
<>
|
|
283
288
|
<DecoratedSliderForSRL {...decoratedSliderProps} />
|
|
284
289
|
{renderIDInfo && isDealer ? renderIDInfo() : null}
|
|
@@ -89,7 +89,7 @@ export interface IVehicleInfo {
|
|
|
89
89
|
i18nPrefixForPriceRating?: string;
|
|
90
90
|
gearbox?: string;
|
|
91
91
|
regDate?: number;
|
|
92
|
-
vehicleComponentName?: 'comparable' | 'landing' | 'search' | 'main' | 'myVehicles' | 'favorite';
|
|
92
|
+
vehicleComponentName?: 'comparable' | 'landing' | 'search' | 'main' | 'myVehicles' | 'favorite' | 'recently';
|
|
93
93
|
language?: string;
|
|
94
94
|
combineRefAlternative?: boolean;
|
|
95
95
|
routeObj?: any;
|
|
@@ -115,7 +115,7 @@ export interface IVehicleTitleProps {
|
|
|
115
115
|
model?: string;
|
|
116
116
|
subModel?: string;
|
|
117
117
|
option?: string;
|
|
118
|
-
vehicleComponentName?: 'comparable' | 'landing' | 'search' | 'main' | 'myVehicles' | 'favorite';
|
|
118
|
+
vehicleComponentName?: 'comparable' | 'landing' | 'search' | 'main' | 'myVehicles' | 'favorite' | 'recently';
|
|
119
119
|
isSponsored?: boolean;
|
|
120
120
|
showFavoriteStar?: boolean;
|
|
121
121
|
id?: string;
|