@bytebrand/fe-ui-core 4.1.202 → 4.1.204
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/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/source/framework/utils/CommonUtils.ts +6 -1
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;
|
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>
|
|
@@ -537,6 +537,7 @@ export function setUtmParameters() {
|
|
|
537
537
|
|
|
538
538
|
export const updateCookieList = () => {
|
|
539
539
|
let cookieConsentList = Object.keys(GOOGLE_BUNDLE_COOKIES);
|
|
540
|
+
let isHomeGoogleGranted = true; // home page google cookie
|
|
540
541
|
let isFBGranted = true;
|
|
541
542
|
let isHotjarGranted = true;
|
|
542
543
|
const cookieConfig = JSON.parse(localStorage.getItem('cookieConfig')) || {};
|
|
@@ -547,7 +548,10 @@ export const updateCookieList = () => {
|
|
|
547
548
|
cookieConfig[group].forEach((cookie: string) => {
|
|
548
549
|
Cookies.remove(cookie, { domain, path: '/' }); // manually remove selected cookies
|
|
549
550
|
// google
|
|
550
|
-
if (cookieConsentList.includes(cookie))
|
|
551
|
+
if (cookieConsentList.includes(cookie)) {
|
|
552
|
+
cookieConsentList = cookieConsentList.filter(i => i !== cookie); // deny google cookie consent for _gcl_au, _ga, _gid, _gat_UA-31842-13, etc
|
|
553
|
+
isHomeGoogleGranted = false;
|
|
554
|
+
}
|
|
551
555
|
// fb
|
|
552
556
|
// tslint:disable-next-line:prefer-switch
|
|
553
557
|
else if (cookie === '_fbp') isFBGranted = false;
|
|
@@ -556,6 +560,7 @@ export const updateCookieList = () => {
|
|
|
556
560
|
});
|
|
557
561
|
// grant google cookies
|
|
558
562
|
if (typeof window.grantCookieConsent === 'function') window.grantCookieConsent(cookieConsentList);
|
|
563
|
+
if (isHomeGoogleGranted && typeof window.allowGoogle === 'function') window.allowGoogle();
|
|
559
564
|
// grant FB cookies
|
|
560
565
|
if (isFBGranted && typeof window.fbq === 'function') window.fbq('consent', 'grant');
|
|
561
566
|
// grant Hotjar cookies
|