@bytebrand/fe-ui-core 4.1.172 → 4.1.174
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/common.ts +5 -0
- package/media/svg/common/arrow_breadcrumps.svg +2 -2
- package/media/svg/common/home.svg +6 -8
- package/media/svg/common/whyAutodeIconSet-F.svg +8 -12
- package/media/svg/common/whyAutodeIconSet-G.svg +6 -8
- package/media/svg/common/whyAutodeIconSet-Q.svg +5 -15
- package/media/svg/common/whyAutodeIconSet-R.svg +8 -13
- package/media/svg/infoBlocks/whyAutodeIconSet-F.svg +8 -8
- package/media/svg/infoBlocks/whyAutodeIconSet-G.svg +7 -6
- package/media/svg/infoBlocks/whyAutodeIconSet-Q.svg +5 -11
- package/media/svg/infoBlocks/whyAutodeIconSet-R.svg +8 -9
- package/package.json +1 -1
- package/source/components/AccordionWidget/AccordionWidget.styl +0 -3
- package/source/components/AccordionWidget/AccordionWidget.tsx +1 -3
- package/source/components/Alternative/DealerInfo.styl +7 -1
- package/source/components/Alternative/DealerInfo.tsx +64 -38
- package/source/components/Breadcrumbs/Breadcrumbs.styl +31 -19
- package/source/components/Breadcrumbs/Breadcrumbs.tsx +3 -3
- package/source/components/Breadcrumbs/FirstInfoBlock/FirstInfoBlock.styl +11 -18
- package/source/components/PriceRating/PriceRating.styl +1 -0
- package/source/components/SearchFilters/common/RangeControlled/RangeControlled.tsx +2 -1
- package/source/components/SearchPage/SearchTopBar/SearchTopBar.styl +13 -3
- package/source/components/SearchPage/SearchTopBar/SearchTopBar.tsx +3 -3
- package/source/components/Vehicle/VehicleFormattedPrice/VehicleFormattedPrice.styl +23 -17
- package/source/components/VehicleDetailedSidebar/partials/Properties.styl +0 -4
- package/source/components/VehicleDetailedSidebar/partials/Properties.tsx +1 -1
- package/source/components/VehicleSmallCard/VehicleData/VechiclePriceItem/VechiclePriceItem.styl +54 -40
- package/source/components/VehicleSmallCard/VehicleData/VechiclePriceItem/VechiclePriceItem.tsx +38 -16
- package/source/components/VehicleSmallCard/VehicleData/VehicleInfo/VehicleInfo.styl +47 -18
- package/source/components/VehicleSmallCard/VehicleData/VehicleInfo/VehicleInfo.tsx +13 -6
- package/source/components/VehicleSmallCard/VehicleData/VehiclePrice/VehiclePrice.styl +48 -28
- package/source/components/VehicleSmallCard/VehicleData/VehiclePrice/VehiclePrice.tsx +50 -16
- package/source/components/VehicleSmallCard/VehicleData/VehicleProperty/VehicleProperty.styl +6 -8
- package/source/components/VehicleSmallCard/VehicleData/VehicleTitle/VehicleTitle.styl +31 -12
- package/source/components/VehicleSmallCard/VehicleData/VehicleTitle/VehicleTitle.tsx +8 -3
- package/source/components/VehicleSmallCard/VehicleSmallCard.styl +51 -19
- package/source/components/VehicleSmallCard/VehicleSmallCard.tsx +39 -9
- package/source/components/_common/Badge/Badge.styl +13 -7
- package/source/components/_common/Badge/Badge.tsx +1 -1
- package/source/components/_common/Button/Button.styled.tsx +13 -8
- package/source/components/_common/Button/Button.tsx +1 -1
- package/source/components/_common/ExpansionPanel/ExpansionPanel.tsx +14 -4
- package/source/components/_common/IconSVG/IconSVG.story.js +1 -1
- package/source/components/_common/IconSVG/IconSVGConfig.tsx +90 -1
- package/source/components/_common/IconSVG/SVG/CloseIconSelect.tsx +1 -1
- package/source/components/_common/IconSVG/SVG/common/AddressDashboard.tsx +29 -0
- package/source/components/_common/IconSVG/SVG/common/CallbackDashboard.tsx +30 -0
- package/source/components/_common/IconSVG/SVG/common/CloseGrey.tsx +22 -0
- package/source/components/_common/IconSVG/SVG/common/DashboardQuestionMark.tsx +20 -0
- package/source/components/_common/IconSVG/SVG/common/DeliveryDashboard.tsx +25 -0
- package/source/components/_common/IconSVG/SVG/common/EditPriceIcon.tsx +20 -0
- package/source/components/_common/IconSVG/SVG/common/HandingOverDashboard.tsx +32 -0
- package/source/components/_common/IconSVG/SVG/common/MenuGrey.tsx +22 -0
- package/source/components/_common/IconSVG/SVG/common/MyOrderIcon.tsx +20 -0
- package/source/components/_common/IconSVG/SVG/common/OrderReceivedDashboard.tsx +27 -0
- package/source/components/_common/IconSVG/SVG/common/PickupDashboard.tsx +30 -0
- package/source/components/_common/IconSVG/SVG/common/PreparationDashboard.tsx +29 -0
- package/source/components/_common/IconSVG/SVG/common/ProfileDashboard.tsx +24 -0
- package/source/components/_common/IconSVG/SVG/common/RegistrationDashboard.tsx +31 -0
- package/source/components/_common/IconSVG/SVG/common/SliderEye.tsx +2 -3
- package/source/components/_common/IconSVG/SVG/common/StarRoundedCorners.tsx +1 -1
- package/source/components/_common/IconSVG/SVG/flags/AT.tsx +19 -0
- package/source/components/_common/IconSVG/SVG/flags/BE.tsx +20 -0
- package/source/components/_common/IconSVG/SVG/flags/BG.tsx +20 -0
- package/source/components/_common/IconSVG/SVG/flags/CH.tsx +22 -0
- package/source/components/_common/IconSVG/SVG/flags/CZ.tsx +18 -0
- package/source/components/_common/IconSVG/SVG/flags/DE.tsx +18 -0
- package/source/components/_common/IconSVG/SVG/flags/DK.tsx +18 -0
- package/source/components/_common/IconSVG/SVG/flags/ES.tsx +2585 -0
- package/source/components/_common/IconSVG/SVG/flags/FI.tsx +18 -0
- package/source/components/_common/IconSVG/SVG/flags/FR.tsx +20 -0
- package/source/components/_common/IconSVG/SVG/flags/GB.tsx +26 -0
- package/source/components/_common/IconSVG/SVG/flags/HR.tsx +135 -0
- package/source/components/_common/IconSVG/SVG/flags/HU.tsx +20 -0
- package/source/components/_common/IconSVG/SVG/flags/IT.tsx +20 -0
- package/source/components/_common/IconSVG/SVG/flags/LI.tsx +106 -0
- package/source/components/_common/IconSVG/SVG/flags/LU.tsx +18 -0
- package/source/components/_common/IconSVG/SVG/flags/NL.tsx +18 -0
- package/source/components/_common/IconSVG/SVG/flags/NO.tsx +20 -0
- package/source/components/_common/IconSVG/SVG/flags/PL.tsx +19 -0
- package/source/components/_common/IconSVG/SVG/flags/RO.tsx +20 -0
- package/source/components/_common/IconSVG/SVG/flags/RU.tsx +20 -0
- package/source/components/_common/IconSVG/SVG/flags/SE.tsx +20 -0
- package/source/components/_common/IconSVG/SVG/flags/SI.tsx +54 -0
- package/source/components/_common/IconSVG/SVG/flags/SK.tsx +35 -0
- package/source/components/_common/IconSVG/SVG/flags/UA.tsx +19 -0
- package/source/components/_common/IconSVG/SVG/searchWidgets/drive/AllWheelDrive.tsx +2 -2
- package/source/components/_common/IconSVG/SVG/searchWidgets/drive/FrontWheelDrive.tsx +2 -2
- package/source/components/_common/IconSVG/SVG/searchWidgets/drive/RearWheelDrive.tsx +2 -2
- package/source/components/_common/IconSVG/SVG/searchWidgets/fuel/FuelDiesel.tsx +4 -14
- package/source/components/_common/IconSVG/SVG/searchWidgets/fuel/FuelPetrol.tsx +1 -1
- package/source/components/_common/IconSVG/SVG/settings/RemoveEye.tsx +1 -1
- package/source/components/_common/IconSVG/SVG/settings/RemoveEyeOff.tsx +1 -1
- package/source/components/_common/IconSVG/SVG/slider/360New.tsx +20 -0
- package/source/components/_common/IconSVG/SVG/vehicle/CarAvailability.tsx +3 -3
- package/source/components/_common/IconSVG/SVG/vehicle/CheckoutChecked.tsx +2 -2
- package/source/components/_common/IconSVG/SVG/vehicle/Date.tsx +2 -2
- package/source/components/_common/IconSVG/SVG/vehicle/Door.tsx +5 -7
- package/source/components/_common/IconSVG/SVG/vehicle/FuelConsumption.tsx +1 -1
- package/source/components/_common/IconSVG/SVG/vehicle/NewCar.tsx +7 -9
- package/source/components/_common/IconSVG/SVG/vehicle/Ps.tsx +1 -1
- package/source/components/_common/IconSVG/SVG/vehicle/SelectorGearboxAutomatic.tsx +2 -2
- package/source/components/_common/MaterialAccordionGroup/MaterialAccordionGroup.styled.tsx +17 -1
- package/source/components/_common/MaterialAccordionGroup/MaterialAccordionGroup.tsx +3 -4
- package/source/components/_common/MaterialAutocomplete/MaterialAutocomplete.styled.tsx +6 -3
- package/source/components/_common/MaterialAutocomplete/MaterialAutocomplete.tsx +28 -3
- package/source/components/_common/MaterialSelect/MaterialSelect.styled.tsx +0 -7
- package/source/components/_common/MaterialSelect/MaterialSelect.tsx +16 -9
- package/source/components/_common/Modal/CookieModal.tsx +10 -7
- package/source/components/_common/Modal/Modal.styled.tsx +2 -1
- package/source/components/_common/Modal/modals/ManageCookieModal/ManageCookieModal.styl +15 -3
- package/source/components/_common/Modal/modals/ManageCookieModal/ManageCookieModal.tsx +5 -3
- package/source/components/_common/Modal/modals/PreviewCookieModal/PreviewCookieModal.styl +11 -1
- package/source/components/_common/Modal/modals/PreviewCookieModal/PreviewCookieModal.tsx +2 -0
- package/source/components/_common/TimePicker/TimePicker.styl +3 -1
- package/source/components/_common/TimePicker/TimePicker.tsx +6 -2
- package/source/components/_common/UserMenu/MaterialMenu.styled.tsx +2 -1
- package/source/components/_common/withStats/withStats.styl +43 -87
- package/source/components/_common/withStats/withStats.tsx +17 -8
- package/source/components/containers/SearchPage/FiltersContainer/FiltersContainer.styl +7 -3
- package/source/framework/constants/common.ts +15 -3
- package/source/framework/factories/BreadcrumbsFactory.tsx +19 -8
- package/source/framework/factories/FactoryTypes.d.ts +1 -0
- package/source/framework/types/types.ts +4 -2
- package/source/framework/utils/CommonUtils.ts +26 -9
- package/source/framework/vehiclesProps/decoratedProps.tsx +19 -23
- package/source/framework/vehiclesProps/equipment.ts +4 -3
- package/source/locales/data.ts +2 -0
- package/source/theme/priceReviewColors.styl +3 -1
- package/utils.ts +16 -0
|
@@ -34,6 +34,7 @@ const BreadcrumbsFactory: IBreadcrumbsFactoryConfig = {
|
|
|
34
34
|
|
|
35
35
|
COMPARE: (props: any) => ({
|
|
36
36
|
list: [
|
|
37
|
+
{ link: '/account/dashboard', title: props.t('common:breadcrumbs.Dashboard') },
|
|
37
38
|
{ link: '', title: props.t('common:breadcrumbs.Compare') }
|
|
38
39
|
]
|
|
39
40
|
}),
|
|
@@ -51,6 +52,13 @@ const BreadcrumbsFactory: IBreadcrumbsFactoryConfig = {
|
|
|
51
52
|
]
|
|
52
53
|
}),
|
|
53
54
|
|
|
55
|
+
USER_DASHBOARD: (props: any) => ({
|
|
56
|
+
list: [
|
|
57
|
+
{ link: '', title: props.t('common:breadcrumbs.Dashboard') }
|
|
58
|
+
],
|
|
59
|
+
className: 'breadcrumbsUserDashboard'
|
|
60
|
+
}),
|
|
61
|
+
|
|
54
62
|
DEALER_EMPLOYEES_SET: (props: any) => ({
|
|
55
63
|
list: [
|
|
56
64
|
{ link: '/account/position/employees', title: props.t('common:breadcrumbs.Employees') },
|
|
@@ -107,6 +115,7 @@ const BreadcrumbsFactory: IBreadcrumbsFactoryConfig = {
|
|
|
107
115
|
}
|
|
108
116
|
],
|
|
109
117
|
classBreadcrumbsAny: 'VEHICLE_DETAILS',
|
|
118
|
+
className: 'breadcrumbsCDP',
|
|
110
119
|
withBackBtn: true
|
|
111
120
|
}),
|
|
112
121
|
|
|
@@ -126,6 +135,7 @@ const BreadcrumbsFactory: IBreadcrumbsFactoryConfig = {
|
|
|
126
135
|
}
|
|
127
136
|
],
|
|
128
137
|
classBreadcrumbsAny: 'VEHICLE_DETAILS',
|
|
138
|
+
className: 'breadcrumbsCDP',
|
|
129
139
|
withBackBtn: true
|
|
130
140
|
}),
|
|
131
141
|
|
|
@@ -145,6 +155,7 @@ const BreadcrumbsFactory: IBreadcrumbsFactoryConfig = {
|
|
|
145
155
|
}
|
|
146
156
|
],
|
|
147
157
|
classBreadcrumbsAny: 'VEHICLE_DETAILS',
|
|
158
|
+
className: 'breadcrumbsCDP',
|
|
148
159
|
withBackBtn: true
|
|
149
160
|
}),
|
|
150
161
|
|
|
@@ -167,22 +178,22 @@ const BreadcrumbsFactory: IBreadcrumbsFactoryConfig = {
|
|
|
167
178
|
link: '',
|
|
168
179
|
title: props.t('common:breadcrumbs.MySearches')
|
|
169
180
|
}
|
|
170
|
-
]
|
|
181
|
+
],
|
|
182
|
+
className: 'breadcrumbsMySearches'
|
|
171
183
|
}),
|
|
172
184
|
|
|
173
185
|
FAVORITES: (props: any) => ({
|
|
174
186
|
list: [
|
|
175
|
-
{
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
]
|
|
187
|
+
{ link: '/account/dashboard', title: props.t('common:breadcrumbs.Dashboard') },
|
|
188
|
+
{ link: '', title: props.t('common:breadcrumbs.Favorites') }
|
|
189
|
+
],
|
|
190
|
+
className: 'breadcrumbsMySearches'
|
|
180
191
|
}),
|
|
181
192
|
|
|
182
193
|
DATA_IMPORT: (props: any) => ({
|
|
183
194
|
list: [
|
|
184
|
-
|
|
185
|
-
|
|
195
|
+
{ link: '/account/dashboard', title: props.t('common:breadcrumbs.Dashboard') },
|
|
196
|
+
{ link: '', title: props.t('common:breadcrumbs.DataImport') }
|
|
186
197
|
]
|
|
187
198
|
}),
|
|
188
199
|
|
|
@@ -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;
|
|
@@ -108,6 +108,8 @@ export interface IVehicleInfo {
|
|
|
108
108
|
damaged?: any;
|
|
109
109
|
driveType?: any;
|
|
110
110
|
url?: string;
|
|
111
|
+
target?: string;
|
|
112
|
+
rel?: string;
|
|
111
113
|
}
|
|
112
114
|
|
|
113
115
|
export interface IVehicleTitleProps {
|
|
@@ -115,7 +117,7 @@ export interface IVehicleTitleProps {
|
|
|
115
117
|
model?: string;
|
|
116
118
|
subModel?: string;
|
|
117
119
|
option?: string;
|
|
118
|
-
vehicleComponentName?: 'comparable' | 'landing' | 'search' | 'main' | 'myVehicles' | 'favorite';
|
|
120
|
+
vehicleComponentName?: 'comparable' | 'landing' | 'search' | 'main' | 'myVehicles' | 'favorite' | 'recently';
|
|
119
121
|
isSponsored?: boolean;
|
|
120
122
|
showFavoriteStar?: boolean;
|
|
121
123
|
id?: string;
|
|
@@ -7,16 +7,13 @@ import {
|
|
|
7
7
|
DROP_DOWN_GROUP, RATE_DEFAULT, MMS_GROUPS_KEY, MMS_GROUP_FIELDS
|
|
8
8
|
} from '../constants/SearchWidget';
|
|
9
9
|
import { priceRatings, priceRatingConfig } from '../constants/price';
|
|
10
|
-
import { HUNDRED } from '../constants/common';
|
|
10
|
+
import { GOOGLE_BUNDLE_COOKIES, HUNDRED } from '../constants/common';
|
|
11
11
|
import { offers } from '../constants';
|
|
12
12
|
import { FILTERS_IN_TITLE, MANUFACTURER_KEY, MAX_FILTERS_IN_TITLE, MODEL_KEY } from '../constants/Search';
|
|
13
|
-
import {
|
|
13
|
+
import { SearchPage as SearchPageTranslate } from '../../locales/data';
|
|
14
14
|
|
|
15
15
|
const PRICE_DEFAULT = DROP_DOWN_GROUP[PRICE].defaultValue;
|
|
16
16
|
|
|
17
|
-
// const RANGE_FILTERS = [FIRST_REGISTRATION, MILEAGE, PRICE];
|
|
18
|
-
// const ARRAY_RANGE_FILTERS = [FIRST_REGISTRATION, MILEAGE];
|
|
19
|
-
|
|
20
17
|
export const formatMileage = (millage: number | string) => {
|
|
21
18
|
return millage.toLocaleString('en-US').replace(/,/g, '.');
|
|
22
19
|
};
|
|
@@ -402,7 +399,11 @@ export const getSupportedImageFormat = (IMAGE_URL: string, vehicleID: string, im
|
|
|
402
399
|
return webpFeature ? `${vehicleImageURL}/${size}-cached.webp` : `${vehicleImageURL}/${size}-cached.jpeg`;
|
|
403
400
|
};
|
|
404
401
|
|
|
405
|
-
export function getChipFilterValue(
|
|
402
|
+
export function getChipFilterValue(
|
|
403
|
+
chip: any,
|
|
404
|
+
t: (key: string, options?: object) => string = (phrase: string, _?: object) => _get(SearchPageTranslate(chip), phrase.replace(':', '.'), phrase),
|
|
405
|
+
language: string = 'de'
|
|
406
|
+
) {
|
|
406
407
|
let filterValue: string;
|
|
407
408
|
let title: string;
|
|
408
409
|
let from: string;
|
|
@@ -532,15 +533,31 @@ export function setUtmParameters() {
|
|
|
532
533
|
const domain = parsedUrl.hostname.split('.').slice(-2).join('.');
|
|
533
534
|
|
|
534
535
|
document.cookie = `marketing=${JSON.stringify(marketing)};expires=${expiresDate};domain=.${domain};path=/`;
|
|
535
|
-
}
|
|
536
|
+
}
|
|
536
537
|
|
|
537
538
|
export const updateCookieList = () => {
|
|
539
|
+
let cookieConsentList = Object.keys(GOOGLE_BUNDLE_COOKIES);
|
|
540
|
+
let isFBGranted = true;
|
|
541
|
+
let isHotjarGranted = true;
|
|
538
542
|
const cookieConfig = JSON.parse(localStorage.getItem('cookieConfig')) || {};
|
|
543
|
+
|
|
539
544
|
const parsedUrl = new URL(window.location.href);
|
|
540
545
|
const domain = parsedUrl.hostname.split('.').slice(-2).join('.');
|
|
541
546
|
Object.keys(cookieConfig).forEach((group: string) => {
|
|
542
547
|
cookieConfig[group].forEach((cookie: string) => {
|
|
543
|
-
Cookies.remove(cookie, { path: '/'
|
|
544
|
-
|
|
548
|
+
Cookies.remove(cookie, { domain, path: '/' }); // manually remove selected cookies
|
|
549
|
+
// google
|
|
550
|
+
if (cookieConsentList.includes(cookie)) cookieConsentList = cookieConsentList.filter(i => i !== cookie); // deny google cookie consent for _gcl_au, _ga, _gid, _gat_UA-31842-13, etc
|
|
551
|
+
// fb
|
|
552
|
+
// tslint:disable-next-line:prefer-switch
|
|
553
|
+
else if (cookie === '_fbp') isFBGranted = false;
|
|
554
|
+
else if (cookie === 'hotjar') isHotjarGranted = false;
|
|
555
|
+
});
|
|
545
556
|
});
|
|
557
|
+
// grant google cookies
|
|
558
|
+
if (typeof window.grantCookieConsent === 'function') window.grantCookieConsent(cookieConsentList);
|
|
559
|
+
// grant FB cookies
|
|
560
|
+
if (isFBGranted && typeof window.fbq === 'function') window.fbq('consent', 'grant');
|
|
561
|
+
// grant Hotjar cookies
|
|
562
|
+
if (isHotjarGranted && typeof window.grantHotjarCookieConsent === 'function') window.grantHotjarCookieConsent();
|
|
546
563
|
};
|
|
@@ -275,7 +275,7 @@ const getDecoratedProps = (
|
|
|
275
275
|
fuelCapacity: {
|
|
276
276
|
title: t('vehicleProps:title.fuelCapacity'),
|
|
277
277
|
get value() {
|
|
278
|
-
const fuelCapacity = car.sizeVolumeWeight.fuelCapacity;
|
|
278
|
+
const fuelCapacity = car.sizeVolumeWeight && car.sizeVolumeWeight.fuelCapacity;
|
|
279
279
|
return Number.isFinite(fuelCapacity)
|
|
280
280
|
? t('vehicleProps:value.fuelCapacity', { capacity: fuelCapacity.toLocaleString(language) })
|
|
281
281
|
: t('vehicleProps:value.na');
|
|
@@ -285,7 +285,7 @@ const getDecoratedProps = (
|
|
|
285
285
|
batteryCapacity: {
|
|
286
286
|
title: t('vehicleProps:title.batteryCapacityTitle'),
|
|
287
287
|
get value() {
|
|
288
|
-
const
|
|
288
|
+
const batteryCapacity = car.battery && car.battery.batteryCapacity;
|
|
289
289
|
return batteryCapacity && Number.isFinite(batteryCapacity)
|
|
290
290
|
? t('vehicleProps:value.batteryCapacity', { batteryCapacity: batteryCapacity.toLocaleString(language) })
|
|
291
291
|
: t('vehicleProps:value.na');
|
|
@@ -295,11 +295,9 @@ const getDecoratedProps = (
|
|
|
295
295
|
chargingDuration230V: {
|
|
296
296
|
title: t('vehicleProps:title.chargingDuration230V'),
|
|
297
297
|
get value() {
|
|
298
|
-
const
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
batteryCharchingDuration230VMinutesHours
|
|
302
|
-
} = car.battery;
|
|
298
|
+
const batteryChargingDuration230VSelect = car.battery && car.battery.batteryChargingDuration230VSelect;
|
|
299
|
+
const batteryChargingDuration230VHour = car.battery && car.battery.batteryChargingDuration230VHour;
|
|
300
|
+
const batteryCharchingDuration230VMinutesHours = car.battery && car.battery.batteryCharchingDuration230VMinutesHours;
|
|
303
301
|
|
|
304
302
|
return batteryChargingDuration230VSelect
|
|
305
303
|
? `${batteryChargingDuration230VHour ? `${batteryChargingDuration230VHour} ${isCheckedBatteryTime(batteryCharchingDuration230VMinutesHours, t)}` : ''} ${batteryChargingDuration230VSelect}`
|
|
@@ -309,11 +307,9 @@ const getDecoratedProps = (
|
|
|
309
307
|
chargingDurationMaxSpeed: {
|
|
310
308
|
title: t('vehicleProps:title.chargingDurationMaxSpeed'),
|
|
311
309
|
get value() {
|
|
312
|
-
const
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
batteryCharchingDurationMaxSelectMinutesHours
|
|
316
|
-
} = car.battery;
|
|
310
|
+
const batteryChargingDurationMaxSelect = car.battery && car.battery.batteryChargingDurationMaxSelect
|
|
311
|
+
const batteryChargingDurationMaxHour = car.battery && car.battery.batteryChargingDurationMaxHour
|
|
312
|
+
const batteryCharchingDurationMaxSelectMinutesHours = car.battery && car.battery.batteryCharchingDurationMaxSelectMinutesHours
|
|
317
313
|
|
|
318
314
|
return batteryChargingDurationMaxSelect
|
|
319
315
|
? `${batteryChargingDurationMaxHour ? `${batteryChargingDurationMaxHour} ${isCheckedBatteryTime(batteryCharchingDurationMaxSelectMinutesHours, t)}` : ''} ${batteryChargingDurationMaxSelect}`
|
|
@@ -323,7 +319,7 @@ const getDecoratedProps = (
|
|
|
323
319
|
batteryChargerType: {
|
|
324
320
|
title: t('vehicleProps:title.batteryChargerType'),
|
|
325
321
|
get value() {
|
|
326
|
-
const
|
|
322
|
+
const batteryChargerType = car.battery && car.battery.batteryChargerType
|
|
327
323
|
|
|
328
324
|
return isPropDefined(batteryChargerType)
|
|
329
325
|
? batteryChargerType.map((item: any) => t(`cbd:${item}`)).join('\n')
|
|
@@ -356,7 +352,7 @@ const getDecoratedProps = (
|
|
|
356
352
|
length: {
|
|
357
353
|
title: t('vehicleProps:title.length'),
|
|
358
354
|
get value() {
|
|
359
|
-
const length = car.sizeVolumeWeight.length;
|
|
355
|
+
const length = car.sizeVolumeWeight && car.sizeVolumeWeight.length;
|
|
360
356
|
return Number.isFinite(length)
|
|
361
357
|
? t('vehicleProps:value.length', { size: length.toLocaleString(language) })
|
|
362
358
|
: t('vehicleProps:value.na');
|
|
@@ -366,7 +362,7 @@ const getDecoratedProps = (
|
|
|
366
362
|
width: {
|
|
367
363
|
title: t('vehicleProps:title.width'),
|
|
368
364
|
get value() {
|
|
369
|
-
const width = car.sizeVolumeWeight.width;
|
|
365
|
+
const width = car.sizeVolumeWeight && car.sizeVolumeWeight.width;
|
|
370
366
|
return Number.isFinite(width)
|
|
371
367
|
? t('vehicleProps:value.width', { size: width.toLocaleString(language) })
|
|
372
368
|
: t('vehicleProps:value.na');
|
|
@@ -376,7 +372,7 @@ const getDecoratedProps = (
|
|
|
376
372
|
height: {
|
|
377
373
|
title: t('vehicleProps:title.height'),
|
|
378
374
|
get value() {
|
|
379
|
-
const height = car.sizeVolumeWeight.height;
|
|
375
|
+
const height = car.sizeVolumeWeight && car.sizeVolumeWeight.height;
|
|
380
376
|
return Number.isFinite(height)
|
|
381
377
|
? t('vehicleProps:value.height', { size: height.toLocaleString(language) })
|
|
382
378
|
: t('vehicleProps:value.na');
|
|
@@ -396,7 +392,7 @@ const getDecoratedProps = (
|
|
|
396
392
|
capacityLoad: {
|
|
397
393
|
title: t('vehicleProps:title.loadingVolume'),
|
|
398
394
|
get value() {
|
|
399
|
-
const completeCapacity = car.sizeVolumeWeight.completeCapacity;
|
|
395
|
+
const completeCapacity = car.sizeVolumeWeight && car.sizeVolumeWeight.completeCapacity;
|
|
400
396
|
return Number.isFinite(completeCapacity)
|
|
401
397
|
? t('vehicleProps:value.capacityLoad', { capacity: completeCapacity.toLocaleString(language) })
|
|
402
398
|
: t('vehicleProps:value.na');
|
|
@@ -406,7 +402,7 @@ const getDecoratedProps = (
|
|
|
406
402
|
bootCapacity: {
|
|
407
403
|
title: t('vehicleProps:title.bootCapacity'),
|
|
408
404
|
get value() {
|
|
409
|
-
const cargoCapacity = car.sizeVolumeWeight.cargoCapacity;
|
|
405
|
+
const cargoCapacity = car.sizeVolumeWeight && car.sizeVolumeWeight.cargoCapacity;
|
|
410
406
|
return Number.isFinite(cargoCapacity)
|
|
411
407
|
? t('vehicleProps:value.bootCapacity', { capacity: cargoCapacity.toLocaleString(language) })
|
|
412
408
|
: t('vehicleProps:value.na');
|
|
@@ -426,7 +422,7 @@ const getDecoratedProps = (
|
|
|
426
422
|
tare: {
|
|
427
423
|
title: t('vehicleProps:title.tare'),
|
|
428
424
|
get value() {
|
|
429
|
-
const emptyWeight = car.sizeVolumeWeight.emptyWeight;
|
|
425
|
+
const emptyWeight = car.sizeVolumeWeight && car.sizeVolumeWeight.emptyWeight;
|
|
430
426
|
return Number.isFinite(emptyWeight)
|
|
431
427
|
? t('vehicleProps:value.tareWeight', { weight: (emptyWeight).toLocaleString(language) })
|
|
432
428
|
: t('vehicleProps:value.na');
|
|
@@ -436,7 +432,7 @@ const getDecoratedProps = (
|
|
|
436
432
|
maximumWeight: {
|
|
437
433
|
title: t('vehicleProps:title.maximumWeight'),
|
|
438
434
|
get value() {
|
|
439
|
-
const cargoCapacity = car.sizeVolumeWeight.cargoCapacity;
|
|
435
|
+
const cargoCapacity = car.sizeVolumeWeight && car.sizeVolumeWeight.cargoCapacity;
|
|
440
436
|
return Number.isFinite(cargoCapacity)
|
|
441
437
|
? t('vehicleProps:value.maximumWeightCapacity', { capacity: cargoCapacity.toLocaleString(language) })
|
|
442
438
|
: t('vehicleProps:value.na');
|
|
@@ -446,7 +442,7 @@ const getDecoratedProps = (
|
|
|
446
442
|
trailerWeightBraked: {
|
|
447
443
|
title: t('vehicleProps:title.trailerLoadBraked'),
|
|
448
444
|
get value() {
|
|
449
|
-
const trailerWeightBraked = car.sizeVolumeWeight.trailerWeightBraked;
|
|
445
|
+
const trailerWeightBraked = car.sizeVolumeWeight && car.sizeVolumeWeight.trailerWeightBraked;
|
|
450
446
|
return Number.isFinite(trailerWeightBraked)
|
|
451
447
|
? t('vehicleProps:value.weight', { weight: trailerWeightBraked.toLocaleString(language) })
|
|
452
448
|
: t('vehicleProps:value.na');
|
|
@@ -456,7 +452,7 @@ const getDecoratedProps = (
|
|
|
456
452
|
trailerWeightUnbraked: {
|
|
457
453
|
title: t('vehicleProps:title.trailerLoadUnbraked'),
|
|
458
454
|
get value() {
|
|
459
|
-
const trailerWeightUnbraked = car.sizeVolumeWeight.trailerWeightUnbraked;
|
|
455
|
+
const trailerWeightUnbraked = car.sizeVolumeWeight && car.sizeVolumeWeight.trailerWeightUnbraked;
|
|
460
456
|
return Number.isFinite(trailerWeightUnbraked)
|
|
461
457
|
? t('vehicleProps:value.weight', { weight: trailerWeightUnbraked.toLocaleString(language) })
|
|
462
458
|
: t('vehicleProps:value.na');
|
|
@@ -775,7 +771,7 @@ const getDecoratedProps = (
|
|
|
775
771
|
batteryRangeElectric: {
|
|
776
772
|
title: t('vehicleProps:title.batteryRangeElectric'),
|
|
777
773
|
get value() {
|
|
778
|
-
const
|
|
774
|
+
const batteryRangeElectric = car.battery && car.battery.batteryRangeElectric;
|
|
779
775
|
return Number.isFinite(batteryRangeElectric)
|
|
780
776
|
? t('vehicleProps:value.batteryRangeElectric', { consumption: batteryRangeElectric.toLocaleString(language) })
|
|
781
777
|
: t('vehicleProps:value.na');
|
|
@@ -7,11 +7,12 @@ export const getEquipment = (car: ICar, t: any): IEquipmentProps[] => {
|
|
|
7
7
|
const {
|
|
8
8
|
doors,
|
|
9
9
|
wheel,
|
|
10
|
-
extras,
|
|
10
|
+
extras = {},
|
|
11
11
|
window,
|
|
12
12
|
mirrors,
|
|
13
13
|
multimedia,
|
|
14
14
|
climatisation,
|
|
15
|
+
trailerCoupling = {},
|
|
15
16
|
airbags: { airbag },
|
|
16
17
|
heatingCooling: { auxiliaryHeating, climatisation: heatingCoolingClimatisation },
|
|
17
18
|
lights: { lightSensor, ...lights },
|
|
@@ -27,7 +28,7 @@ export const getEquipment = (car: ICar, t: any): IEquipmentProps[] => {
|
|
|
27
28
|
const heatingDriverSeats = Array.isArray(driverSeats) && driverSeats.indexOf('selector_driverSeats_electricHeated') !== -1;
|
|
28
29
|
const heatingCoDriverSeats = Array.isArray(coDriverSeats) && coDriverSeats.indexOf('selector_coDriverSeats_electricHeated') !== -1;
|
|
29
30
|
const heatingBackSeats = Array.isArray(backSeats) && backSeats.indexOf('selector_backSeats_electricHeated') !== -1;
|
|
30
|
-
|
|
31
|
+
const extrasValue = { ...extras, ...trailerCoupling }
|
|
31
32
|
return [
|
|
32
33
|
{
|
|
33
34
|
title: t('accordion.captionAssistanceSystems'), icon: 'stop',
|
|
@@ -114,7 +115,7 @@ export const getEquipment = (car: ICar, t: any): IEquipmentProps[] => {
|
|
|
114
115
|
},
|
|
115
116
|
{
|
|
116
117
|
title: t('accordion.captionExtras'), icon: 'newCar',
|
|
117
|
-
value: addPrefixToKeys(
|
|
118
|
+
value: addPrefixToKeys(extrasValue, 'extras')
|
|
118
119
|
}
|
|
119
120
|
];
|
|
120
121
|
};
|
package/source/locales/data.ts
CHANGED
|
@@ -54,6 +54,8 @@ export const vehicleProps = (car?: any, isOfferAvailable: boolean = true) => {
|
|
|
54
54
|
co2Combined: `${vehicleOption.co2}g CO2/km (komb)*`,
|
|
55
55
|
co2: `${vehicleOption.co2} g/km `,
|
|
56
56
|
na: 'N/A',
|
|
57
|
+
priceSub: '/mtl.',
|
|
58
|
+
prefixOldPrice: 'ab',
|
|
57
59
|
vehicleOwners: `${vehicleOption.vehicleOwners} Fahrzeughalter`,
|
|
58
60
|
vehicleOwners_plural: `${count} Fahrzeughalter`,
|
|
59
61
|
doorsOnly: `${vehicleOption.doorsOnly} Türen`,
|
package/utils.ts
CHANGED
|
@@ -15,3 +15,19 @@ export {
|
|
|
15
15
|
createDateAsUTC
|
|
16
16
|
} from './source/framework/utils/DateUtils';
|
|
17
17
|
export { getPriceRating, getPriceRatingConfig } from './source/framework/utils/CommonUtils';
|
|
18
|
+
|
|
19
|
+
export {
|
|
20
|
+
getVehicleDetails,
|
|
21
|
+
getOverviewDetails,
|
|
22
|
+
dimensionDetails,
|
|
23
|
+
availAbilityDetails,
|
|
24
|
+
colorAndMaterialDetails
|
|
25
|
+
} from './source/framework/vehiclesProps/vehicleDetails';
|
|
26
|
+
|
|
27
|
+
export {
|
|
28
|
+
getPowerLabel
|
|
29
|
+
} from './source/framework/vehiclesProps/decoratedProps';
|
|
30
|
+
|
|
31
|
+
export {
|
|
32
|
+
getActualHighlights
|
|
33
|
+
} from './source/framework/constants/highlights';
|