@bytebrand/fe-ui-core 4.1.98 → 4.1.99
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/VehicleSmallCard/VehicleData/VechiclePriceItem/VechiclePriceItem.styl +1 -5
- package/source/components/VehicleSmallCard/VehicleData/VehiclePrice/VehiclePrice.styl +13 -3
- package/source/components/VehicleSmallCard/VehicleData/VehiclePrice/VehiclePrice.tsx +18 -3
- package/source/components/VehicleSmallCard/VehicleData/VehicleTitle/VehicleTitle.styl +7 -3
- package/source/components/VehicleSmallCard/VehicleSmallCard.tsx +14 -0
- package/source/components/_common/withStats/withStats.styl +3 -3
package/package.json
CHANGED
package/source/components/VehicleSmallCard/VehicleData/VechiclePriceItem/VechiclePriceItem.styl
CHANGED
|
@@ -12,6 +12,7 @@
|
|
|
12
12
|
&.priceItemFavorite
|
|
13
13
|
height: 44px;
|
|
14
14
|
+media-tablet-landscape-up()
|
|
15
|
+
height: 46px;
|
|
15
16
|
&.priceItemBuy
|
|
16
17
|
height: 52px;
|
|
17
18
|
|
|
@@ -20,11 +21,6 @@
|
|
|
20
21
|
[class*='semimedium__']
|
|
21
22
|
font-size: 16px;
|
|
22
23
|
|
|
23
|
-
+media-phone-up()
|
|
24
|
-
height: 42px;
|
|
25
|
-
&.priceItemFavorite
|
|
26
|
-
height: 42px;
|
|
27
|
-
|
|
28
24
|
&:nth-of-type(3), &:last-of-type
|
|
29
25
|
.tooltipWrap
|
|
30
26
|
&__block
|
|
@@ -29,19 +29,29 @@
|
|
|
29
29
|
gap: 3px;
|
|
30
30
|
|
|
31
31
|
.vehiclePriceTitle
|
|
32
|
-
color:
|
|
33
|
-
display
|
|
32
|
+
color: rgba(76, 78, 100, 0.87);
|
|
33
|
+
display flex;
|
|
34
|
+
align-items: center;
|
|
34
35
|
flex-shrink: 0;
|
|
35
36
|
font-size: 11px;
|
|
36
37
|
height: 20px;
|
|
37
38
|
|
|
38
|
-
+media-
|
|
39
|
+
+media-tablet-landscape-up()
|
|
39
40
|
font-size 10px
|
|
40
41
|
height: 12px;
|
|
41
42
|
|
|
42
43
|
&.vehiclePriceTitleSearch
|
|
43
44
|
+media-tablet-landscape-up()
|
|
44
45
|
font-size: 11px;
|
|
46
|
+
height: 24px;
|
|
47
|
+
|
|
48
|
+
&.vehiclePriceTitleFavorite
|
|
49
|
+
font-size: 12px;
|
|
50
|
+
height: 42px;
|
|
51
|
+
|
|
52
|
+
+media-tablet-landscape-up()
|
|
53
|
+
font-size: 13px;
|
|
54
|
+
height: 46px;
|
|
45
55
|
|
|
46
56
|
.addOfferButton
|
|
47
57
|
white-space: normal
|
|
@@ -18,7 +18,10 @@ export interface IVehiclePriceSectionProps {
|
|
|
18
18
|
isDealerSuperAdmin?: boolean;
|
|
19
19
|
routeObj?: any;
|
|
20
20
|
linkTag?: string;
|
|
21
|
+
classButton?: string;
|
|
21
22
|
showAboIcon?: boolean;
|
|
23
|
+
showDashboardButton?: boolean;
|
|
24
|
+
dashboardButtonText?: string;
|
|
22
25
|
isNewPriceCategory?: boolean;
|
|
23
26
|
vehicleComponentName?: 'comparable' | 'landing' | 'search' | 'main' | 'myVehicles' | 'favorite';
|
|
24
27
|
monthlyInstallment?: number;
|
|
@@ -27,6 +30,7 @@ export interface IVehiclePriceSectionProps {
|
|
|
27
30
|
url?: string;
|
|
28
31
|
iconName?: string;
|
|
29
32
|
mainImageId?: string;
|
|
33
|
+
showCompareCheckboxes?: boolean;
|
|
30
34
|
toRound?: boolean;
|
|
31
35
|
showOfferBtn?: boolean;
|
|
32
36
|
margin?: number;
|
|
@@ -90,7 +94,11 @@ class VehiclePrice extends React.Component<IVehiclePriceSectionProps> {
|
|
|
90
94
|
routeObj,
|
|
91
95
|
toggleCarToCompare,
|
|
92
96
|
toCompare,
|
|
97
|
+
showDashboardButton,
|
|
98
|
+
dashboardButtonText,
|
|
99
|
+
classButton,
|
|
93
100
|
onRemoveClick,
|
|
101
|
+
showCompareCheckboxes,
|
|
94
102
|
vatRate,
|
|
95
103
|
iconName,
|
|
96
104
|
vehicleComponentName,
|
|
@@ -117,7 +125,8 @@ class VehiclePrice extends React.Component<IVehiclePriceSectionProps> {
|
|
|
117
125
|
|
|
118
126
|
const vehiclePriceTitleClassName = classnames(
|
|
119
127
|
styles.vehiclePriceTitle,
|
|
120
|
-
{ [styles.
|
|
128
|
+
{ [styles.vehiclePriceTitleFavorite]: vehicleComponentName === 'favorite' },
|
|
129
|
+
{ [styles.vehiclePriceTitleSearch]: vehicleComponentName === 'search' || 'myVehicles' }
|
|
121
130
|
);
|
|
122
131
|
const priceItemsGlobal = [
|
|
123
132
|
{
|
|
@@ -223,12 +232,13 @@ class VehiclePrice extends React.Component<IVehiclePriceSectionProps> {
|
|
|
223
232
|
);
|
|
224
233
|
});
|
|
225
234
|
const buttonClassNames = classnames(
|
|
235
|
+
classButton,
|
|
226
236
|
styles.buttonDetails,
|
|
227
237
|
{ [styles.isAlternativeButton]: typeAlternative }
|
|
228
238
|
);
|
|
229
239
|
return (
|
|
230
240
|
<section className={vehiclePriceSectionClassName}>
|
|
231
|
-
{vehicleComponentName === 'favorite' ? (
|
|
241
|
+
{vehicleComponentName === 'favorite' && showCompareCheckboxes ? (
|
|
232
242
|
<CheckboxMaterial
|
|
233
243
|
checked={toCompare}
|
|
234
244
|
onChange={toggleCarToCompare}
|
|
@@ -238,7 +248,7 @@ class VehiclePrice extends React.Component<IVehiclePriceSectionProps> {
|
|
|
238
248
|
/>
|
|
239
249
|
) : <span className={vehiclePriceTitleClassName}>{t('vehicleProps:title.monthlyFrom')}</span>}
|
|
240
250
|
{ListPrices}
|
|
241
|
-
{vehicleComponentName === 'favorite' && (
|
|
251
|
+
{vehicleComponentName === 'favorite' && showCompareCheckboxes && (
|
|
242
252
|
<div className={styles.wrapHandleCompare}>
|
|
243
253
|
<Button variant='outlined' onClick={onRemoveClick} className={styles.btnCompareRemove} color='error'>
|
|
244
254
|
<IconSVG className={styles.removeIcon} name='trashRed' customDimensions />
|
|
@@ -249,6 +259,11 @@ class VehiclePrice extends React.Component<IVehiclePriceSectionProps> {
|
|
|
249
259
|
</Button>
|
|
250
260
|
</div>
|
|
251
261
|
)}
|
|
262
|
+
{showDashboardButton && (
|
|
263
|
+
<Button color='primary' className={buttonClassNames} onClick={this.onDetailsClick}>
|
|
264
|
+
{dashboardButtonText}
|
|
265
|
+
</Button>
|
|
266
|
+
)}
|
|
252
267
|
{isDealerSuperAdmin && !typeAlternative ? (
|
|
253
268
|
<Button className={styles.addOfferButton} onClick={this.onAddOfferClick}>
|
|
254
269
|
{t('vehicleProps:title.addOfferToMainSlide')}
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
display: block
|
|
8
8
|
padding: 10px 30px 10px 16px
|
|
9
9
|
+media-tablet-landscape-up()
|
|
10
|
-
padding:
|
|
10
|
+
padding: 6px;
|
|
11
11
|
display: flex
|
|
12
12
|
&.infoSectionSearch
|
|
13
13
|
+media-tablet-landscape-up()
|
|
@@ -27,7 +27,8 @@
|
|
|
27
27
|
margin: 0;
|
|
28
28
|
&.wrapTitlesFavorite
|
|
29
29
|
display: flex;
|
|
30
|
-
|
|
30
|
+
+media-tablet-landscape-up()
|
|
31
|
+
display: block;
|
|
31
32
|
|
|
32
33
|
.manufacturerModel
|
|
33
34
|
font-size: 16px
|
|
@@ -49,7 +50,7 @@
|
|
|
49
50
|
margin 0
|
|
50
51
|
max-width: 88vw
|
|
51
52
|
|
|
52
|
-
+media-
|
|
53
|
+
+media-tablet-landscape-up()
|
|
53
54
|
margin: 0 0 -1px 3px
|
|
54
55
|
max-width: 100%;
|
|
55
56
|
|
|
@@ -67,6 +68,9 @@
|
|
|
67
68
|
&.optionTitleFavorite
|
|
68
69
|
font-size: 12px;
|
|
69
70
|
margin-left: 8px;
|
|
71
|
+
+media-tablet-landscape-up()
|
|
72
|
+
margin-left: -3px;
|
|
73
|
+
margin-top: 3px;
|
|
70
74
|
&.optionTitleIsAlternative
|
|
71
75
|
overflow: hidden;
|
|
72
76
|
max-width: 260px;
|
|
@@ -37,6 +37,8 @@ interface IVehicleSmallCardProps {
|
|
|
37
37
|
isDealer?: boolean;
|
|
38
38
|
isDealerSuperAdmin?: boolean;
|
|
39
39
|
isReferenceSearch?: boolean;
|
|
40
|
+
showDashboardButton?: boolean;
|
|
41
|
+
dashboardButtonText?: string;
|
|
40
42
|
showNewLabel?: boolean;
|
|
41
43
|
CircularProgressbar?: any;
|
|
42
44
|
slider?: IVehicleSliderProps | IVehicleSliderForSRLProps;
|
|
@@ -53,6 +55,7 @@ interface IVehicleSmallCardProps {
|
|
|
53
55
|
offer?: object;
|
|
54
56
|
price?: IPrice;
|
|
55
57
|
seoText?: string;
|
|
58
|
+
classButton?: string;
|
|
56
59
|
mainImageId?: string;
|
|
57
60
|
crawledAt?: string;
|
|
58
61
|
modificationDate?: string;
|
|
@@ -70,6 +73,7 @@ interface IVehicleSmallCardProps {
|
|
|
70
73
|
showSlider?: boolean;
|
|
71
74
|
showOfferBtn?: boolean;
|
|
72
75
|
hasInteriorExteriorPhoto?: boolean;
|
|
76
|
+
showCompareCheckboxes?: boolean;
|
|
73
77
|
showFavoriteStar?: boolean;
|
|
74
78
|
minimizeData?: boolean;
|
|
75
79
|
onContainerClick?: (event?: any) => void;
|
|
@@ -100,6 +104,7 @@ const VehicleSmallCard: FunctionComponent<IVehicleSmallCardProps> = (props) => {
|
|
|
100
104
|
consumption,
|
|
101
105
|
environmentEmissions,
|
|
102
106
|
isReferenceSearch,
|
|
107
|
+
showCompareCheckboxes,
|
|
103
108
|
CircularProgressbar,
|
|
104
109
|
engineData,
|
|
105
110
|
offer,
|
|
@@ -131,7 +136,10 @@ const VehicleSmallCard: FunctionComponent<IVehicleSmallCardProps> = (props) => {
|
|
|
131
136
|
iconName,
|
|
132
137
|
showSlider,
|
|
133
138
|
percentage,
|
|
139
|
+
classButton,
|
|
134
140
|
hasInteriorExteriorPhoto,
|
|
141
|
+
showDashboardButton,
|
|
142
|
+
dashboardButtonText,
|
|
135
143
|
showOfferBtn = false,
|
|
136
144
|
showFavoriteStar = true,
|
|
137
145
|
minimizeData = false,
|
|
@@ -213,7 +221,10 @@ const VehicleSmallCard: FunctionComponent<IVehicleSmallCardProps> = (props) => {
|
|
|
213
221
|
id,
|
|
214
222
|
url,
|
|
215
223
|
iconName,
|
|
224
|
+
showDashboardButton,
|
|
225
|
+
dashboardButtonText,
|
|
216
226
|
vehicleComponentName,
|
|
227
|
+
classButton,
|
|
217
228
|
linkTag,
|
|
218
229
|
onAddOfferToMainSlideClick,
|
|
219
230
|
isDealerSuperAdmin,
|
|
@@ -224,6 +235,7 @@ const VehicleSmallCard: FunctionComponent<IVehicleSmallCardProps> = (props) => {
|
|
|
224
235
|
combineRefAlternative,
|
|
225
236
|
typeAlternative,
|
|
226
237
|
isAlternative,
|
|
238
|
+
showCompareCheckboxes,
|
|
227
239
|
...price,
|
|
228
240
|
...compareProps
|
|
229
241
|
};
|
|
@@ -329,6 +341,8 @@ VehicleSmallCard.defaultProps = {
|
|
|
329
341
|
isTop: false,
|
|
330
342
|
showSlider: false,
|
|
331
343
|
isDealerSuperAdmin: false,
|
|
344
|
+
showCompareCheckboxes: false,
|
|
345
|
+
showDashboardButton: false,
|
|
332
346
|
slider: {},
|
|
333
347
|
stats: {},
|
|
334
348
|
title: {},
|
|
@@ -23,7 +23,7 @@ $indent = 10px
|
|
|
23
23
|
user-select: none;
|
|
24
24
|
|
|
25
25
|
+media-tablet-landscape-up()
|
|
26
|
-
padding: 0
|
|
26
|
+
padding: 0 6px
|
|
27
27
|
|
|
28
28
|
&::after
|
|
29
29
|
position: absolute;
|
|
@@ -139,8 +139,8 @@ $indent = 10px
|
|
|
139
139
|
gap: 10px;
|
|
140
140
|
|
|
141
141
|
+media-tablet-landscape-up()
|
|
142
|
-
left:
|
|
143
|
-
right:
|
|
142
|
+
left: 6px
|
|
143
|
+
right: 6px
|
|
144
144
|
|
|
145
145
|
.priceDifferencePerCent
|
|
146
146
|
margin-left: auto;
|