@bytebrand/fe-ui-core 4.8.52 → 4.8.54

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.
Files changed (194) hide show
  1. package/media/locales/de/promoSlider.json +0 -1
  2. package/media/locales/en/promoSlider.json +0 -1
  3. package/package.json +120 -117
  4. package/source/components/AccordionWidget/AccordionWidget.styl +0 -1
  5. package/source/components/AccordionWidget/AccordionWidget.tsx +4 -8
  6. package/source/components/OfferPanel/OfferCheckboxGroup/CheckboxContainer.tsx +2 -2
  7. package/source/components/OfferPanel/OfferCheckboxGroup/OfferCheckboxGroup.styl +0 -24
  8. package/source/components/OfferPanel/OfferCheckboxGroup/OfferCheckboxGroup.tsx +1 -1
  9. package/source/components/OfferPanel/OfferPanel.tsx +1 -1
  10. package/source/components/VehicleDetailedSidebar/VehicleDetailedSidebar.tsx +11 -23
  11. package/source/components/VehicleDetailedSlider/VehicleDetailedSlider.tsx +0 -2
  12. package/source/components/VehicleDetailedSlider/partials/PriceData.tsx +4 -7
  13. package/source/components/VehicleSmallCard/VehicleData/VechiclePriceItem/VechiclePriceItem.styl +0 -5
  14. package/source/components/VehicleSmallCard/VehicleData/VechiclePriceItem/VechiclePriceItem.tsx +1 -3
  15. package/source/components/VehicleSmallCard/VehicleData/VehicleInfo/VehicleInfo.styl +1 -1
  16. package/source/components/VehicleSmallCard/VehicleData/VehicleInfo/VehicleInfo.tsx +11 -24
  17. package/source/components/VehicleSmallCard/VehicleData/VehiclePrice/VehiclePrice.styl +2 -3
  18. package/source/components/VehicleSmallCard/VehicleData/VehicleProperty/VehicleProperty.styl +1 -4
  19. package/source/components/VehicleSmallCard/VehicleData/VehicleProperty/VehicleProperty.tsx +2 -3
  20. package/source/components/VehicleSmallCard/VehicleData/VehicleTitle/VehicleTitle.tsx +1 -1
  21. package/source/components/VehicleSmallCard/VehicleSmallCard.tsx +3 -14
  22. package/source/components/_common/MaterialAccordionGroup/MaterialAccordionGroup.styled.tsx +1 -4
  23. package/source/components/_common/MaterialTooltip/MaterialTooltip.tsx +3 -4
  24. package/source/components/_common/withStats/withStats.styl +0 -10
  25. package/source/components/_common/withStats/withStats.tsx +12 -3
  26. package/source/framework/DataTransformers.ts +0 -1
  27. package/source/framework/constants/common.ts +4 -8
  28. package/source/framework/types/types.ts +0 -1
  29. package/source/framework/vehiclesProps/decoratedLightProps.tsx +12 -48
  30. package/source/framework/vehiclesProps/decoratedProps.tsx +8 -35
  31. package/source/locales/data.ts +0 -3
  32. package/.husky/pre-push +0 -4
  33. package/.storybook/addons.js +0 -4
  34. package/.storybook/config.js +0 -64
  35. package/.storybook/postcss.config.js +0 -6
  36. package/.storybook/preview-head.html +0 -10
  37. package/.storybook/webpack.config.js +0 -130
  38. package/__tests__/components/Checkout/OrderOverviewItem/OrderOverviewItem.test.tsx +0 -42
  39. package/__tests__/components/Checkout/PaymentTypeCard/PaymentTypeCard.test.tsx +0 -50
  40. package/__tests__/components/Checkout/RadioGroup.test.tsx +0 -95
  41. package/__tests__/components/Checkout/ServiceCardWrapper.test.tsx +0 -53
  42. package/__tests__/components/Checkout/Switcher.test.tsx +0 -43
  43. package/__tests__/components/UserDasboardPage/sections/CheckoutSection/CheckoutSection.test.tsx +0 -613
  44. package/__tests__/components/UserDasboardPage/sections/FavoriteSection/FavoriteSection.test.tsx +0 -335
  45. package/__tests__/components/UserDasboardPage/sections/OrderStatusSection/AdditionalOrderInfo.test.tsx +0 -127
  46. package/__tests__/components/UserDasboardPage/sections/OrderStatusSection/OrderStatusCar.test.tsx +0 -58
  47. package/__tests__/components/UserDasboardPage/sections/OrderStatusSection/OrderStatusCard.test.tsx +0 -74
  48. package/__tests__/components/UserDasboardPage/sections/OrderStatusSection/OrderStatusSection.test.tsx +0 -62
  49. package/__tests__/components/UserDasboardPage/sections/RequestedCarsSection/RequestedCarsSection.test.tsx +0 -117
  50. package/__tests__/components/Vehicle/VehicleFormattedPrice/VehicleFormattedPrice.test.tsx +0 -58
  51. package/__tests__/components/VehicleSmallCard/VehicleInfo.test.tsx +0 -88
  52. package/__tests__/components/VehicleSmallCard/VehicleTitle.test.tsx +0 -91
  53. package/__tests__/components/_common/Badge/Badge.test.tsx +0 -15
  54. package/__tests__/components/_common/IconSVG/IconSVG.test.tsx +0 -23
  55. package/__tests__/components/_common/Image/Image.test.tsx +0 -82
  56. package/__tests__/components/_common/MaterialAutocomplete/MaterialAutocomplete.test.tsx +0 -49
  57. package/__tests__/components/_common/MaterialDatePicker/MaterialDatePicker.test.tsx +0 -54
  58. package/__tests__/components/_common/MaterialField/MaterialField.test.tsx +0 -58
  59. package/__tests__/components/_common/StarButton/StarButton.test.tsx +0 -46
  60. package/__tests__/mockedData/financingConfig.js +0 -202
  61. package/__tests__/mockedData/mockedPendingRequestedCar.js +0 -69
  62. package/__tests__/utils/CommonUtils/addPrefixToKeys.test.ts +0 -18
  63. package/__tests__/utils/CommonUtils/arrToObj.test.js +0 -32
  64. package/__tests__/utils/CommonUtils/checkRangeValuesOnEqual.test.ts +0 -17
  65. package/__tests__/utils/CommonUtils/fixNumber.test.ts +0 -20
  66. package/__tests__/utils/CommonUtils/formatMileage.test.ts +0 -8
  67. package/__tests__/utils/CommonUtils/getChipFilterValue.test.ts +0 -22
  68. package/__tests__/utils/CommonUtils/getFormattedNumber.test.ts +0 -19
  69. package/__tests__/utils/CommonUtils/getFormattedPrice.test.ts +0 -19
  70. package/__tests__/utils/CommonUtils/getGroupValuesForQuery.test.ts +0 -51
  71. package/__tests__/utils/CommonUtils/getOfferSliders.test.ts +0 -64
  72. package/__tests__/utils/CommonUtils/getPriceRating.test.ts +0 -26
  73. package/__tests__/utils/CommonUtils/getPriceRatingConfig.test.ts +0 -33
  74. package/__tests__/utils/CommonUtils/preloadNearbyImages.test.ts +0 -9
  75. package/__tests__/utils/CommonUtils/sliceLessThan.test.ts +0 -23
  76. package/__tests__/utils/CommonUtils/sliceMoreThan.test.ts +0 -23
  77. package/source/components/AdvantageItem/AdvantageItem.story.js +0 -23
  78. package/source/components/Alternative/Dealer.story.js +0 -32
  79. package/source/components/Alternative/Dealer.story.styl +0 -3
  80. package/source/components/Breadcrumbs/Breadcrumbs.story.js +0 -40
  81. package/source/components/Breadcrumbs/FirstInfoBlock/FirstInfoBlock.story.js +0 -45
  82. package/source/components/Checkout/OrderOverviewItem/OrderOverviewItem.story.js +0 -243
  83. package/source/components/Checkout/OrderOverviewItem/OrderOverviewItem.story.styl +0 -21
  84. package/source/components/Checkout/RadioCards/RadioGroupCheckout.story.js +0 -105
  85. package/source/components/Checkout/RadioCards/RadioGroupCheckout.story.styl +0 -37
  86. package/source/components/Checkout/Switcher/Switcher.story.js +0 -41
  87. package/source/components/Checkout/Switcher/Switcher.story.styl +0 -2
  88. package/source/components/CompactSearchWidget/CompactSearchWidget.story.js +0 -187
  89. package/source/components/ContactForm/ContactForm.story.js +0 -94
  90. package/source/components/ContactForm/ContactForm.story.styl +0 -0
  91. package/source/components/ContactInfo/ContactInfo.story.js +0 -58
  92. package/source/components/CustomerQuote/CustomerQuote.story.js +0 -41
  93. package/source/components/CustomerQuotesSlider/CustomerQuotesSlider.story.js +0 -73
  94. package/source/components/CustomerQuotesSlider/CustomerQuotesSlider.story.styl +0 -5
  95. package/source/components/FormattedNumber/FormattedNumber.story.js +0 -114
  96. package/source/components/InfoBlocks/InfoBlockWrapper.story.js +0 -101
  97. package/source/components/InfoBlocks/InfoBlockWrapper.story.styl +0 -46
  98. package/source/components/OfferPanel/AboAccordion/AboFaq/AboFaq.story.js +0 -97
  99. package/source/components/OfferPanel/OfferPanel.story.js +0 -139
  100. package/source/components/OfferPanel/RangeGroup/RangeGroup.story.js +0 -35
  101. package/source/components/OfferPanel/RangeGroup/RangeGroup.story.styl +0 -3
  102. package/source/components/PriceRating/PriceRating.story.js +0 -39
  103. package/source/components/PriceRating/PriceRating.story.styl +0 -2
  104. package/source/components/PriceRatingDetailed/PriceRatingDetailed.story.js +0 -78
  105. package/source/components/PriceRatingDetailed/PriceRatingDetailed.story.styl +0 -11
  106. package/source/components/RateSearchValue/RateSearchValue.story.js +0 -78
  107. package/source/components/RateSearchValue/RateSearchValue.story.styl +0 -2
  108. package/source/components/RateSearchWidget/RateSearchWidget.story.js +0 -57
  109. package/source/components/RateSearchWidget/RateSearchWidget.story.styl +0 -12
  110. package/source/components/SearchFilters/FiltersFactory.story.js +0 -273
  111. package/source/components/SearchPage/Filters/MakeModel/MakeModel.story.js +0 -12
  112. package/source/components/SearchWidget/BasicDataWidget/BasicDataWidget.story.js +0 -834
  113. package/source/components/SearchWidget/BasicDataWidget/BasicDataWidget.story.styl +0 -40
  114. package/source/components/SearchWidget/SearchWidget.story.js +0 -191
  115. package/source/components/SearchWidget/SearchWidget.story.styl +0 -6
  116. package/source/components/Stepper/Stepper.story.js +0 -119
  117. package/source/components/Stepper/Stepper.story.styl +0 -41
  118. package/source/components/Theme.story.js +0 -36
  119. package/source/components/Theme.story.styl +0 -85
  120. package/source/components/TickerText/TickerText.story.js +0 -17
  121. package/source/components/UserDashboardPage/sections/OrderStatusSection/OrderStatusSection.story.js +0 -95
  122. package/source/components/UserDashboardPage/sections/RequestedCarsSection/RequestedCarsSection.story.js +0 -97
  123. package/source/components/Vehicle/VehicleConsumption/VehicleConsumption.story.js +0 -31
  124. package/source/components/Vehicle/VehicleFormattedPrice/VehicleFormattedPrice.story.js +0 -247
  125. package/source/components/VehicleCompared/CompareGeneral/CompareGeneral.story.js +0 -30
  126. package/source/components/VehicleCompared/ComparePrice/ComparePrice.story.js +0 -18
  127. package/source/components/VehicleCompared/CompareTitle/CompareTitle.story.js +0 -19
  128. package/source/components/VehicleDetailedSidebar/VehicleDetailedSidebar.story.js +0 -44
  129. package/source/components/VehicleDetailedSlider/VehicleDetailedSlider.story.js +0 -120
  130. package/source/components/VehiclePromoSlider/VehiclePromoInfo/VehiclePromoInfo.story.js +0 -42
  131. package/source/components/VehiclePromoSlider/VehiclePromoSlide/VehiclePromoSlide.story.js +0 -62
  132. package/source/components/VehiclePromoSlider/VehiclePromoSlider.story.js +0 -42
  133. package/source/components/VehicleSmallCard/VehicleSmallCard.story.js +0 -412
  134. package/source/components/VehicleSmallCard/VehicleSmallCard.story.styl +0 -56
  135. package/source/components/VehicleSmallCardForDealerships/VehicleSmallCardForDealerships.story.js +0 -199
  136. package/source/components/VehicleSmallCardForDealerships/VehicleSmallCardForDealerships.story.styl +0 -40
  137. package/source/components/_common/Accordion/Accordion.story.js +0 -36
  138. package/source/components/_common/Badge/Badge.story.js +0 -27
  139. package/source/components/_common/Badge/Badge.story.styl +0 -5
  140. package/source/components/_common/Bubble/Bubble.story.js +0 -52
  141. package/source/components/_common/Button/Button.story.js +0 -52
  142. package/source/components/_common/Button/Button.story.styl +0 -5
  143. package/source/components/_common/ButtonOld/Button.story.js +0 -54
  144. package/source/components/_common/ButtonOld/Button.story.styl +0 -5
  145. package/source/components/_common/Checkbox/Checkbox.story.js +0 -85
  146. package/source/components/_common/Checkbox/Checkbox.story.styl +0 -14
  147. package/source/components/_common/CheckboxMaterial/CheckboxMaterial.story.js +0 -126
  148. package/source/components/_common/CheckboxMaterial/CheckboxMaterial.story.styl +0 -14
  149. package/source/components/_common/Chip/Chip.story.js +0 -43
  150. package/source/components/_common/ChipList/ChipList.story.js +0 -36
  151. package/source/components/_common/DropDown/DropDown.story.js +0 -35
  152. package/source/components/_common/ExpandablePanel/ExpandablePanel.story.js +0 -41
  153. package/source/components/_common/Histogram/Histogram.story.js +0 -51
  154. package/source/components/_common/IconSVG/IconSVG.story.js +0 -21
  155. package/source/components/_common/IconSVG/IconSVG.story.styl +0 -25
  156. package/source/components/_common/Image/Image.story.js +0 -142
  157. package/source/components/_common/Image/Image.story.styl +0 -18
  158. package/source/components/_common/ImagesSet/ImagesSet.story.js +0 -34
  159. package/source/components/_common/ImagesSet/ImagesSet.story.styl +0 -4
  160. package/source/components/_common/Loader/Loader.story.js +0 -21
  161. package/source/components/_common/MaterialAccordionGroup/MaterialAccordionGroup.story.js +0 -49
  162. package/source/components/_common/MaterialDatePicker/MaterialDatePicker.story.js +0 -45
  163. package/source/components/_common/MaterialDatePicker/MaterialDatePicker.story.styl +0 -6
  164. package/source/components/_common/MaterialField/MaterialField.story.js +0 -87
  165. package/source/components/_common/MaterialField/MaterialField.story.styl +0 -34
  166. package/source/components/_common/MaterialSelect/MaterialSelect.story.js +0 -52
  167. package/source/components/_common/MaterialSelect/MaterialSelect.story.styl +0 -6
  168. package/source/components/_common/MaterialStepButton/MaterialStepButton.story.js +0 -47
  169. package/source/components/_common/MaterialStepButton/MaterialStepButton.story.styl +0 -6
  170. package/source/components/_common/MaterialSwitch/MaterialSwitch.story.js +0 -17
  171. package/source/components/_common/MaterialTooltip/MaterialTooltip.story.js +0 -10
  172. package/source/components/_common/Modal/Modal.story.js +0 -37
  173. package/source/components/_common/MuiGroupedSelect/MuiGroupedSelect.story.js +0 -21
  174. package/source/components/_common/PropertySelector/PSGroup.story.js +0 -93
  175. package/source/components/_common/PropertySelector/PSGroup.story.styl +0 -25
  176. package/source/components/_common/PropertySelector/ProperySelector.story.js +0 -83
  177. package/source/components/_common/Radio/FormRadioGroup.story.js +0 -28
  178. package/source/components/_common/Radio/FormRadioGroup.story.styl +0 -2
  179. package/source/components/_common/Radio/Radio.story.js +0 -54
  180. package/source/components/_common/Radio/RadioGroup.story.js +0 -90
  181. package/source/components/_common/Radio/RadioGroup.story.styl +0 -39
  182. package/source/components/_common/Range/Range.story.js +0 -46
  183. package/source/components/_common/Range/Range.story.styl +0 -5
  184. package/source/components/_common/SliderArrow/SliderArrow.story.js +0 -18
  185. package/source/components/_common/Tabs/Tabs.story.js +0 -56
  186. package/source/components/_common/TimePicker/TimePicker.story.js +0 -37
  187. package/source/components/_common/Tooltip/Tooltip.story.js +0 -28
  188. package/source/components/_common/UserMenu/MaterialMenu.story.js +0 -73
  189. package/source/components/_common/VehicleSlider/VehicleSlider.story.js +0 -99
  190. package/source/components/_common/VehicleSlider/VehicleSlider.story.styl +0 -0
  191. package/source/components/_common/withLabel/withLabel.story.js +0 -62
  192. package/source/components/_common/withPopover/withPopover.story.js +0 -48
  193. package/source/components/_common/withPopover/withPopover.story.styl +0 -54
  194. package/source/components/_common/withStats/withStats.story.js +0 -75
