@bytebrand/fe-ui-core 4.1.201 → 4.1.203
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/OfferPanel/OfferCheckboxGroup/CheckboxContainer.tsx +5 -4
- package/source/components/SearchFilters/common/FilterBlock/FilterBlockFactory.tsx +1 -1
- package/source/components/SearchPageMobile/FiltersDetailed/Fuel.tsx +3 -1
- package/source/components/SearchWidgetsMobile/BasicDataWidgetMobile/BasicDataWidgetMobile.tsx +5 -2
- package/source/components/VehicleSmallCard/VehicleData/VechiclePriceItem/VechiclePriceItem.styl +5 -4
- package/source/components/VehicleSmallCard/VehicleData/VechiclePriceItem/VechiclePriceItem.tsx +10 -9
- package/source/components/VehicleSmallCardForDealerships/VehicleSmallCardForDealerships.tsx +9 -8
- package/source/components/_common/MaterialTooltip/MaterialTooltip.tsx +3 -2
package/package.json
CHANGED
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import React, { ReactNode } from 'react';
|
|
2
2
|
import styles from './OfferCheckboxGroup.styl';
|
|
3
3
|
import classnames from 'classnames';
|
|
4
|
-
import FormattedNumber from '../../FormattedNumber/FormattedNumber';
|
|
5
|
-
import Tooltip from '../../_common/Tooltip/Tooltip';
|
|
4
|
+
// import FormattedNumber from '../../FormattedNumber/FormattedNumber';
|
|
5
|
+
// import Tooltip from '../../_common/Tooltip/Tooltip';
|
|
6
6
|
import CheckboxMaterial from '../../_common/CheckboxMaterial/CheckboxMaterial';
|
|
7
|
+
import MaterialTooltip from '../../_common/MaterialTooltip/MaterialTooltip';
|
|
7
8
|
|
|
8
9
|
export interface ICheckboxProps {
|
|
9
10
|
// Native checkbox props
|
|
@@ -133,7 +134,7 @@ class CheckboxContainer extends React.Component<ICheckboxProps, {}> {
|
|
|
133
134
|
{description ? (
|
|
134
135
|
<span className={styles.labelContent}>
|
|
135
136
|
{description}
|
|
136
|
-
{tooltipDescription && <
|
|
137
|
+
{tooltipDescription && <MaterialTooltip text={tooltipDescription} className={styles.tooltipCheckbox} icon='InfoTransparent' />}
|
|
137
138
|
</span>
|
|
138
139
|
) : false}
|
|
139
140
|
</label>
|
|
@@ -142,4 +143,4 @@ class CheckboxContainer extends React.Component<ICheckboxProps, {}> {
|
|
|
142
143
|
}
|
|
143
144
|
}
|
|
144
145
|
|
|
145
|
-
export default CheckboxContainer;
|
|
146
|
+
export default CheckboxContainer;
|
|
@@ -135,7 +135,7 @@ export const FilterBlockFactory: IFilterBlockFactory = {
|
|
|
135
135
|
};
|
|
136
136
|
|
|
137
137
|
export const FilterBlockFactoryDetailed: IFilterBlockFactory = {
|
|
138
|
-
BASIC_DATA: (props: any): JSX.Element => (<BasicDataWidgetMobile {...props} />),
|
|
138
|
+
BASIC_DATA: (props: any): JSX.Element => (<BasicDataWidgetMobile {...props} isNotDetailed={false}/>),
|
|
139
139
|
HIGHLIGHTS: (props: any): JSX.Element => (<HighlightsWidgetMobile {...props} />),
|
|
140
140
|
ENGINE_TRANS_DRIVE: (props: any): JSX.Element => (<EngineTransDriveWidgetMobile {...props} />),
|
|
141
141
|
BODY_COLOR: (props: any): JSX.Element => (<BodyColorWidget {...props} />),
|
|
@@ -16,6 +16,7 @@ export interface IFuelProps {
|
|
|
16
16
|
onDropDownFocus?: (id: string) => void;
|
|
17
17
|
t?: (phrase: string) => string;
|
|
18
18
|
optionClassName?: string;
|
|
19
|
+
isNotDetailed:boolean;
|
|
19
20
|
}
|
|
20
21
|
|
|
21
22
|
class Fuel extends React.Component<IFuelProps, {}> {
|
|
@@ -33,7 +34,7 @@ class Fuel extends React.Component<IFuelProps, {}> {
|
|
|
33
34
|
};
|
|
34
35
|
|
|
35
36
|
getOptions = (options: string[]) => options.map((option: string) => {
|
|
36
|
-
const { t } = this.props;
|
|
37
|
+
const { t, isNotDetailed} = this.props;
|
|
37
38
|
|
|
38
39
|
const agg = this.getAggregation(option);
|
|
39
40
|
|
|
@@ -41,6 +42,7 @@ class Fuel extends React.Component<IFuelProps, {}> {
|
|
|
41
42
|
value: option,
|
|
42
43
|
label: (
|
|
43
44
|
<span className={styles.wrapOptions}>
|
|
45
|
+
{isNotDetailed ? null : <IconSVG name={option} customDimensions />}
|
|
44
46
|
<FilterLabel text={t(`cbd:${option}`)} agg={agg} />
|
|
45
47
|
</span>
|
|
46
48
|
)
|
package/source/components/SearchWidgetsMobile/BasicDataWidgetMobile/BasicDataWidgetMobile.tsx
CHANGED
|
@@ -19,6 +19,7 @@ import { OBJECT_FILTERS, RATE_DEFAULT_CONTROLS } from '../../../framework/consta
|
|
|
19
19
|
interface IBasicDataWidgetDetailedProps {
|
|
20
20
|
[key: string]: any;
|
|
21
21
|
t?: (phrase: string) => string;
|
|
22
|
+
isNotDetailed:boolean;
|
|
22
23
|
}
|
|
23
24
|
|
|
24
25
|
interface IBasicDataWidgetDetailedState {
|
|
@@ -31,7 +32,7 @@ class BasicDataWidgetMobile extends React.Component<IMakeModelProps & IMakeModel
|
|
|
31
32
|
};
|
|
32
33
|
|
|
33
34
|
shouldComponentUpdate(nextProps: any, nextState: any) {
|
|
34
|
-
const { MMS_GROUPS, BODY_TYPE, FIRST_REGISTRATION, MILEAGE, POWER, RATE, PRICE, CONSUMPTION, SEATS, DOORS, FUEL, t } = this.props;
|
|
35
|
+
const { MMS_GROUPS, BODY_TYPE, FIRST_REGISTRATION, MILEAGE, POWER, RATE, PRICE, CONSUMPTION, SEATS, DOORS, FUEL, t,isNotDetailed } = this.props;
|
|
35
36
|
|
|
36
37
|
const dataBlocks = {
|
|
37
38
|
MMS_GROUPS, BODY_TYPE, FIRST_REGISTRATION, MILEAGE, POWER, RATE, PRICE, CONSUMPTION, SEATS, DOORS, FUEL
|
|
@@ -66,7 +67,7 @@ class BasicDataWidgetMobile extends React.Component<IMakeModelProps & IMakeModel
|
|
|
66
67
|
const {
|
|
67
68
|
MMS_GROUPS, BODY_TYPE, FIRST_REGISTRATION, MILEAGE, POWER, RATE, PRICE, CONSUMPTION, SEATS, DOORS, FUEL,
|
|
68
69
|
onFilterChange, onChangeFilterControls, onAddMmsGroup, onRemoveMmsGroup, onDropDownFocus,
|
|
69
|
-
MM_GROUPS_EXCLUDE, onAddMmExcludeGroup, onRemoveMmExcludeGroup, t, showModal, hideModal, onAddMmsGroupClick
|
|
70
|
+
MM_GROUPS_EXCLUDE, onAddMmExcludeGroup, onRemoveMmExcludeGroup, t, showModal, hideModal, onAddMmsGroupClick,isNotDetailed
|
|
70
71
|
} = this.props;
|
|
71
72
|
const commonProps = { t, onChange: onFilterChange };
|
|
72
73
|
|
|
@@ -98,6 +99,8 @@ class BasicDataWidgetMobile extends React.Component<IMakeModelProps & IMakeModel
|
|
|
98
99
|
onDropDownFocus,
|
|
99
100
|
options: FUEL.options,
|
|
100
101
|
values: FUEL.values,
|
|
102
|
+
// tslint:disable-next-line:object-literal-shorthand
|
|
103
|
+
isNotDetailed:isNotDetailed,
|
|
101
104
|
aggregation: FUEL.aggregation || {}
|
|
102
105
|
};
|
|
103
106
|
|
package/source/components/VehicleSmallCard/VehicleData/VechiclePriceItem/VechiclePriceItem.styl
CHANGED
|
@@ -82,9 +82,10 @@
|
|
|
82
82
|
pointer-events: none;
|
|
83
83
|
.priceItemCategory
|
|
84
84
|
color: $grey-9;
|
|
85
|
-
[class*='
|
|
86
|
-
|
|
87
|
-
|
|
85
|
+
[class*='MuiIconButton-root']
|
|
86
|
+
svg
|
|
87
|
+
path
|
|
88
|
+
fill: $grey-9;
|
|
88
89
|
.priceNewBlock
|
|
89
90
|
background-color $grey-9;
|
|
90
91
|
|
|
@@ -162,4 +163,4 @@
|
|
|
162
163
|
|
|
163
164
|
.tooltipWrapFavorites
|
|
164
165
|
transform: translateY(0px);
|
|
165
|
-
margin-left: 5px;
|
|
166
|
+
margin-left: 5px;
|
package/source/components/VehicleSmallCard/VehicleData/VechiclePriceItem/VechiclePriceItem.tsx
CHANGED
|
@@ -2,10 +2,11 @@ import * as React from 'react';
|
|
|
2
2
|
import VehicleFormattedPrice from '../../../Vehicle/VehicleFormattedPrice/VehicleFormattedPrice';
|
|
3
3
|
import IconSVG from '../../../_common/IconSVG/IconSVG';
|
|
4
4
|
import classnames from 'classnames';
|
|
5
|
-
import Tooltip from '../../../_common/Tooltip/Tooltip';
|
|
5
|
+
// import Tooltip from '../../../_common/Tooltip/Tooltip';
|
|
6
6
|
import styles from './VechiclePriceItem.styl';
|
|
7
|
-
import { isMobileOnly } from 'react-device-detect';
|
|
7
|
+
// import { isMobileOnly } from 'react-device-detect';
|
|
8
8
|
import { IPrice } from '../../../../framework/types/types';
|
|
9
|
+
import MaterialTooltip from '../../../_common/MaterialTooltip/MaterialTooltip';
|
|
9
10
|
|
|
10
11
|
export interface IVehiclePriceItemProps {
|
|
11
12
|
priceTitle: string;
|
|
@@ -100,12 +101,12 @@ class VehiclePriceItem extends React.Component<IVehiclePriceItemProps> {
|
|
|
100
101
|
href: url
|
|
101
102
|
})}
|
|
102
103
|
{tooltipDescription && (
|
|
103
|
-
<
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
positionX={positionX}
|
|
107
|
-
positionY={positionY}
|
|
108
|
-
|
|
104
|
+
<MaterialTooltip
|
|
105
|
+
className={styles.tooltipWrapFavorites}
|
|
106
|
+
text={tooltipDescription}
|
|
107
|
+
// positionX={positionX}
|
|
108
|
+
// positionY={positionY}
|
|
109
|
+
icon='infoIcon'
|
|
109
110
|
/>
|
|
110
111
|
)}
|
|
111
112
|
{isNewPriceCategory && (
|
|
@@ -183,4 +184,4 @@ class VehiclePriceItem extends React.Component<IVehiclePriceItemProps> {
|
|
|
183
184
|
);
|
|
184
185
|
}
|
|
185
186
|
}
|
|
186
|
-
export default VehiclePriceItem;
|
|
187
|
+
export default VehiclePriceItem;
|
|
@@ -8,10 +8,11 @@ import Image from '../_common/Image/Image';
|
|
|
8
8
|
import { IPrice, IVehicleInfo, IVehicleTitleProps } from '../../framework/types/types';
|
|
9
9
|
import getDecoratedProps from '../../framework/vehiclesProps/decoratedLightProps';
|
|
10
10
|
import IconSVG from '../_common/IconSVG/IconSVG';
|
|
11
|
-
import Tooltip from '../_common/Tooltip/Tooltip';
|
|
11
|
+
// import Tooltip from '../_common/Tooltip/Tooltip';
|
|
12
12
|
import VehicleFormattedPrice from '../Vehicle/VehicleFormattedPrice/VehicleFormattedPrice';
|
|
13
13
|
import styles from './VehicleSmallCardForDealerships.styl';
|
|
14
14
|
import { vehicleProps } from '../../locales/data';
|
|
15
|
+
import MaterialTooltip from '../_common/MaterialTooltip/MaterialTooltip';
|
|
15
16
|
|
|
16
17
|
const ImageWithStats = withStats(Image);
|
|
17
18
|
interface IVehicleSmallCardForDealershipsProps {
|
|
@@ -114,12 +115,12 @@ const VehicleSmallCardForDealerships: React.FunctionComponent<IVehicleSmallCardF
|
|
|
114
115
|
<div className={styles.priceItem}>
|
|
115
116
|
<div className={styles.priceTextWrap}>
|
|
116
117
|
<a className={styles.priceItemCategory} href={url} onClick={() => routeToActiveTab('Finanzierung')}>Finanzierung</a>
|
|
117
|
-
<
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
positionX='left'
|
|
121
|
-
positionY='top'
|
|
122
|
-
|
|
118
|
+
<MaterialTooltip
|
|
119
|
+
className={styles.tooltipWrap}
|
|
120
|
+
icon='infoIcon'
|
|
121
|
+
// positionX='left'
|
|
122
|
+
// positionY='top'
|
|
123
|
+
text={`
|
|
123
124
|
Bei der Finanzierung zahlen Sie lediglich die Zinsen des Darlehens und einen geringen Tilgungsanteil.
|
|
124
125
|
Zum Vertragsende können Sie entscheiden, ob Sie den Restbetrag ablösen oder weiter finanzieren wollen.
|
|
125
126
|
`}
|
|
@@ -181,4 +182,4 @@ VehicleSmallCardForDealerships.defaultProps = {
|
|
|
181
182
|
onContainerClick: () => { }
|
|
182
183
|
};
|
|
183
184
|
|
|
184
|
-
export default VehicleSmallCardForDealerships;
|
|
185
|
+
export default VehicleSmallCardForDealerships;
|
|
@@ -7,6 +7,7 @@ import { IconSvgWrapper } from './MaterialTooltip.styled';
|
|
|
7
7
|
interface IMaterialTooltip {
|
|
8
8
|
text: string;
|
|
9
9
|
icon?: string;
|
|
10
|
+
className?: string;
|
|
10
11
|
placement?: 'bottom-end' | 'bottom-start' | 'bottom' | 'left-end' | 'left-start' | 'left' | 'right-end' | 'right-start' | 'right' | 'top-end' | 'top-start' | 'top';
|
|
11
12
|
}
|
|
12
13
|
|
|
@@ -21,9 +22,9 @@ const LightTooltip = styled(({ className, ...props }: TooltipProps) => (
|
|
|
21
22
|
},
|
|
22
23
|
}));
|
|
23
24
|
|
|
24
|
-
const MaterialTooltip = ({ text, icon = 'infoIcon', placement }: IMaterialTooltip) => {
|
|
25
|
+
const MaterialTooltip = ({ text, icon = 'infoIcon', placement, className }: IMaterialTooltip) => {
|
|
25
26
|
return (
|
|
26
|
-
<LightTooltip placement={placement} title={text}>
|
|
27
|
+
<LightTooltip placement={placement} title={text} className={className}>
|
|
27
28
|
<IconButton>
|
|
28
29
|
<IconSvgWrapper name={icon} customDimensions />
|
|
29
30
|
</IconButton>
|