@bytebrand/fe-ui-core 4.1.23 → 4.1.25
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/AccordionWidget/AccordionWidget.tsx +1 -1
- package/source/components/Alternative/DealerInfo.tsx +17 -12
- package/source/components/OfferPanel/AboAccordion/AboAccordion.tsx +1 -1
- package/source/components/OfferPanel/OfferCheckboxGroup/CheckboxContainer.tsx +1 -1
- package/source/components/RateSearchWidget/RateSearchWidget.tsx +4 -4
- package/source/components/SearchFilters/common/FilterBlock/FilterBlock.styled.tsx +1 -1
- package/source/components/SearchFilters/common/FilterBlock/FilterBlock.tsx +24 -24
- package/source/components/SearchFilters/common/RangeControlled/RangeControlled.tsx +4 -5
- package/source/components/SearchFilters/filters/Consumption.tsx +2 -2
- package/source/components/SearchFilters/filters/Cost.tsx +30 -28
- package/source/components/SearchFilters/filters/EmissionSticker.tsx +14 -14
- package/source/components/SearchFilters/filters/FirstRegistration.tsx +2 -2
- package/source/components/SearchFilters/filters/ImagesCount.tsx +3 -3
- package/source/components/SearchFilters/filters/InteriorColor.tsx +2 -2
- package/source/components/SearchFilters/filters/InteriorMaterial.tsx +2 -2
- package/source/components/SearchFilters/filters/MakeModel.tsx +1 -2
- package/source/components/SearchFilters/filters/Mileage.tsx +3 -4
- package/source/components/SearchFilters/filters/Owners.tsx +0 -1
- package/source/components/SearchFilters/filters/Power.tsx +3 -6
- package/source/components/SearchFilters/filters/PriceDifference.tsx +4 -5
- package/source/components/SearchPage/ChipFilter/ChipFilter.tsx +1 -1
- package/source/components/SearchPage/Filters/MakeModel/MakeModel.tsx +3 -3
- package/source/components/SearchPageMobile/FiltersDetailed/BodyType.tsx +1 -1
- package/source/components/SearchPageMobile/FiltersDetailed/Consumption.tsx +1 -1
- package/source/components/SearchPageMobile/FiltersDetailed/Doors.tsx +4 -4
- package/source/components/SearchPageMobile/FiltersDetailed/FirstRegistration.tsx +1 -1
- package/source/components/SearchPageMobile/FiltersDetailed/Fuel.tsx +1 -1
- package/source/components/SearchPageMobile/FiltersDetailed/MakeModel.tsx +1 -2
- package/source/components/SearchPageMobile/FiltersDetailed/Mileage.tsx +2 -3
- package/source/components/SearchPageMobile/FiltersDetailed/Power.tsx +4 -4
- package/source/components/SearchPageMobile/FiltersDetailed/Price.tsx +3 -4
- package/source/components/SearchPageMobile/FiltersDetailed/Rate.tsx +2 -2
- package/source/components/SearchPageMobile/FiltersDetailed/Seats.tsx +2 -2
- package/source/components/SearchWidget/ColorWidget/BodyColorWidget.tsx +1 -1
- package/source/components/SearchWidget/EnvironmentWidget/EnvironmentWidget.tsx +5 -7
- package/source/components/SearchWidget/OfferDetalisWidget/OfferDetailsWidgetMobile.tsx +1 -1
- package/source/components/SearchWidget/StateWidget/StateWidget.tsx +10 -7
- package/source/components/SearchWidgetsMobile/BasicDataWidgetMobile/BasicDataWidgetMobile.tsx +7 -7
- package/source/components/SearchWidgetsMobile/EngineTransDriveWidget/EngineTransDriveWidget.tsx +4 -5
- package/source/components/SearchWidgetsMobile/EquipmentsWidget/EquipmentsWidget.styled.tsx +2 -2
- package/source/components/SearchWidgetsMobile/EquipmentsWidget/EquipmentsWidget.tsx +8 -9
- package/source/components/SearchWidgetsMobile/EquipmentsWidget/EquipmentsWidgetCategory.tsx +17 -17
- package/source/components/SearchWidgetsMobile/HighlightsWidgetMobile/HighlightsWidgetMobile.tsx +2 -2
- package/source/components/SearchWidgetsMobile/InteriorWidget/InteriorWidget.tsx +1 -1
- package/source/components/SearchWidgetsMobile/SafetyWidget/SafetyWidget.tsx +5 -5
- package/source/components/SearchWidgetsMobile/StateWidget/StateWidget.tsx +14 -11
- package/source/components/VehicleSmallCard/VehicleSmallCard.tsx +1 -1
- package/source/components/_common/Checkbox/FormCheckbox.tsx +1 -1
- package/source/components/_common/CheckboxMaterial/CheckboxMaterial.tsx +30 -27
- package/source/components/_common/Chip/Chip.tsx +1 -1
- package/source/components/_common/DropDown/DropDown.tsx +1 -2
- package/source/components/_common/ExpansionPanel/ExpansionPanel.styled.tsx +2 -9
- package/source/components/_common/IconSVG/IconSVGConfig.tsx +26 -2
- package/source/components/_common/IconSVG/SVG/common/AddressIcon.tsx +20 -0
- package/source/components/_common/IconSVG/SVG/common/DashboardIcon.tsx +20 -0
- package/source/components/_common/IconSVG/SVG/common/DealersIcon.tsx +20 -0
- package/source/components/_common/IconSVG/SVG/common/FavoritesIcon.tsx +20 -0
- package/source/components/_common/IconSVG/SVG/common/ImageSettingsIcon.tsx +20 -0
- package/source/components/_common/IconSVG/SVG/common/LogoutIcon.tsx +20 -0
- package/source/components/_common/IconSVG/SVG/common/MyVehiclesIcon.tsx +20 -0
- package/source/components/_common/IconSVG/SVG/common/SavedSearchsIcon.tsx +20 -0
- package/source/components/_common/IconSVG/SVG/common/SupportCallbackIcon.tsx +20 -0
- package/source/components/_common/IconSVG/SVG/common/UserProfileIcon.tsx +20 -0
- package/source/components/_common/IconSVG/SVG/settings/RemoveEye.tsx +1 -1
- package/source/components/_common/MaterialAccordion/MaterialAccordion.tsx +56 -56
- package/source/components/_common/MaterialAutocomplete/MaterialAutocomplete.styled.tsx +31 -31
- package/source/components/_common/MaterialAutocomplete/MaterialAutocomplete.tsx +26 -27
- package/source/components/_common/MaterialDatePicker/MaterialDatePicker.styled.tsx +7 -7
- package/source/components/_common/MaterialField/MaterialField.tsx +3 -3
- package/source/components/_common/MaterialSelect/MaterialSelect.styled.tsx +3 -3
- package/source/components/_common/MaterialSelect/MaterialSelect.tsx +34 -32
- package/source/components/_common/OfferRequestButtonWrapper/OfferRequestButtonWrapper.styled.tsx +3 -7
- package/source/components/_common/OfferRequestButtonWrapper/OfferRequestButtonWrapper.tsx +1 -2
- package/source/components/_common/Range/Range.tsx +1 -1
- package/source/components/_common/UserMenu/MenuItem.styled.tsx +11 -0
- package/source/components/_common/UserMenu/MenuItem.tsx +35 -0
- package/source/components/_common/UserMenu/UserMenu.story.js +60 -0
- package/source/components/_common/UserMenu/UserMenu.tsx +79 -0
- package/source/components/containers/SearchPage/FiltersContainer/FiltersContainer.tsx +7 -2
- package/source/framework/constants/app.ts +1 -1
- package/source/framework/constants/highlights.ts +1 -1
- package/source/framework/types/types.ts +1 -1
- package/source/framework/utils/CommonUtils.ts +27 -15
|
@@ -66,7 +66,7 @@ export const parkingAssistants = {
|
|
|
66
66
|
'selector_parkingAssistants_camera',
|
|
67
67
|
'selector_parkingAssistants_360Camera',
|
|
68
68
|
'selector_parkingAssistants_selfSteeringSystems',
|
|
69
|
-
'selector_parkingAssistants_other'
|
|
69
|
+
'selector_parkingAssistants_other'
|
|
70
70
|
],
|
|
71
71
|
endpointKey: 'assistants.parkingAssistants'
|
|
72
72
|
};
|
|
@@ -175,7 +175,7 @@ export interface IVehicleDetailedSidebarPriceProps {
|
|
|
175
175
|
isAlternative?: boolean;
|
|
176
176
|
// currentSalesPrice?: number;
|
|
177
177
|
originalSalesPrice?: number;
|
|
178
|
-
common: { isStrikeShown?: boolean, currentSalesPrice?: number }
|
|
178
|
+
common: { isStrikeShown?: boolean, currentSalesPrice?: number };
|
|
179
179
|
}
|
|
180
180
|
export interface ITabsProps {
|
|
181
181
|
t?: (key: string, options?: object) => string;
|
|
@@ -24,12 +24,18 @@ export const formatMileage = (millage: number | string) => {
|
|
|
24
24
|
export const getFormattedNumber = (num: number) => Number.isFinite(num) ? num.toLocaleString('de-DE') : null;
|
|
25
25
|
|
|
26
26
|
export const numberWithDot = (value: number | string) => {
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
27
|
+
switch (value) {
|
|
28
|
+
case 'any':
|
|
29
|
+
return value;
|
|
30
|
+
case 'beliebig':
|
|
31
|
+
return value;
|
|
32
|
+
default: return getFormattedNumber(+value);
|
|
31
33
|
}
|
|
32
|
-
|
|
34
|
+
// if (value === 'any' || value === 'beliebig') {
|
|
35
|
+
// return value;
|
|
36
|
+
// }
|
|
37
|
+
return getFormattedNumber(+value);
|
|
38
|
+
};
|
|
33
39
|
|
|
34
40
|
export const arrToObj = (arr: string[]): { [key: string]: boolean } => {
|
|
35
41
|
if (!Array.isArray(arr)) return {};
|
|
@@ -359,7 +365,10 @@ export const fixNumber = (num: number | string) => {
|
|
|
359
365
|
export const getOfferSliders = (financingConfig: any, t: (key: string, options?: object) => string, priceTabIndex: null | number, componentType: string) => {
|
|
360
366
|
const offerObj = offers[+priceTabIndex];
|
|
361
367
|
const offerConfig = financingConfig[offerObj.name];
|
|
362
|
-
const currentSalesPrice =
|
|
368
|
+
const currentSalesPrice =
|
|
369
|
+
financingConfig.common ?
|
|
370
|
+
financingConfig.common.currentSalesPrice :
|
|
371
|
+
financingConfig.currentSalesPrice; // TODO: fix deprecated. Correct is "financingConfig.common.currentSalesPrice"
|
|
363
372
|
return offerObj.sliders
|
|
364
373
|
.map((slider: any, index) => {
|
|
365
374
|
if (componentType === 'checkout' && index === 1 && priceTabIndex === 0) return; // remove checkout annual mileage for financing
|
|
@@ -393,7 +402,7 @@ export const getSupportedImageFormat = (IMAGE_URL: string, vehicleID: string, im
|
|
|
393
402
|
return webpFeature ? `${vehicleImageURL}/${size}-cached.webp` : `${vehicleImageURL}/${size}-cached.jpeg`;
|
|
394
403
|
};
|
|
395
404
|
|
|
396
|
-
export function getChipFilterValue
|
|
405
|
+
export function getChipFilterValue(chip: any, t: (key: string, options?: object) => string, language: string = 'de') {
|
|
397
406
|
let filterValue: string;
|
|
398
407
|
let title: string;
|
|
399
408
|
let from: string;
|
|
@@ -484,7 +493,7 @@ export function getChipFilterValue (chip: any, t: (key: string, options?: object
|
|
|
484
493
|
filterValue = t(`cbd:${chipFilterValue}`);
|
|
485
494
|
}
|
|
486
495
|
return filterValue;
|
|
487
|
-
}
|
|
496
|
+
}
|
|
488
497
|
|
|
489
498
|
function getUtmQueryParameter() {
|
|
490
499
|
const query = window.location.search;
|
|
@@ -493,15 +502,18 @@ function getUtmQueryParameter() {
|
|
|
493
502
|
|
|
494
503
|
const queryString = /^[?]/.test(query) ? query.slice(1) : query;
|
|
495
504
|
|
|
496
|
-
const result = queryString.split('&').reduce(
|
|
497
|
-
|
|
505
|
+
const result = queryString.split('&').reduce(
|
|
506
|
+
(params: any, param: string) => {
|
|
507
|
+
const [key, value] = param.split('=');
|
|
498
508
|
|
|
499
|
-
|
|
509
|
+
if (!/^source|^campaign|^medium|^content|^term|^reference|^gclid|^adgroupid|^keyword/.test(key)) { return params; }
|
|
500
510
|
|
|
501
|
-
|
|
511
|
+
params[key] = value ? decodeURIComponent(value.replace(/\+/g, ' ')) : '';
|
|
502
512
|
|
|
503
|
-
|
|
504
|
-
|
|
513
|
+
return params;
|
|
514
|
+
},
|
|
515
|
+
{}
|
|
516
|
+
); // eslint-disable-line indent,@typescript-eslint/indent
|
|
505
517
|
|
|
506
518
|
return result;
|
|
507
519
|
}
|
|
@@ -517,4 +529,4 @@ export function setUtmParameters() {
|
|
|
517
529
|
expiresDate.setDate(expiresDate.getDate() + 1);
|
|
518
530
|
|
|
519
531
|
document.cookie = `marketing=${JSON.stringify(marketing)};expires=${expiresDate};domain=.${config.DOMAIN};path=/`;
|
|
520
|
-
}
|
|
532
|
+
}
|