@@ -12,7 +12,6 @@ import VehicleTitle from './VehicleData/VehicleTitle/VehicleTitle';
12
12
  import SeoText from './SeoText/SeoText';
13
13
  import VehicleInfo from './VehicleData/VehicleInfo/VehicleInfo';
14
14
  import VehiclePrice from './VehicleData/VehiclePrice/VehiclePrice';
15
- import { PLACEHOLDER_IMAGE_SMALL_URL } from '../../framework/constants/common';
16
15
  import {
17
16
  IVehicleInfo,
18
17
  IPrice,
@@ -282,12 +281,7 @@ const VehicleSmallCard: FunctionComponent<IVehicleSmallCardProps> = (props) => {
282
281
  target,
283
282
  rel,
284
283
  className: `${styles.redirectClassLink} ${styles.gridAreaTitle}`,
285
- onClick: () => localStorage.setItem(
286
- 'activeTabCDP',
287
- _get(price, 'leasing.isActive', false)
288
- ? t('vehicleProps:title.leasing')
289
- : t('vehicleProps:title.financing')
290
- ),
284
+ onClick: () => localStorage.setItem('activeTabCDP', t('vehicleProps:title.financing')),
291
285
  href: url
292
286
  })}
293
287
 
@@ -340,12 +334,7 @@ const VehicleSmallCard: FunctionComponent<IVehicleSmallCardProps> = (props) => {
340
334
  target,
341
335
  rel,
342
336
  className: `${styles.redirectClassLink} ${styles.gridAreaImage}`,
343
- onClick: () => localStorage.setItem(
344
- 'activeTabCDP',
345
- _get(price, 'leasing.isActive', false)
346
- ? t('vehicleProps:title.leasing')
347
- : t('vehicleProps:title.financing')
348
- ),
337
+ onClick: () => localStorage.setItem('activeTabCDP', t('vehicleProps:title.financing')),
349
338
  href: url
350
339
  })}
