@bytebrand/fe-ui-core 4.2.209 → 4.2.210
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.tsx +4 -2
- package/source/components/VehicleSmallCard/VehicleData/VehiclePrice/VehiclePrice.tsx +3 -1
- package/source/components/VehicleSmallCard/VehicleData/VehicleTitle/VehicleTitle.styl +11 -2
- package/source/components/VehicleSmallCard/VehicleData/VehicleTitle/VehicleTitle.tsx +2 -1
- package/source/components/_common/Button/Button.tsx +2 -4
- package/source/components/_common/OfferRequestButtonWrapper/OfferRequestButtonWrapper.tsx +3 -7
package/package.json
CHANGED
package/source/components/VehicleSmallCard/VehicleData/VechiclePriceItem/VechiclePriceItem.tsx
CHANGED
|
@@ -36,6 +36,7 @@ export interface IVehiclePriceItemProps {
|
|
|
36
36
|
combineRefAlternative?: boolean;
|
|
37
37
|
postfix?: string;
|
|
38
38
|
margin?: number;
|
|
39
|
+
isMarge?: boolean;
|
|
39
40
|
}
|
|
40
41
|
class VehiclePriceItem extends React.Component<IVehiclePriceItemProps> {
|
|
41
42
|
routeToActiveTab = () => {
|
|
@@ -70,7 +71,8 @@ class VehiclePriceItem extends React.Component<IVehiclePriceItemProps> {
|
|
|
70
71
|
showAboIcon = false,
|
|
71
72
|
isPriceDisable = false,
|
|
72
73
|
isNewPriceCategory = false,
|
|
73
|
-
isStrikeShown = false
|
|
74
|
+
isStrikeShown = false,
|
|
75
|
+
isMarge
|
|
74
76
|
} = this.props;
|
|
75
77
|
|
|
76
78
|
const stylesItem = classnames(
|
|
@@ -150,7 +152,7 @@ class VehiclePriceItem extends React.Component<IVehiclePriceItemProps> {
|
|
|
150
152
|
<span className={styles.noPrice}>---</span>
|
|
151
153
|
)}
|
|
152
154
|
|
|
153
|
-
{isStrikeShown && isTotal &&
|
|
155
|
+
{isStrikeShown && isTotal && !isMarge && (
|
|
154
156
|
<VehicleFormattedPrice
|
|
155
157
|
numbersAfterDot={0}
|
|
156
158
|
className={styles.oldPrice}
|
|
@@ -195,7 +195,8 @@ const VehiclePrice: React.FC<IVehiclePriceSectionProps> = (props: IVehiclePriceS
|
|
|
195
195
|
{
|
|
196
196
|
isTotal: true,
|
|
197
197
|
totalCurrent: margin ? margin : currentSalesPriceExtra,
|
|
198
|
-
title: t('vehicleProps:title.marge')
|
|
198
|
+
title: t('vehicleProps:title.marge'),
|
|
199
|
+
isMarge: true
|
|
199
200
|
}
|
|
200
201
|
] : [
|
|
201
202
|
...priceItemsGlobal,
|
|
@@ -254,6 +255,7 @@ const VehiclePrice: React.FC<IVehiclePriceSectionProps> = (props: IVehiclePriceS
|
|
|
254
255
|
routeObj={routeObj}
|
|
255
256
|
vehicleComponentName={vehicleComponentName}
|
|
256
257
|
combineRefAlternative={combineRefAlternative}
|
|
258
|
+
isMarge={props.isMarge}
|
|
257
259
|
/>
|
|
258
260
|
))}
|
|
259
261
|
{vehicleComponentName === 'favorite' && showCompareCheckboxes && (
|
|
@@ -28,6 +28,9 @@
|
|
|
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
|
|
31
34
|
&.wrapTitlesFavorite
|
|
32
35
|
display: flex;
|
|
33
36
|
+media-tablet-landscape-up()
|
|
@@ -57,7 +60,7 @@
|
|
|
57
60
|
|
|
58
61
|
+media-tablet-landscape-up()
|
|
59
62
|
margin: 0 0 -1px 3px
|
|
60
|
-
|
|
63
|
+
overflow: hidden
|
|
61
64
|
|
|
62
65
|
.optionTitle
|
|
63
66
|
display: flex
|
|
@@ -72,6 +75,7 @@
|
|
|
72
75
|
margin-top: 3px;
|
|
73
76
|
+media-tablet-landscape-up()
|
|
74
77
|
margin-left: 8px;
|
|
78
|
+
width: 100%
|
|
75
79
|
margin-top: 0;
|
|
76
80
|
&.optionTitleFavorite
|
|
77
81
|
font-size: 12px;
|
|
@@ -83,7 +87,12 @@
|
|
|
83
87
|
margin-left: 8px;
|
|
84
88
|
&.optionTitleIsAlternative
|
|
85
89
|
overflow: hidden;
|
|
86
|
-
|
|
90
|
+
.subModel
|
|
91
|
+
margin: 5px 0 0 0
|
|
92
|
+
+media-tablet-landscape-up()
|
|
93
|
+
max-width: 260px;
|
|
94
|
+
+media-tablet-landscape-up()
|
|
95
|
+
margin-left: 0
|
|
87
96
|
|
|
88
97
|
.sponsored
|
|
89
98
|
font-weight: 700
|
|
@@ -33,7 +33,8 @@ 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' }
|
|
36
|
+
{ [styles.wrapTitlesSearch]: vehicleComponentName === 'search' || vehicleComponentName === 'myVehicles' },
|
|
37
|
+
{ [styles.wrapTitlesAlternative]: combineRefAlternative }
|
|
37
38
|
);
|
|
38
39
|
const optionTitleClassName = classnames(
|
|
39
40
|
styles.optionTitle,
|
|
@@ -15,7 +15,6 @@ export interface IButtonProps {
|
|
|
15
15
|
color?: variantColor;
|
|
16
16
|
children?: any;
|
|
17
17
|
variant?: variantType;
|
|
18
|
-
getRef?: (ref: HTMLButtonElement) => void;
|
|
19
18
|
|
|
20
19
|
disabled?: boolean;
|
|
21
20
|
loading?: boolean;
|
|
@@ -26,7 +25,7 @@ export interface IButtonProps {
|
|
|
26
25
|
onMouseLeave?: (event: React.MouseEvent<HTMLButtonElement>) => void;
|
|
27
26
|
}
|
|
28
27
|
|
|
29
|
-
const Button: React.FC<IButtonProps> = ({
|
|
28
|
+
const Button: React.FC<IButtonProps> = ({ className, color, onClick, onMouseEnter, onMouseLeave, variant, loading, disabled, children }: IButtonProps) => {
|
|
30
29
|
const onHandlerClick = (event: React.MouseEvent<HTMLButtonElement>) => {
|
|
31
30
|
event.stopPropagation();
|
|
32
31
|
event.nativeEvent.stopImmediatePropagation();
|
|
@@ -53,7 +52,6 @@ const Button: React.FC<IButtonProps> = ({ getRef, className, color, onClick, onM
|
|
|
53
52
|
onClick: onHandlerClick,
|
|
54
53
|
onMouseEnter: onHandlerMouseEnter,
|
|
55
54
|
onMouseLeave: onHandlerMouseLeave,
|
|
56
|
-
ref:getRef,
|
|
57
55
|
disabled: disabled || loading
|
|
58
56
|
};
|
|
59
57
|
|
|
@@ -71,7 +69,7 @@ Button.defaultProps = {
|
|
|
71
69
|
buttonType: 'button',
|
|
72
70
|
|
|
73
71
|
onClick: () => { },
|
|
74
|
-
|
|
72
|
+
|
|
75
73
|
onMouseEnter: () => { },
|
|
76
74
|
onMouseLeave: () => { }
|
|
77
75
|
};
|
|
@@ -23,17 +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
33
|
return (
|
|
38
34
|
<>
|
|
39
35
|
<div className={controlsContainerClassName}>
|
|
@@ -46,7 +42,7 @@ const OfferRequestBtnWrapper: React.FunctionComponent<IOfferRequestButtonWrapper
|
|
|
46
42
|
isLoading: boolean,
|
|
47
43
|
isSale: boolean,
|
|
48
44
|
isAlternative: boolean
|
|
49
|
-
|
|
45
|
+
) => {
|
|
50
46
|
const { metaData } = car;
|
|
51
47
|
const isAlternativeType = !!metaData && !!metaData.type;
|
|
52
48
|
const offerButtonClassName = classnames(
|
|
@@ -67,10 +63,10 @@ const OfferRequestBtnWrapper: React.FunctionComponent<IOfferRequestButtonWrapper
|
|
|
67
63
|
|
|
68
64
|
return (
|
|
69
65
|
<StyledButton
|
|
66
|
+
refs={btnEl}
|
|
70
67
|
className={offerButtonClassName}
|
|
71
68
|
onClick={onClick}
|
|
72
69
|
loading={isLoading}
|
|
73
|
-
getRef={getRef}
|
|
74
70
|
>
|
|
75
71
|
{isOfferRequested
|
|
76
72
|
? null
|