351
340
  <VehicleInfo {...vehicleInfoProps} />
@@ -377,7 +366,7 @@ VehicleSmallCard.defaultProps = {
377
366
  baseUrl: '',
378
367
  typeAlternative: '',
379
368
  offerSource: '',
380
- src: PLACEHOLDER_IMAGE_SMALL_URL,
369
+ src: 'https://images.auto.de/noimage/small',
381
370
  environmentEmissions: null,
382
371
  language: 'en',
383
372
  consumption: null,
@@ -1,7 +1,4 @@
1
- import { styled as muiStyled, createTheme } from '@mui/material/styles';
2
-
3
- // Cast to any to bypass MUI 5.9 styled() overload mismatch with strict TS in consumers (fe-landing).
4
- const styled: any = muiStyled;
1
+ import { styled, createTheme } from '@mui/material/styles';
5
2
 
6
3
  export const AccordionSummaryContent = styled('div')({
7
4
  display: 'flex',
@@ -7,13 +7,12 @@ import ClickAwayListener from '@mui/material/ClickAwayListener';
7
7
  import { debounce } from 'lodash';
8
8
 
9
9
  interface IMaterialTooltip {
10
- text: React.ReactNode;
10
+ text: string;
11
11
  icon?: string;
12
12
  className?: string;
13
13
  placement?: 'bottom-end' | 'bottom-start' | 'bottom' | 'left-end' | 'left-start' | 'left' | 'right-end' | 'right-start' | 'right' | 'top-end' | 'top-start' | 'top';
14
14
  disabled?: Boolean;
15
15
  zindex?: number;
16
- disablePortal?: boolean;
17
16
  }
18
17
 
19
18
  const LightTooltip = styled(({ className, ...props }: TooltipProps) => (
@@ -33,7 +32,7 @@ const LightTooltip = styled(({ className, ...props }: TooltipProps) => (
33
32
  }
34
33
  }));
35
34
 
36
- const MaterialTooltip = ({ text, placement, className, disabled, zindex, disablePortal = true }: IMaterialTooltip) => {
35
+ const MaterialTooltip = ({ text, placement, className, disabled, zindex }: IMaterialTooltip) => {
37
36
  const [isOpen, setIsOpen] = useState(false);
38
37
 
39
38
  const onHandleMenuOpen = (event: any) => {
@@ -72,7 +71,7 @@ const MaterialTooltip = ({ text, placement, className, disabled, zindex, disable
72
71
  className={className}
73
72
  zindex={zindex}
74
73
  PopperProps={{
75
- disablePortal
74
+ disablePortal: true
76
75
  }}
77
76
  >
78
77
  <IconButton>
@@ -150,20 +150,10 @@ $indent = 10px
150
150
  height: 18px
151
151
  font-size: 10px
152
152
  min-width: 30px
153
- .badgeFull
154
- display: none
155
- .badgeShort
156
- display: inline
157
153
 
158
154
  .badgeItem
159
155
  // hook class for compact-mode overrides
160
156
 
161
- .badgeFull
162
- display: inline
163
-
164
- .badgeShort
165
- display: none
166
-
167
157
  .priceDifferencePerCent
168
158
  margin-left: auto;
169
159
 
@@ -57,6 +57,16 @@ const withStats = (WrappedComponent: any) => ({
57
57
  ...props
58
58
  }: IStatsWrapperProps) => {
59
59
  const [activeSlide, setActiveSlide] = React.useState<number>(0);
60
+ const [isWideScreen, setIsWideScreen] = React.useState<boolean>(
61
+ typeof window !== 'undefined' ? window.matchMedia('(min-width: 992px)').matches : false
62
+ );
63
+
64
+ React.useEffect(() => {
65
+ const mq = window.matchMedia('(min-width: 992px)');
66
+ const handler = (e: MediaQueryListEvent) => setIsWideScreen(e.matches);
67
+ mq.addEventListener('change', handler);
68
+ return () => mq.removeEventListener('change', handler);
69
+ }, []);
60
70
 
61
71
  const MIN_PERCENT = 5;
62
72
  const MIN_PRICE_DIFFERENCE = 500;
@@ -161,9 +171,8 @@ const withStats = (WrappedComponent: any) => ({
161
171
  </Badge>
162
172
  )}
163
173
  {showDownPayment && (
164
- <Badge type='blue' className={styles.badgeItem}>
165
- <span className={styles.badgeFull}>{downPaymentText}</span>
166
- <span className={styles.badgeShort}>{downPaymentShortText}</span>
174
+ <Badge type='lightBlue' className={styles.badgeItem}>
175
+ {allFourActive && isWideScreen ? downPaymentShortText : downPaymentText}
167
176
  </Badge>
168
177
  )}
169
178
  {!!historyPriceDifferencePerCent && historyPriceDifferencePerCent >= MIN_PERCENT && (
@@ -69,7 +69,6 @@ export const transformDataForDecoratedCar = (car: any) => {
69
69
  bootCapacity: _get(car, 'sizeVolumeWeight.cargoCapacity', null),
70
70
  capacityLoad: _get(car, 'sizeVolumeWeight.completeCapacity', null),
71
71
  wltpCo2: _get(car, 'environmentEmissions.wltpCo2', null),
72
- wltpEnergyEfficiencyClass: _get(car, 'environmentEmissions.wltpEnergyEfficiencyClass', null),
73
72
  pluginHybrid: _get(car, 'engineData.pluginHybrid', null),
74
73
  wltpCombined: _get(car, 'consumption.wltpCombined', null),
75
74
  wltpPowerCombined: _get(car, 'consumption.wltpPowerCombined', null),
@@ -1,12 +1,8 @@
1
- const _rawHost = typeof window !== 'undefined' ? window.location.host.replace('www.', '') : 'auto.de';
2
- const _isIP = /^\d+\.\d+\.\d+\.\d+(:\d+)?$/.test(_rawHost);
3
- const _imgBase = _isIP ? 'https://images.auto.de' : 'https://images.' + _rawHost;
1
+ export const SITE_DOMAIN: string = 'https://www.auto.de';
4
2
 
5
- export const SITE_DOMAIN: string = typeof window !== 'undefined' ? 'https://' + window.location.host : 'https://www.auto.de';
6
-
7
- export const PLACEHOLDER_IMAGE: string = _imgBase + '/noimage/';
8
- export const PLACEHOLDER_IMAGE_SMALL_URL: string = _imgBase + '/noimage/small';
9
- export const PLACEHOLDER_IMAGE_LARGE_URL: string = _imgBase + '/noimage/large';
3
+ export const PLACEHOLDER_IMAGE: string = 'https://images.auto.de/noimage/';
4
+ export const PLACEHOLDER_IMAGE_SMALL_URL: string = `https://images.auto.de/noimage/noimage/small`;
5
+ export const PLACEHOLDER_IMAGE_LARGE_URL: string = `https://images.auto.de/noimage/noimage/large`;
10
6
 
11
7
  export const QUOTES_SLIDES_TO_SHOW_DEFAULT = 3;
12
8
 
@@ -115,7 +115,6 @@ export interface IVehicleInfo {
115
115
  url?: string;
116
116
  target?: string;
117
117
  rel?: string;
118
- leasing?: ILeasing;
119
118
  }
120
119
 
121
120
  export interface IVehicleTitleProps {
@@ -124,10 +124,6 @@ const getDecoratedLightProps = (
124
124
  const wltpConsumptionCombined = car.consumption.wltpCombined;
125
125
  const wltpCo2 = car.environmentEmissions.wltpCo2;
126
126
  const consumptionPowerCombined = car.consumption.consumptionCombined;
127
- const wltpEnergyEfficiencyClass = car.environmentEmissions.wltpEnergyEfficiencyClass;
128
- const co2ClassValue = isPropDefined(wltpEnergyEfficiencyClass)
129
- ? t('vehicleProps:value.co2Class', { class: t(`cbd:${wltpEnergyEfficiencyClass}`) })
130
- : null;
131
127
 
132
128
  const co2 = car.environmentEmissions.co2;
133
129
 
@@ -147,9 +143,7 @@ const getDecoratedLightProps = (
147
143
  ? t('vehicleProps:value.consumptionCombined', { consumption: consumptionCombined.toLocaleString(language), unit: translatedUnit })
148
144
  : t('vehicleProps:value.na');
149
145
 
150
- const consumptionPowerCombinedContent = Number.isFinite(consumptionPowerCombined)
151
- ? t('vehicleProps:value.consumptionPowerCombined', { consumption: consumptionPowerCombined.toLocaleString(language), unit: translatedUnit })
152
- : null;
146
+ const consumptionPowerCombinedContent = t('vehicleProps:value.consumptionPowerCombined', { consumption: consumptionPowerCombined.toLocaleString(language), unit: translatedUnit });
153
147
 
154
148
  const co2Value = Number.isFinite(co2)
155
149
  ? t('vehicleProps:value.co2Combined', { co2: co2.toLocaleString(language) })
@@ -168,24 +162,22 @@ const getDecoratedLightProps = (
168
162
  {`${wltpWeightedPowerCombinedContent}, `}
169
163
  {`${wltpWeightedCombinedContent}, `}
170
164
  {wltpCo2PluginValue}
171
- {co2ClassValue && <>, {co2ClassValue}</>}
172
165
  </React.Fragment>
173
166
  }
174
167
 
175
168
  return Number.isFinite(consumptionCombined) || Number.isFinite(consumptionPowerCombined)
176
169
  ? <React.Fragment>
177
170
  {consumptionPowerCombined ? consumptionPowerCombinedContent : t('vehicleProps:value.na')} <br />{consumptionValue} <br /> {co2Value}
178
- {co2ClassValue && <>, {co2ClassValue}</>}
179
171
  </React.Fragment>
180
172
  : t('vehicleProps:value.na');
181
173
 
182
174
  }
183
175
 
184
176
  if (wltpConsumptionValue && wltpCo2Value) {
185
- return <>{wltpConsumptionValue}, {wltpCo2Value}{co2ClassValue && <>, {co2ClassValue}</>}</>;
177
+ return <>{wltpConsumptionValue}, {wltpCo2Value}</>;
186
178
  }
187
179
 
188
- return <>{consumptionValue} <br /> {co2Value}{co2ClassValue && <>, {co2ClassValue}</>}</>;
180
+ return <>{consumptionValue} <br /> {co2Value}</>;
189
181
  }
190
182
  },
191
183
  consumptionPowerCombinedAlternateView: {
@@ -199,10 +191,6 @@ const getDecoratedLightProps = (
199
191
  const co2 = car.environmentEmissions.co2;
200
192
  const wltpConsumptionPowerCombined = car.consumption.wltpPowerCombined;
201
193
  const wltpCo2 = car.environmentEmissions.wltpCo2;
202
- const wltpEnergyEfficiencyClass = car.environmentEmissions.wltpEnergyEfficiencyClass;
203
- const co2ClassValue = isPropDefined(wltpEnergyEfficiencyClass)
204
- ? t('vehicleProps:value.co2Class', { class: t(`cbd:${wltpEnergyEfficiencyClass}`) })
205
- : null;
206
194
 
207
195
  const wltpConsumptionValue = Number.isFinite(wltpConsumptionPowerCombined)
208
196
  ? t('vehicleProps:value.wltpPowerCombined', { consumption: wltpConsumptionPowerCombined.toLocaleString(language), unit: translatedUnit })
@@ -221,10 +209,10 @@ const getDecoratedLightProps = (
221
209
  : t('vehicleProps:value.na');
222
210
 
223
211
  if (wltpConsumptionValue && wltpCo2Value) {
224
- return <>{wltpConsumptionValue}, {wltpCo2Value}{co2ClassValue && <>, {co2ClassValue}</>}</>;
212
+ return <>{wltpConsumptionValue}, {wltpCo2Value}</>;
225
213
  }
226
214
 
227
- return <>{consumptionValue} <br /> {co2Value} {co2ClassValue && <>, {co2ClassValue}</>}</>;
215
+ return <>{consumptionValue} <br /> {co2Value} </>;
228
216
  }
229
217
  },
230
218
 
@@ -245,12 +233,8 @@ const getDecoratedLightProps = (
245
233
 
246
234
  const consumptionPowerCombinedContent = t('vehicleProps:value.consumptionPowerCombined', { consumption: consumptionPowerCombined.toLocaleString(language), unit: translatedUnit });
247
235
  const consumptionCombinedContent = t('vehicleProps:value.consumptionCombined', { consumption: consumptionCombined.toLocaleString(language), unit: translatedUnit });
248
- const wltpWeightedPowerCombinedContent = Number.isFinite(wltpWeightedPowerCombined)
249
- ? t('vehicleProps:value.wltpWeightedPowerCombined', { consumption: wltpWeightedPowerCombined.toLocaleString(language), unit: translatedUnit })
250
- : null;
251
- const wltpWeightedCombinedContent = Number.isFinite(wltpWeightedCombined)
252
- ? t('vehicleProps:value.wltpWeightedCombined', { consumption: wltpWeightedCombined.toLocaleString(language), unit: translatedUnit })
253
- : null;
236
+ const wltpWeightedPowerCombinedContent = t('vehicleProps:value.wltpWeightedPowerCombined', { consumption: wltpWeightedPowerCombined.toLocaleString(language), unit: translatedUnit });
237
+ const wltpWeightedCombinedContent = t('vehicleProps:value.wltpWeightedCombined', { consumption: wltpWeightedCombined.toLocaleString(language), unit: translatedUnit });
254
238
  const wltpConsumptionPowerCombinedContent = wltpConsumptionPowerCombined
255
239
  ? t('vehicleProps:value.wltpPowerCombined', { consumption: wltpConsumptionPowerCombined.toLocaleString(language), unit: translatedUnit })
256
240
  : null;
@@ -261,10 +245,6 @@ const getDecoratedLightProps = (
261
245
 
262
246
  const co2 = car.environmentEmissions.co2;
263
247
  const wltpCo2 = car.environmentEmissions.wltpCo2;
264
- const wltpEnergyEfficiencyClass = car.environmentEmissions.wltpEnergyEfficiencyClass;
265
- const co2ClassValue = isPropDefined(wltpEnergyEfficiencyClass)
266
- ? t('vehicleProps:value.co2Class', { class: t(`cbd:${wltpEnergyEfficiencyClass}`) })
267
- : null;
268
248
 
269
249
  const co2Value = Number.isFinite(co2)
270
250
  ? t('vehicleProps:value.co2Combined', { co2: co2.toLocaleString(language) })
@@ -286,7 +266,6 @@ const getDecoratedLightProps = (
286
266
  {`${wltpWeightedPowerCombinedContent}, `}
287
267
  {`${wltpWeightedCombinedContent}, `}
288
268
  {wltpCo2PluginValue}
289
- {co2ClassValue && <>, {co2ClassValue}</>}
290
269
  </React.Fragment>
291
270
  }
292
271
  }
@@ -296,14 +275,12 @@ const getDecoratedLightProps = (
296
275
  {`${wltpConsumptionPowerCombinedContent}, `}
297
276
  {`${wltpWeightedCombinedContent}, `}
298
277
  {wltpCo2PluginValue}
299
- {co2ClassValue && <>, {co2ClassValue}</>}
300
278
  </React.Fragment>
301
279
  }
302
280
 
303
281
  return Number.isFinite(consumptionCombined) || Number.isFinite(consumptionPowerCombined)
304
282
  ? <React.Fragment>
305
283
  {consumptionPowerCombined ? consumptionPowerCombinedContent : t('vehicleProps:value.na')} <br />{consumptionCombinedContent} <br /> {co2Value}
306
- {co2ClassValue && <>, {co2ClassValue}</>}
307
284
  </React.Fragment>
308
285
  : t('vehicleProps:value.na');
309
286
  }
@@ -320,10 +297,6 @@ const getDecoratedLightProps = (
320
297
  const co2 = car.environmentEmissions.co2;
321
298
  const wltpConsumptionCombined = car.consumption.wltpCombined;
322
299
  const wltpCo2 = car.environmentEmissions.wltpCo2;
323
- const wltpEnergyEfficiencyClass = car.environmentEmissions.wltpEnergyEfficiencyClass;
324
- const co2ClassValue = isPropDefined(wltpEnergyEfficiencyClass)
325
- ? t('vehicleProps:value.co2Class', { class: t(`cbd:${wltpEnergyEfficiencyClass}`) })
326
- : null;
327
300
 
328
301
  const consumptionValue = Number.isFinite(consumptionHydrogenCombined)
329
302
  ? t('vehicleProps:value.consumptionGas', { consumption: consumptionHydrogenCombined.toLocaleString(language), unit: translatedUnit })
@@ -341,10 +314,10 @@ const getDecoratedLightProps = (
341
314
  : null;
342
315
 
343
316
  if (wltpConsumptionValue && wltpCo2Value) {
344
- return <>{wltpConsumptionValue}, {wltpCo2Value}{co2ClassValue && <>, {co2ClassValue}</>}</>;
317
+ return <>{wltpConsumptionValue}, {wltpCo2Value}</>;
345
318
  }
346
319
 
347
- return <>{consumptionValue} <br /> {co2Value}{co2ClassValue && <>, {co2ClassValue}</>}</>;
320
+ return <>{consumptionValue} <br /> {co2Value}</>;
348
321
  }
349
322
  },
350
323
  consumptionGasCombinedAlternateView: {
@@ -358,10 +331,6 @@ const getDecoratedLightProps = (
358
331
  const co2 = car.environmentEmissions.co2;
359
332
  const wltpConsumptionCombined = car.consumption.wltpCombined;
360
333
  const wltpCo2 = car.environmentEmissions.wltpCo2;
361
- const wltpEnergyEfficiencyClass = car.environmentEmissions.wltpEnergyEfficiencyClass;
362
- const co2ClassValue = isPropDefined(wltpEnergyEfficiencyClass)
363
- ? t('vehicleProps:value.co2Class', { class: t(`cbd:${wltpEnergyEfficiencyClass}`) })
364
- : null;
365
334
 
366
335
  const consumptionValue = Number.isFinite(consumptionGasCombined)
367
336
  ? t('vehicleProps:value.consumptionGas', { consumption: consumptionGasCombined.toLocaleString(language), unit: translatedUnit })
@@ -380,10 +349,10 @@ const getDecoratedLightProps = (
380
349
  : null;
381
350
 
382
351
  if (wltpConsumptionValue && wltpCo2Value) {
383
- return <>{wltpConsumptionValue}, {wltpCo2Value}{co2ClassValue && <>, {co2ClassValue}</>}</>;
352
+ return <>{wltpConsumptionValue}, {wltpCo2Value}</>;
384
353
  }
385
354
 
386
- return <>{consumptionValue} <br /> {co2Value}{co2ClassValue && <>, {co2ClassValue}</>}</>;
355
+ return <>{consumptionValue} <br /> {co2Value}</>;
387
356
  }
388
357
  },
389
358
  consumptionCombinedDealer: {
@@ -395,7 +364,6 @@ const getDecoratedLightProps = (
395
364
  const translatedUnit = t(`cbd:${consumptionUnit}`);
396
365
 
397
366
  const co2 = car.environmentEmissions.co2;
398
- const wltpEnergyEfficiencyClass = car.environmentEmissions.wltpEnergyEfficiencyClass;
399
367
 
400
368
  const consumptionValue = Number.isFinite(consumptionCombined)
401
369
  ? t('vehicleProps:value.consumptionCombined', { consumption: consumptionCombined.toLocaleString(language), unit: translatedUnit })
@@ -405,11 +373,7 @@ const getDecoratedLightProps = (
405
373
  ? t('vehicleProps:value.co2Combined', { co2: co2.toLocaleString(language) })
406
374
  : t('vehicleProps:value.na');
407
375
 
408
- const co2ClassValue = isPropDefined(wltpEnergyEfficiencyClass)
409
- ? t('vehicleProps:value.co2Class', { class: t(`cbd:${wltpEnergyEfficiencyClass}`) })
410
- : null;
411
-
412
- return <>{consumptionValue} | {co2Value}{co2ClassValue ? <> | {co2ClassValue}</> : null}</>;
376
+ return <>{consumptionValue} | {co2Value}</>;
413
377
  }
414
378
  },
415
379
  gearbox: {
@@ -680,7 +680,6 @@ const getDecoratedProps = (
680
680
  const translatedUnit = t(`cbd:${consumptionUnit}`);
681
681
  const wltpConsumptionCombined = car.consumption.wltpCombined;
682
682
  const wltpCo2 = car.environmentEmissions.wltpCo2;
683
- const wltpEnergyEfficiencyClass = car.environmentEmissions.wltpEnergyEfficiencyClass;
684
683
 
685
684
  const co2 = car.environmentEmissions.co2;
686
685
 
@@ -700,15 +699,11 @@ const getDecoratedProps = (
700
699
  ? t('vehicleProps:value.co2Combined', { co2: co2.toLocaleString(language) })
701
700
  : t('vehicleProps:value.na');
702
701
 
703
- const co2ClassValue = isPropDefined(wltpEnergyEfficiencyClass)
704
- ? t('vehicleProps:value.co2Class', { class: t(`cbd:${wltpEnergyEfficiencyClass}`) })
705
- : null;
706
-
707
702
  if (wltpConsumptionValue && wltpCo2Value) {
708
- return <>{wrapValue(wltpConsumptionValue)}, {wrapValue(wltpCo2Value)}{co2ClassValue && <><br />{co2ClassValue}</>}</>;
703
+ return <>{wrapValue(wltpConsumptionValue)}, {wrapValue(wltpCo2Value)}</>;
709
704
  }
710
705
 
711
- return <>{wrapValue(consumptionValue)} <br /> {wrapValue(co2Value)}{co2ClassValue && <><br />{co2ClassValue}</>}</>;
706
+ return <>{wrapValue(consumptionValue)} <br /> {wrapValue(co2Value)}</>;
712
707
  }
713
708
  },
714
709
  consumptionPowerCombinedAlternateView: {
@@ -721,7 +716,6 @@ const getDecoratedProps = (
721
716
  const co2 = car.environmentEmissions.co2;
722
717
  const wltpConsumptionPowerCombined = car.consumption.wltpPowerCombined;
723
718
  const wltpCo2 = car.environmentEmissions.wltpCo2;
724
- const wltpEnergyEfficiencyClass = car.environmentEmissions.wltpEnergyEfficiencyClass;
725
719
 
726
720
  const wltpConsumptionValue = Number.isFinite(wltpConsumptionPowerCombined)
727
721
  ? t('vehicleProps:value.consumptionPower', { consumption: wltpConsumptionPowerCombined.toLocaleString(language), unit: translatedUnit })
@@ -739,15 +733,11 @@ const getDecoratedProps = (
739
733
  ? t('vehicleProps:value.co2Combined', { co2: co2.toLocaleString(language) })
740
734
  : t('vehicleProps:value.na');
741
735
 
742
- const co2ClassValue = isPropDefined(wltpEnergyEfficiencyClass)
743
- ? t('vehicleProps:value.co2Class', { class: t(`cbd:${wltpEnergyEfficiencyClass}`) })
744
- : null;
745
-
746
736
  if (wltpConsumptionValue && wltpCo2Value) {
747
- return <>{wrapValue(wltpConsumptionValue)}, {wrapValue(wltpCo2Value)}{co2ClassValue && <><br />{co2ClassValue}</>}</>;
737
+ return <>{wrapValue(wltpConsumptionValue)}, {wrapValue(wltpCo2Value)}</>;
748
738
  }
749
739
 
750
- return <>{wrapValue(consumptionValue)} <br /> {wrapValue(co2Value)}{co2ClassValue && <><br />{co2ClassValue}</>}</>;
740
+ return <>{wrapValue(consumptionValue)} <br /> {wrapValue(co2Value)}</>;
751
741
  }
752
742
  },
753
743
  consumptionHydrogenCombinedAlternateView: {
@@ -760,7 +750,6 @@ const getDecoratedProps = (
760
750
  const translatedUnit = t(`cbd:${consumptionUnit}`);
761
751
  const co2 = car.environmentEmissions.co2;
762
752
  const wltpCo2 = car.environmentEmissions.wltpCo2;
763
- const wltpEnergyEfficiencyClass = car.environmentEmissions.wltpEnergyEfficiencyClass;
764
753
 
765
754
  const consumptionValue = Number.isFinite(consumptionHydrogenCombined)
766
755
  ? t('vehicleProps:value.consumptionGas', { consumption: consumptionHydrogenCombined.toLocaleString(language), unit: translatedUnit })
@@ -778,15 +767,11 @@ const getDecoratedProps = (
778
767
  ? t('vehicleProps:value.wltpCo2Combined', { co2: wltpCo2.toLocaleString(language) })
779
768
  : null;
780
769
 
781
- const co2ClassValue = isPropDefined(wltpEnergyEfficiencyClass)
782
- ? t('vehicleProps:value.co2Class', { class: t(`cbd:${wltpEnergyEfficiencyClass}`) })
783
- : null;
784
-
785
770
  if (wltpConsumptionValue && wltpCo2Value) {
786
- return <>{wrapValue(wltpConsumptionValue)}, {wrapValue(wltpCo2Value)}{co2ClassValue && <><br />{co2ClassValue}</>}</>;
771
+ return <>{wrapValue(wltpConsumptionValue)}, {wrapValue(wltpCo2Value)}</>;
787
772
  }
788
773
 
789
- return <>{wrapValue(consumptionValue)} <br /> {wrapValue(co2Value)}{co2ClassValue && <><br />{co2ClassValue}</>}</>;
774
+ return <>{wrapValue(consumptionValue)} <br /> {wrapValue(co2Value)}</>;
790
775
  }
791
776
  },
792
777
  consumptionGasCombinedAlternateView: {
@@ -800,7 +785,6 @@ const getDecoratedProps = (
800
785
 
801
786
  const co2 = car.environmentEmissions.co2;
802
787
  const wltpCo2 = car.environmentEmissions.wltpCo2;
803
- const wltpEnergyEfficiencyClass = car.environmentEmissions.wltpEnergyEfficiencyClass;
804
788
 
805
789
  const consumptionValue = Number.isFinite(consumptionGasCombined)
806
790
  ? t('vehicleProps:value.consumptionGas', { consumption: consumptionGasCombined.toLocaleString(language), unit: translatedUnit })
@@ -818,15 +802,11 @@ const getDecoratedProps = (
818
802
  ? t('vehicleProps:value.wltpCo2Combined', { co2: wltpCo2.toLocaleString(language) })
819
803
  : null;
820
804
 
821
- const co2ClassValue = isPropDefined(wltpEnergyEfficiencyClass)
822
- ? t('vehicleProps:value.co2Class', { class: t(`cbd:${wltpEnergyEfficiencyClass}`) })
823
- : null;
824
-
825
805
  if (wltpConsumptionValue && wltpCo2Value) {
826
- return <>{wrapValue(wltpConsumptionValue)}, {wrapValue(wltpCo2Value)}{co2ClassValue && <><br />{co2ClassValue}</>}</>;
806
+ return <>{wrapValue(wltpConsumptionValue)}, {wrapValue(wltpCo2Value)}</>;
827
807
  }
828
808
 
829
- return <>{wrapValue(consumptionValue)} <br /> {wrapValue(co2Value)}{co2ClassValue && <><br />{co2ClassValue}</>}</>;
809
+ return <>{wrapValue(consumptionValue)} <br /> {wrapValue(co2Value)}</>;
830
810
  }
831
811
  },
832
812
 
@@ -861,7 +841,6 @@ const getDecoratedProps = (
861
841
 
862
842
  const co2 = car.environmentEmissions.co2;
863
843
  const wltpCo2 = car.environmentEmissions.wltpCo2;
864
- const wltpEnergyEfficiencyClass = car.environmentEmissions.wltpEnergyEfficiencyClass;
865
844
  const co2Value = Number.isFinite(co2)
866
845
  ? t('vehicleProps:value.co2Combined', { co2: co2.toLocaleString(language) })
867
846
  : t('vehicleProps:value.na');
@@ -871,9 +850,6 @@ const getDecoratedProps = (
871
850
  const wltpCo2PluginValue = Number.isFinite(wltpCo2)
872
851
  ? t('vehicleProps:value.wltpCo2WtdCombined', { co2: wltpCo2.toLocaleString(language) })
873
852
  : null;
874
- const co2ClassValue = isPropDefined(wltpEnergyEfficiencyClass)
875
- ? t('vehicleProps:value.co2Class', { class: t(`cbd:${wltpEnergyEfficiencyClass}`) })
876
- : null;
877
853
  const hybridPlugin = car.engineData.hybridPlugin;
878
854
 
879
855
  if (hybridPlugin && wltpConsumptionWeightedPowerCombinedContent && wltpConsumptionWeightedCombinedContent) {
@@ -881,7 +857,6 @@ const getDecoratedProps = (
881
857
  {wrapValue(wltpConsumptionWeightedPowerCombinedContent)}{', '}
882
858
  {wrapValue(wltpConsumptionWeightedCombinedContent)}{', '}
883
859
  {wrapValue(wltpCo2PluginValue)}
884
- {co2ClassValue && <><br />{co2ClassValue}</>}
885
860
  </React.Fragment>
886
861
  }
887
862
 
@@ -889,7 +864,6 @@ const getDecoratedProps = (
889
864
  return <React.Fragment>
890
865
  {wrapValue(wltpConsumptionCombinedContent)}{', '}
891
866
  {wrapValue(wltpCo2Value)}
892
- {co2ClassValue && <><br />{co2ClassValue}</>}
893
867
  </React.Fragment>
894
868
  }
895
869
 
@@ -899,7 +873,6 @@ const getDecoratedProps = (
899
873
  {consumptionPowerCombined && hybridPlugin ? <br /> : ''}
900
874
  {wrapValue(consumptionCombinedContent)} <br />
901
875
  {wrapValue(co2Value)}
902
- {co2ClassValue && <><br />{co2ClassValue}</>}
903
876
  </React.Fragment>
904
877
  : t('vehicleProps:value.na');
905
878
  }
@@ -38,8 +38,6 @@ export const vehicleProps = (car?: any, isOfferAvailable: boolean = true) => {
38
38
  promoSlider: {
39
39
  consumptionCombined: `${vehicleOption.consumptionCombined}l/100km (komb)*`,
40
40
  co2: `${vehicleOption.co2} g CO2/km (komb)*`,
41
- // wltpEnergyEfficiencyClass arrives as `selector_energyEfficiencyClass_X`; map to the bare letter via cbd dict.
42
- co2Class: `CO2-Klasse ${(cbd.cbd as any)[vehicleOption.wltpEnergyEfficiencyClass] || vehicleOption.wltpEnergyEfficiencyClass || ''} (komb)`,
43
41
  new: 'neu',
44
42
  downPayment: '0€ Anzahlung',
45
43
  downPaymentShort: '0€ Anz.',
@@ -61,7 +59,6 @@ export const vehicleProps = (car?: any, isOfferAvailable: boolean = true) => {
61
59
  deliveryPeriodMonths: `${Math.round(monthsTo)} Monat\nab Bestellung`,
62
60
  deliveryPeriodDays: `${count} Tag\nab Bestellung`,
63
61
  co2Combined: `${vehicleOption.co2}g CO2/km (komb)*`,
64
- co2Class: `CO2-Klasse ${(cbd.cbd as any)[vehicleOption.wltpEnergyEfficiencyClass] || vehicleOption.wltpEnergyEfficiencyClass || ''} (komb)`,
65
62
  co2: `${vehicleOption.co2} g/km `,
66
63
  na: 'N/A',
67
64
  priceSub: '/mtl.',
package/.husky/pre-push DELETED
@@ -1,4 +0,0 @@
1
- #!/usr/bin/env sh
2
- . "$(dirname -- "$0")/_/husky.sh"
3
-
4
- npm run test:ci
@@ -1,4 +0,0 @@
1
- import '@storybook/addon-actions/register';
2
- import '@storybook/addon-links/register';
3
- import '@storybook/addon-backgrounds/register';
4
- import 'storybook-addon-i18next/register';
@@ -1,64 +0,0 @@
1
- import { configure, addDecorator, addParameters } from '@storybook/react';
2
-
3
- import i18n from 'i18next';
4
- import centered from '@storybook/addon-centered/react';
5
-
6
- import { reactI18nextModule } from 'react-i18next';
7
- import { withI18next } from 'storybook-addon-i18next';
8
- import { en, de } from '@bytebrand/i18n-dictionaries';
9
-
10
- import '!style-loader!css-loader!stylus-loader!../source/theme/colors.styl';
11
-
12
- i18n
13
- .use(reactI18nextModule)
14
- .init({
15
- whitelist: ['en', 'de'],
16
- lng: 'de',
17
- fallbackLng: 'de',
18
- interpolation: {
19
- escapeValue: false,
20
- },
21
- debug: process.env.NODE_ENV === 'development',
22
- react: {
23
- wait: true
24
- },
25
- },
26
- (err, t) => {
27
- if (err) {
28
- return console.error('Something went wrong loading', err);
29
- }
30
-
31
- i18n.addResourceBundle('en', 'cbd', en, true, true);
32
- i18n.addResourceBundle('de', 'cbd', de, true, true);
33
-
34
- });
35
-
36
- addDecorator(withI18next({
37
- i18n,
38
- languages: {
39
- en: 'English',
40
- de: 'Deutsch',
41
- }
42
- }));
43
-
44
- addParameters({
45
- options: {
46
- sortStoriesByKind: true
47
- },
48
- backgrounds: [
49
- { name: 'white', value: '#fff' },
50
- { name: 'grey', value: '#808080', default: true },
51
- { name: 'black', value: '#000' }
52
- ]
53
- });
54
-
55
- addDecorator(centered);
56
-
57
- // automatically import all files ending in *.stories.js
58
- const req = require.context('../source/components', true, /.story.js$/);
59
-
60
- function loadStories() {
61
- req.keys().forEach(filename => req(filename));
62
- }
63
-
64
- configure(loadStories, module);
@@ -1,6 +0,0 @@
1
- module.exports = ({ file, options, env }) => ({
2
- parser: false,
3
- plugins: {
4
- 'autoprefixer': env === 'production' ? options.autoprefixer : false,
5
- }
6
- });
@@ -1,10 +0,0 @@
1
- <link rel="stylesheet" type="text/css" charset="UTF-8"
2
- href="https://cdnjs.cloudflare.com/ajax/libs/slick-carousel/1.6.0/slick.min.css" />
3
- <link rel="stylesheet" type="text/css"
4
- href="https://cdnjs.cloudflare.com/ajax/libs/slick-carousel/1.6.0/slick-theme.min.css" />
5
-
6
- <link rel="stylesheet" type="text/css"
7
- href="https://cdn.jsdelivr.net/npm/react-checkbox-tree@1.5.1/lib/react-checkbox-tree.css" />
8
-
9
- <link rel="stylesheet" type="text/css"
10
- href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.css" />