@bytebrand/fe-ui-core 4.8.108 → 4.8.110

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 (198) hide show
  1. package/media/locales/de/promoSlider.json +0 -1
  2. package/media/locales/en/promoSlider.json +0 -1
  3. package/package.json +5 -3
  4. package/source/components/AccordionWidget/AccordionWidget.styl +1 -13
  5. package/source/components/AccordionWidget/AccordionWidget.tsx +8 -49
  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 +2 -1
  9. package/source/components/OfferPanel/OfferPanel.tsx +1 -1
  10. package/source/components/VehicleDetailedSidebar/VehicleDetailedSidebar.tsx +11 -23
  11. package/source/components/VehicleDetailedSidebar/partials/Properties.styl +0 -5
  12. package/source/components/VehicleDetailedSidebar/partials/Properties.tsx +18 -56
  13. package/source/components/VehicleDetailedSlider/VehicleDetailedSlider.tsx +6 -2
  14. package/source/components/VehicleSmallCard/VehicleData/VechiclePriceItem/VechiclePriceItem.styl +0 -42
  15. package/source/components/VehicleSmallCard/VehicleData/VechiclePriceItem/VechiclePriceItem.tsx +11 -23
  16. package/source/components/VehicleSmallCard/VehicleData/VehicleInfo/VehicleInfo.styl +5 -60
  17. package/source/components/VehicleSmallCard/VehicleData/VehicleInfo/VehicleInfo.tsx +12 -36
  18. package/source/components/VehicleSmallCard/VehicleData/VehiclePrice/VehiclePrice.styl +2 -3
  19. package/source/components/VehicleSmallCard/VehicleData/VehiclePrice/VehiclePrice.tsx +7 -18
  20. package/source/components/VehicleSmallCard/VehicleData/VehicleProperty/VehicleProperty.styl +1 -4
  21. package/source/components/VehicleSmallCard/VehicleData/VehicleProperty/VehicleProperty.tsx +2 -3
  22. package/source/components/VehicleSmallCard/VehicleData/VehicleTitle/VehicleTitle.tsx +1 -1
  23. package/source/components/VehicleSmallCard/VehicleSmallCard.styl +2 -67
  24. package/source/components/VehicleSmallCard/VehicleSmallCard.tsx +3 -49
  25. package/source/components/_common/MaterialAccordionGroup/MaterialAccordionGroup.styled.tsx +1 -4
  26. package/source/components/_common/MaterialTooltip/MaterialTooltip.tsx +3 -4
  27. package/source/components/_common/withStats/withStats.styl +0 -10
  28. package/source/framework/DataTransformers.ts +0 -2
  29. package/source/framework/constants/common.ts +4 -8
  30. package/source/framework/types/types.ts +0 -1
  31. package/source/framework/vehiclesProps/decoratedLightProps.tsx +18 -109
  32. package/source/framework/vehiclesProps/decoratedProps.tsx +9 -68
  33. package/source/framework/vehiclesProps/vehicleDetails.ts +1 -3
  34. package/source/locales/data.ts +3 -13
  35. package/.husky/pre-push +0 -4
  36. package/.storybook/addons.js +0 -4
  37. package/.storybook/config.js +0 -64
  38. package/.storybook/postcss.config.js +0 -6
  39. package/.storybook/preview-head.html +0 -10
  40. package/.storybook/webpack.config.js +0 -130
  41. package/__tests__/components/Checkout/OrderOverviewItem/OrderOverviewItem.test.tsx +0 -42
  42. package/__tests__/components/Checkout/PaymentTypeCard/PaymentTypeCard.test.tsx +0 -50
  43. package/__tests__/components/Checkout/RadioGroup.test.tsx +0 -95
  44. package/__tests__/components/Checkout/ServiceCardWrapper.test.tsx +0 -53
  45. package/__tests__/components/Checkout/Switcher.test.tsx +0 -43
  46. package/__tests__/components/UserDasboardPage/sections/CheckoutSection/CheckoutSection.test.tsx +0 -613
  47. package/__tests__/components/UserDasboardPage/sections/FavoriteSection/FavoriteSection.test.tsx +0 -335
  48. package/__tests__/components/UserDasboardPage/sections/OrderStatusSection/AdditionalOrderInfo.test.tsx +0 -127
  49. package/__tests__/components/UserDasboardPage/sections/OrderStatusSection/OrderStatusCar.test.tsx +0 -58
  50. package/__tests__/components/UserDasboardPage/sections/OrderStatusSection/OrderStatusCard.test.tsx +0 -74
  51. package/__tests__/components/UserDasboardPage/sections/OrderStatusSection/OrderStatusSection.test.tsx +0 -62
  52. package/__tests__/components/UserDasboardPage/sections/RequestedCarsSection/RequestedCarsSection.test.tsx +0 -117
  53. package/__tests__/components/Vehicle/VehicleFormattedPrice/VehicleFormattedPrice.test.tsx +0 -58
  54. package/__tests__/components/VehicleSmallCard/VehicleInfo.test.tsx +0 -88
  55. package/__tests__/components/VehicleSmallCard/VehicleTitle.test.tsx +0 -91
  56. package/__tests__/components/_common/Badge/Badge.test.tsx +0 -15
  57. package/__tests__/components/_common/IconSVG/IconSVG.test.tsx +0 -23
  58. package/__tests__/components/_common/Image/Image.test.tsx +0 -82
  59. package/__tests__/components/_common/MaterialAutocomplete/MaterialAutocomplete.test.tsx +0 -49
  60. package/__tests__/components/_common/MaterialDatePicker/MaterialDatePicker.test.tsx +0 -54
  61. package/__tests__/components/_common/MaterialField/MaterialField.test.tsx +0 -58
  62. package/__tests__/components/_common/StarButton/StarButton.test.tsx +0 -46
  63. package/__tests__/mockedData/financingConfig.js +0 -202
  64. package/__tests__/mockedData/mockedPendingRequestedCar.js +0 -69
  65. package/__tests__/utils/CommonUtils/addPrefixToKeys.test.ts +0 -18
  66. package/__tests__/utils/CommonUtils/arrToObj.test.js +0 -32
  67. package/__tests__/utils/CommonUtils/checkRangeValuesOnEqual.test.ts +0 -17
  68. package/__tests__/utils/CommonUtils/fixNumber.test.ts +0 -20
  69. package/__tests__/utils/CommonUtils/formatMileage.test.ts +0 -8
  70. package/__tests__/utils/CommonUtils/getChipFilterValue.test.ts +0 -22
  71. package/__tests__/utils/CommonUtils/getFormattedNumber.test.ts +0 -19
  72. package/__tests__/utils/CommonUtils/getFormattedPrice.test.ts +0 -19
  73. package/__tests__/utils/CommonUtils/getGroupValuesForQuery.test.ts +0 -51
  74. package/__tests__/utils/CommonUtils/getOfferSliders.test.ts +0 -64
  75. package/__tests__/utils/CommonUtils/getPriceRating.test.ts +0 -26
  76. package/__tests__/utils/CommonUtils/getPriceRatingConfig.test.ts +0 -33
  77. package/__tests__/utils/CommonUtils/preloadNearbyImages.test.ts +0 -9
  78. package/__tests__/utils/CommonUtils/sliceLessThan.test.ts +0 -23
  79. package/__tests__/utils/CommonUtils/sliceMoreThan.test.ts +0 -23
  80. package/package.json.bak +0 -118
  81. package/source/components/AdvantageItem/AdvantageItem.story.js +0 -23
  82. package/source/components/Alternative/Dealer.story.js +0 -32
  83. package/source/components/Alternative/Dealer.story.styl +0 -3
  84. package/source/components/Breadcrumbs/Breadcrumbs.story.js +0 -40
  85. package/source/components/Breadcrumbs/FirstInfoBlock/FirstInfoBlock.story.js +0 -45
  86. package/source/components/Checkout/OrderOverviewItem/OrderOverviewItem.story.js +0 -243
  87. package/source/components/Checkout/OrderOverviewItem/OrderOverviewItem.story.styl +0 -21
  88. package/source/components/Checkout/RadioCards/RadioGroupCheckout.story.js +0 -105
  89. package/source/components/Checkout/RadioCards/RadioGroupCheckout.story.styl +0 -37
  90. package/source/components/Checkout/Switcher/Switcher.story.js +0 -41
  91. package/source/components/Checkout/Switcher/Switcher.story.styl +0 -2
  92. package/source/components/CompactSearchWidget/CompactSearchWidget.story.js +0 -187
  93. package/source/components/ContactForm/ContactForm.story.js +0 -94
  94. package/source/components/ContactForm/ContactForm.story.styl +0 -0
  95. package/source/components/ContactInfo/ContactInfo.story.js +0 -58
  96. package/source/components/CustomerQuote/CustomerQuote.story.js +0 -41
  97. package/source/components/CustomerQuotesSlider/CustomerQuotesSlider.story.js +0 -73
  98. package/source/components/CustomerQuotesSlider/CustomerQuotesSlider.story.styl +0 -5
  99. package/source/components/FormattedNumber/FormattedNumber.story.js +0 -114
  100. package/source/components/InfoBlocks/InfoBlockWrapper.story.js +0 -101
  101. package/source/components/InfoBlocks/InfoBlockWrapper.story.styl +0 -46
  102. package/source/components/OfferPanel/AboAccordion/AboFaq/AboFaq.story.js +0 -97
  103. package/source/components/OfferPanel/OfferPanel.story.js +0 -139
  104. package/source/components/OfferPanel/RangeGroup/RangeGroup.story.js +0 -35
  105. package/source/components/OfferPanel/RangeGroup/RangeGroup.story.styl +0 -3
  106. package/source/components/PriceRating/PriceRating.story.js +0 -39
  107. package/source/components/PriceRating/PriceRating.story.styl +0 -2
  108. package/source/components/PriceRatingDetailed/PriceRatingDetailed.story.js +0 -78
  109. package/source/components/PriceRatingDetailed/PriceRatingDetailed.story.styl +0 -11
  110. package/source/components/RateSearchValue/RateSearchValue.story.js +0 -78
  111. package/source/components/RateSearchValue/RateSearchValue.story.styl +0 -2
  112. package/source/components/RateSearchWidget/RateSearchWidget.story.js +0 -57
  113. package/source/components/RateSearchWidget/RateSearchWidget.story.styl +0 -12
  114. package/source/components/SearchFilters/FiltersFactory.story.js +0 -273
  115. package/source/components/SearchPage/Filters/MakeModel/MakeModel.story.js +0 -12
  116. package/source/components/SearchWidget/BasicDataWidget/BasicDataWidget.story.js +0 -834
  117. package/source/components/SearchWidget/BasicDataWidget/BasicDataWidget.story.styl +0 -40
  118. package/source/components/SearchWidget/SearchWidget.story.js +0 -191
  119. package/source/components/SearchWidget/SearchWidget.story.styl +0 -6
  120. package/source/components/Stepper/Stepper.story.js +0 -119
  121. package/source/components/Stepper/Stepper.story.styl +0 -41
  122. package/source/components/Theme.story.js +0 -36
  123. package/source/components/Theme.story.styl +0 -85
  124. package/source/components/TickerText/TickerText.story.js +0 -17
  125. package/source/components/UserDashboardPage/sections/OrderStatusSection/OrderStatusSection.story.js +0 -95
  126. package/source/components/UserDashboardPage/sections/RequestedCarsSection/RequestedCarsSection.story.js +0 -97
  127. package/source/components/Vehicle/VehicleConsumption/VehicleConsumption.story.js +0 -31
  128. package/source/components/Vehicle/VehicleFormattedPrice/VehicleFormattedPrice.story.js +0 -247
  129. package/source/components/VehicleCompared/CompareGeneral/CompareGeneral.story.js +0 -30
  130. package/source/components/VehicleCompared/ComparePrice/ComparePrice.story.js +0 -18
  131. package/source/components/VehicleCompared/CompareTitle/CompareTitle.story.js +0 -19
  132. package/source/components/VehicleDetailedSidebar/VehicleDetailedSidebar.story.js +0 -44
  133. package/source/components/VehicleDetailedSlider/VehicleDetailedSlider.story.js +0 -120
  134. package/source/components/VehiclePromoSlider/VehiclePromoInfo/VehiclePromoInfo.story.js +0 -42
  135. package/source/components/VehiclePromoSlider/VehiclePromoSlide/VehiclePromoSlide.story.js +0 -62
  136. package/source/components/VehiclePromoSlider/VehiclePromoSlider.story.js +0 -42
  137. package/source/components/VehicleSmallCard/VehicleSmallCard.story.js +0 -412
  138. package/source/components/VehicleSmallCard/VehicleSmallCard.story.styl +0 -56
  139. package/source/components/VehicleSmallCardForDealerships/VehicleSmallCardForDealerships.story.js +0 -199
  140. package/source/components/VehicleSmallCardForDealerships/VehicleSmallCardForDealerships.story.styl +0 -40
  141. package/source/components/_common/Accordion/Accordion.story.js +0 -36
  142. package/source/components/_common/Badge/Badge.story.js +0 -27
  143. package/source/components/_common/Badge/Badge.story.styl +0 -5
  144. package/source/components/_common/Bubble/Bubble.story.js +0 -52
  145. package/source/components/_common/Button/Button.story.js +0 -52
  146. package/source/components/_common/Button/Button.story.styl +0 -5
  147. package/source/components/_common/ButtonOld/Button.story.js +0 -54
  148. package/source/components/_common/ButtonOld/Button.story.styl +0 -5
  149. package/source/components/_common/Checkbox/Checkbox.story.js +0 -85
  150. package/source/components/_common/Checkbox/Checkbox.story.styl +0 -14
  151. package/source/components/_common/CheckboxMaterial/CheckboxMaterial.story.js +0 -126
  152. package/source/components/_common/CheckboxMaterial/CheckboxMaterial.story.styl +0 -14
  153. package/source/components/_common/Chip/Chip.story.js +0 -43
  154. package/source/components/_common/ChipList/ChipList.story.js +0 -36
  155. package/source/components/_common/DropDown/DropDown.story.js +0 -35
  156. package/source/components/_common/ExpandablePanel/ExpandablePanel.story.js +0 -41
  157. package/source/components/_common/Histogram/Histogram.story.js +0 -51
  158. package/source/components/_common/IconSVG/IconSVG.story.js +0 -21
  159. package/source/components/_common/IconSVG/IconSVG.story.styl +0 -25
  160. package/source/components/_common/Image/Image.story.js +0 -142
  161. package/source/components/_common/Image/Image.story.styl +0 -18
  162. package/source/components/_common/ImagesSet/ImagesSet.story.js +0 -34
  163. package/source/components/_common/ImagesSet/ImagesSet.story.styl +0 -4
  164. package/source/components/_common/Loader/Loader.story.js +0 -21
  165. package/source/components/_common/MaterialAccordionGroup/MaterialAccordionGroup.story.js +0 -49
  166. package/source/components/_common/MaterialDatePicker/MaterialDatePicker.story.js +0 -45
  167. package/source/components/_common/MaterialDatePicker/MaterialDatePicker.story.styl +0 -6
  168. package/source/components/_common/MaterialField/MaterialField.story.js +0 -87
  169. package/source/components/_common/MaterialField/MaterialField.story.styl +0 -34
  170. package/source/components/_common/MaterialSelect/MaterialSelect.story.js +0 -52
  171. package/source/components/_common/MaterialSelect/MaterialSelect.story.styl +0 -6
  172. package/source/components/_common/MaterialStepButton/MaterialStepButton.story.js +0 -47
  173. package/source/components/_common/MaterialStepButton/MaterialStepButton.story.styl +0 -6
  174. package/source/components/_common/MaterialSwitch/MaterialSwitch.story.js +0 -17
  175. package/source/components/_common/MaterialTooltip/MaterialTooltip.story.js +0 -10
  176. package/source/components/_common/Modal/Modal.story.js +0 -37
  177. package/source/components/_common/MuiGroupedSelect/MuiGroupedSelect.story.js +0 -21
  178. package/source/components/_common/PropertySelector/PSGroup.story.js +0 -93
  179. package/source/components/_common/PropertySelector/PSGroup.story.styl +0 -25
  180. package/source/components/_common/PropertySelector/ProperySelector.story.js +0 -83
  181. package/source/components/_common/Radio/FormRadioGroup.story.js +0 -28
  182. package/source/components/_common/Radio/FormRadioGroup.story.styl +0 -2
  183. package/source/components/_common/Radio/Radio.story.js +0 -54
  184. package/source/components/_common/Radio/RadioGroup.story.js +0 -90
  185. package/source/components/_common/Radio/RadioGroup.story.styl +0 -39
  186. package/source/components/_common/Range/Range.story.js +0 -46
  187. package/source/components/_common/Range/Range.story.styl +0 -5
  188. package/source/components/_common/SliderArrow/SliderArrow.story.js +0 -18
  189. package/source/components/_common/Tabs/Tabs.story.js +0 -56
  190. package/source/components/_common/TimePicker/TimePicker.story.js +0 -37
  191. package/source/components/_common/Tooltip/Tooltip.story.js +0 -28
  192. package/source/components/_common/UserMenu/MaterialMenu.story.js +0 -73
  193. package/source/components/_common/VehicleSlider/VehicleSlider.story.js +0 -99
  194. package/source/components/_common/VehicleSlider/VehicleSlider.story.styl +0 -0
  195. package/source/components/_common/withLabel/withLabel.story.js +0 -62
  196. package/source/components/_common/withPopover/withPopover.story.js +0 -48
  197. package/source/components/_common/withPopover/withPopover.story.styl +0 -54
  198. package/source/components/_common/withStats/withStats.story.js +0 -75
@@ -123,10 +123,7 @@ const getDecoratedLightProps = (
123
123
  const translatedUnit = t(`cbd:${consumptionUnit}`);
124
124
  const wltpConsumptionCombined = car.consumption.wltpCombined;
125
125
  const wltpCo2 = car.environmentEmissions.wltpCo2;
126
- const wltpEnergyEfficiencyClass = car.environmentEmissions.wltpEnergyEfficiencyClass;
127
- const co2ClassValue = isPropDefined(wltpEnergyEfficiencyClass)
128
- ? t('vehicleProps:value.co2Class', { class: t(`cbd:${wltpEnergyEfficiencyClass}`) })
129
- : null;
126
+ const consumptionPowerCombined = car.consumption.consumptionCombined;
130
127
 
131
128
  const co2 = car.environmentEmissions.co2;
132
129
 
@@ -146,74 +143,41 @@ const getDecoratedLightProps = (
146
143
  ? t('vehicleProps:value.consumptionCombined', { consumption: consumptionCombined.toLocaleString(language), unit: translatedUnit })
147
144
  : t('vehicleProps:value.na');
148
145
 
146
+ const consumptionPowerCombinedContent = t('vehicleProps:value.consumptionPowerCombined', { consumption: consumptionPowerCombined.toLocaleString(language), unit: translatedUnit });
147
+
149
148
  const co2Value = Number.isFinite(co2)
150
149
  ? t('vehicleProps:value.co2Combined', { co2: co2.toLocaleString(language) })
151
150
  : t('vehicleProps:value.na');
152
151
 
153
- // ADV-88: "is a hybrid car" is now determined by fuel type (hybrid electric + diesel/petrol),
154
- // not engineData.hybridPlugin.
155
- const hybridPlugin = car.consumption.fuel === 'selector_fuel_hybridElectricalDiesel'
156
- || car.consumption.fuel === 'selector_fuel_hybridElectricalPetrol';
152
+ const hybridPlugin = car.engineData.hybridPlugin;
157
153
  const wltpWeightedPowerCombined = car.consumption.wltpWeightedPowerCombined;
158
154
  const wltpWeightedCombined = car.consumption.wltpWeightedCombined;
159
155
 
160
156
  const wltpWeightedPowerCombinedContent = wltpWeightedPowerCombined ? t('vehicleProps:value.wltpWeightedPowerCombined', { consumption: wltpWeightedPowerCombined.toLocaleString(language), unit: translatedUnit }) : null;
161
157
  const wltpWeightedCombinedContent = wltpWeightedCombined ? t('vehicleProps:value.wltpWeightedCombined', { consumption: wltpWeightedCombined.toLocaleString(language), unit: translatedUnit }) : null;
162
158
 
163
- // ADV-88: the weighted+discharged (entladen) consumption treatment is shown for ANY plug-in
164
- // hybrid (new or used) — gated on hybridPlugin only, no condition check.
165
159
  if (hybridPlugin) {
166
- if (wltpWeightedPowerCombinedContent && wltpWeightedCombinedContent) {
167
- const dischargedCombined = Number.isFinite(wltpConsumptionCombined) ? wltpConsumptionCombined : 19.9;
168
- const dischargedClass = car.environmentEmissions.wltpDischargedEnergyEfficiencyClass || 'selector_energyEfficiencyClass_g';
169
- const weightedCombinedLabeled = t('vehicleProps:value.wltpWeightedCombinedLabel', { consumption: wltpWeightedCombined.toLocaleString(language), unit: translatedUnit });
170
- const dischargedCombinedLabeled = t('vehicleProps:value.wltpDischargedCombinedLabel', { consumption: dischargedCombined.toLocaleString(language), unit: translatedUnit });
171
- const co2WeightedContent = Number.isFinite(wltpCo2)
172
- ? t('vehicleProps:value.wltpCo2WtdCombinedShort', { co2: wltpCo2.toLocaleString(language) })
173
- : null;
174
- const co2ClassWeighted = isPropDefined(wltpEnergyEfficiencyClass)
175
- ? t('vehicleProps:value.co2ClassWeighted', { class: t(`cbd:${wltpEnergyEfficiencyClass}`) })
176
- : null;
177
- const co2ClassDischarged = t('vehicleProps:value.co2ClassDischarged', { class: t(`cbd:${dischargedClass}`) });
178
- return <React.Fragment>
179
- {`${wltpWeightedPowerCombinedContent} + `}
180
- {`${weightedCombinedLabeled}, `}
181
- {`${dischargedCombinedLabeled}`}
182
- {co2WeightedContent && <>, {co2WeightedContent}</>}
183
- {co2ClassWeighted && <>, {co2ClassWeighted}</>}
184
- {<>, {co2ClassDischarged}</>}
185
- </React.Fragment>
186
- }
187
-
188
160
  if (wltpWeightedPowerCombinedContent && wltpWeightedCombinedContent && wltpCo2PluginValue) {
189
161
  return <React.Fragment>
190
162
  {`${wltpWeightedPowerCombinedContent}, `}
191
163
  {`${wltpWeightedCombinedContent}, `}
192
164
  {wltpCo2PluginValue}
193
- {co2ClassValue && <>, {co2ClassValue}</>}
194
165
  </React.Fragment>
195
166
  }
196
167
 
197
- // ADV-88: only render the electric (kWh) line when the car actually has a combined
198
- // power consumption — otherwise we printed "nullkWh/100km" for plug-ins lacking it.
199
- const realPowerCombined = car.consumption.consumptionPowerCombined;
200
- const powerCombinedLine = Number.isFinite(realPowerCombined)
201
- ? t('vehicleProps:value.consumptionPowerCombined', { consumption: realPowerCombined.toLocaleString(language), unit: translatedUnit })
202
- : null;
203
- return Number.isFinite(consumptionCombined) || Number.isFinite(realPowerCombined)
168
+ return Number.isFinite(consumptionCombined) || Number.isFinite(consumptionPowerCombined)
204
169
  ? <React.Fragment>
205
- {powerCombinedLine && <>{powerCombinedLine} <br /></>}{consumptionValue} <br /> {co2Value}
206
- {co2ClassValue && <>, {co2ClassValue}</>}
170
+ {consumptionPowerCombined ? consumptionPowerCombinedContent : t('vehicleProps:value.na')} <br />{consumptionValue} <br /> {co2Value}
207
171
  </React.Fragment>
208
172
  : t('vehicleProps:value.na');
209
173
 
210
174
  }
211
175
 
212
176
  if (wltpConsumptionValue && wltpCo2Value) {
213
- return <>{wltpConsumptionValue}, {wltpCo2Value}{co2ClassValue && <>, {co2ClassValue}</>}</>;
177
+ return <>{wltpConsumptionValue}, {wltpCo2Value}</>;
214
178
  }
215
179
 
216
- return <>{consumptionValue} <br /> {co2Value}{co2ClassValue && <>, {co2ClassValue}</>}</>;
180
+ return <>{consumptionValue} <br /> {co2Value}</>;
217
181
  }
218
182
  },
219
183
  consumptionPowerCombinedAlternateView: {
@@ -227,10 +191,6 @@ const getDecoratedLightProps = (
227
191
  const co2 = car.environmentEmissions.co2;
228
192
  const wltpConsumptionPowerCombined = car.consumption.wltpPowerCombined;
229
193
  const wltpCo2 = car.environmentEmissions.wltpCo2;
230
- const wltpEnergyEfficiencyClass = car.environmentEmissions.wltpEnergyEfficiencyClass;
231
- const co2ClassValue = isPropDefined(wltpEnergyEfficiencyClass)
232
- ? t('vehicleProps:value.co2Class', { class: t(`cbd:${wltpEnergyEfficiencyClass}`) })
233
- : null;
234
194
 
235
195
  const wltpConsumptionValue = Number.isFinite(wltpConsumptionPowerCombined)
236
196
  ? t('vehicleProps:value.wltpPowerCombined', { consumption: wltpConsumptionPowerCombined.toLocaleString(language), unit: translatedUnit })
@@ -249,10 +209,10 @@ const getDecoratedLightProps = (
249
209
  : t('vehicleProps:value.na');
250
210
 
251
211
  if (wltpConsumptionValue && wltpCo2Value) {
252
- return <>{wltpConsumptionValue}, {wltpCo2Value}{co2ClassValue && <>, {co2ClassValue}</>}</>;
212
+ return <>{wltpConsumptionValue}, {wltpCo2Value}</>;
253
213
  }
254
214
 
255
- return <>{consumptionValue} <br /> {co2Value} {co2ClassValue && <>, {co2ClassValue}</>}</>;
215
+ return <>{consumptionValue} <br /> {co2Value} </>;
256
216
  }
257
217
  },
258
218
 
@@ -273,12 +233,8 @@ const getDecoratedLightProps = (
273
233
 
274
234
  const consumptionPowerCombinedContent = t('vehicleProps:value.consumptionPowerCombined', { consumption: consumptionPowerCombined.toLocaleString(language), unit: translatedUnit });
275
235
  const consumptionCombinedContent = t('vehicleProps:value.consumptionCombined', { consumption: consumptionCombined.toLocaleString(language), unit: translatedUnit });
276
- const wltpWeightedPowerCombinedContent = Number.isFinite(wltpWeightedPowerCombined)
277
- ? t('vehicleProps:value.wltpWeightedPowerCombined', { consumption: wltpWeightedPowerCombined.toLocaleString(language), unit: translatedUnit })
278
- : null;
279
- const wltpWeightedCombinedContent = Number.isFinite(wltpWeightedCombined)
280
- ? t('vehicleProps:value.wltpWeightedCombined', { consumption: wltpWeightedCombined.toLocaleString(language), unit: translatedUnit })
281
- : 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 });
282
238
  const wltpConsumptionPowerCombinedContent = wltpConsumptionPowerCombined
283
239
  ? t('vehicleProps:value.wltpPowerCombined', { consumption: wltpConsumptionPowerCombined.toLocaleString(language), unit: translatedUnit })
284
240
  : null;
@@ -289,10 +245,6 @@ const getDecoratedLightProps = (
289
245
 
290
246
  const co2 = car.environmentEmissions.co2;
291
247
  const wltpCo2 = car.environmentEmissions.wltpCo2;
292
- const wltpEnergyEfficiencyClass = car.environmentEmissions.wltpEnergyEfficiencyClass;
293
- const co2ClassValue = isPropDefined(wltpEnergyEfficiencyClass)
294
- ? t('vehicleProps:value.co2Class', { class: t(`cbd:${wltpEnergyEfficiencyClass}`) })
295
- : null;
296
248
 
297
249
  const co2Value = Number.isFinite(co2)
298
250
  ? t('vehicleProps:value.co2Combined', { co2: co2.toLocaleString(language) })
@@ -306,42 +258,14 @@ const getDecoratedLightProps = (
306
258
  ? t('vehicleProps:value.wltpCo2WtdCombined', { co2: wltpCo2.toLocaleString(language), unit: translatedUnit })
307
259
  : null;
308
260
 
309
- // ADV-88: "is a hybrid car" is now determined by fuel type (hybrid electric + diesel/petrol),
310
- // not engineData.hybridPlugin.
311
- const hybridPlugin = car.consumption.fuel === 'selector_fuel_hybridElectricalDiesel'
312
- || car.consumption.fuel === 'selector_fuel_hybridElectricalPetrol';
261
+ const hybridPlugin = car.engineData.hybridPlugin;
313
262
 
314
- // ADV-88: the weighted+discharged (entladen) consumption treatment is shown for ANY plug-in
315
- // hybrid (new or used) — gated on hybridPlugin only, no condition check.
316
263
  if (hybridPlugin) {
317
- if (wltpWeightedPowerCombinedContent && wltpWeightedCombinedContent) {
318
- const dischargedCombined = Number.isFinite(wltpConsumptionCombined) ? wltpConsumptionCombined : 19.9;
319
- const dischargedClass = car.environmentEmissions.wltpDischargedEnergyEfficiencyClass || 'selector_energyEfficiencyClass_g';
320
- const weightedCombinedLabeled = t('vehicleProps:value.wltpWeightedCombinedLabel', { consumption: wltpWeightedCombined.toLocaleString(language), unit: translatedUnit });
321
- const dischargedCombinedLabeled = t('vehicleProps:value.wltpDischargedCombinedLabel', { consumption: dischargedCombined.toLocaleString(language), unit: translatedUnit });
322
- const co2WeightedContent = Number.isFinite(wltpCo2)
323
- ? t('vehicleProps:value.wltpCo2WtdCombinedShort', { co2: wltpCo2.toLocaleString(language) })
324
- : null;
325
- const co2ClassWeighted = isPropDefined(wltpEnergyEfficiencyClass)
326
- ? t('vehicleProps:value.co2ClassWeighted', { class: t(`cbd:${wltpEnergyEfficiencyClass}`) })
327
- : null;
328
- const co2ClassDischarged = t('vehicleProps:value.co2ClassDischarged', { class: t(`cbd:${dischargedClass}`) });
329
- return <React.Fragment>
330
- {`${wltpWeightedPowerCombinedContent} + `}
331
- {`${weightedCombinedLabeled}, `}
332
- {`${dischargedCombinedLabeled}`}
333
- {co2WeightedContent && <>, {co2WeightedContent}</>}
334
- {co2ClassWeighted && <>, {co2ClassWeighted}</>}
335
- {<>, {co2ClassDischarged}</>}
336
- </React.Fragment>
337
- }
338
-
339
264
  if (wltpWeightedPowerCombinedContent && wltpWeightedCombinedContent && wltpCo2PluginValue) {
340
265
  return <React.Fragment>
341
266
  {`${wltpWeightedPowerCombinedContent}, `}
342
267
  {`${wltpWeightedCombinedContent}, `}
343
268
  {wltpCo2PluginValue}
344
- {co2ClassValue && <>, {co2ClassValue}</>}
345
269
  </React.Fragment>
346
270
  }
347
271
  }
@@ -351,14 +275,12 @@ const getDecoratedLightProps = (
351
275
  {`${wltpConsumptionPowerCombinedContent}, `}
352
276
  {`${wltpWeightedCombinedContent}, `}
353
277
  {wltpCo2PluginValue}
354
- {co2ClassValue && <>, {co2ClassValue}</>}
355
278
  </React.Fragment>
356
279
  }
357
280
 
358
281
  return Number.isFinite(consumptionCombined) || Number.isFinite(consumptionPowerCombined)
359
282
  ? <React.Fragment>
360
283
  {consumptionPowerCombined ? consumptionPowerCombinedContent : t('vehicleProps:value.na')} <br />{consumptionCombinedContent} <br /> {co2Value}
361
- {co2ClassValue && <>, {co2ClassValue}</>}
362
284
  </React.Fragment>
363
285
  : t('vehicleProps:value.na');
364
286
  }
@@ -375,10 +297,6 @@ const getDecoratedLightProps = (
375
297
  const co2 = car.environmentEmissions.co2;
376
298
  const wltpConsumptionCombined = car.consumption.wltpCombined;
377
299
  const wltpCo2 = car.environmentEmissions.wltpCo2;
378
- const wltpEnergyEfficiencyClass = car.environmentEmissions.wltpEnergyEfficiencyClass;
379
- const co2ClassValue = isPropDefined(wltpEnergyEfficiencyClass)
380
- ? t('vehicleProps:value.co2Class', { class: t(`cbd:${wltpEnergyEfficiencyClass}`) })
381
- : null;
382
300
 
383
301
  const consumptionValue = Number.isFinite(consumptionHydrogenCombined)
384
302
  ? t('vehicleProps:value.consumptionGas', { consumption: consumptionHydrogenCombined.toLocaleString(language), unit: translatedUnit })
@@ -396,10 +314,10 @@ const getDecoratedLightProps = (
396
314
  : null;
397
315
 
398
316
  if (wltpConsumptionValue && wltpCo2Value) {
399
- return <>{wltpConsumptionValue}, {wltpCo2Value}{co2ClassValue && <>, {co2ClassValue}</>}</>;
317
+ return <>{wltpConsumptionValue}, {wltpCo2Value}</>;
400
318
  }
401
319
 
402
- return <>{consumptionValue} <br /> {co2Value}{co2ClassValue && <>, {co2ClassValue}</>}</>;
320
+ return <>{consumptionValue} <br /> {co2Value}</>;
403
321
  }
404
322
  },
405
323
  consumptionGasCombinedAlternateView: {
@@ -413,10 +331,6 @@ const getDecoratedLightProps = (
413
331
  const co2 = car.environmentEmissions.co2;
414
332
  const wltpConsumptionCombined = car.consumption.wltpCombined;
415
333
  const wltpCo2 = car.environmentEmissions.wltpCo2;
416
- const wltpEnergyEfficiencyClass = car.environmentEmissions.wltpEnergyEfficiencyClass;
417
- const co2ClassValue = isPropDefined(wltpEnergyEfficiencyClass)
418
- ? t('vehicleProps:value.co2Class', { class: t(`cbd:${wltpEnergyEfficiencyClass}`) })
419
- : null;
420
334
 
421
335
  const consumptionValue = Number.isFinite(consumptionGasCombined)
422
336
  ? t('vehicleProps:value.consumptionGas', { consumption: consumptionGasCombined.toLocaleString(language), unit: translatedUnit })
@@ -435,10 +349,10 @@ const getDecoratedLightProps = (
435
349
  : null;
436
350
 
437
351
  if (wltpConsumptionValue && wltpCo2Value) {
438
- return <>{wltpConsumptionValue}, {wltpCo2Value}{co2ClassValue && <>, {co2ClassValue}</>}</>;
352
+ return <>{wltpConsumptionValue}, {wltpCo2Value}</>;
439
353
  }
440
354
 
441
- return <>{consumptionValue} <br /> {co2Value}{co2ClassValue && <>, {co2ClassValue}</>}</>;
355
+ return <>{consumptionValue} <br /> {co2Value}</>;
442
356
  }
443
357
  },
444
358
  consumptionCombinedDealer: {
@@ -450,7 +364,6 @@ const getDecoratedLightProps = (
450
364
  const translatedUnit = t(`cbd:${consumptionUnit}`);
451
365
 
452
366
  const co2 = car.environmentEmissions.co2;
453
- const wltpEnergyEfficiencyClass = car.environmentEmissions.wltpEnergyEfficiencyClass;
454
367
 
455
368
  const consumptionValue = Number.isFinite(consumptionCombined)
456
369
  ? t('vehicleProps:value.consumptionCombined', { consumption: consumptionCombined.toLocaleString(language), unit: translatedUnit })
@@ -460,11 +373,7 @@ const getDecoratedLightProps = (
460
373
  ? t('vehicleProps:value.co2Combined', { co2: co2.toLocaleString(language) })
461
374
  : t('vehicleProps:value.na');
462
375
 
463
- const co2ClassValue = isPropDefined(wltpEnergyEfficiencyClass)
464
- ? t('vehicleProps:value.co2Class', { class: t(`cbd:${wltpEnergyEfficiencyClass}`) })
465
- : null;
466
-
467
- return <>{consumptionValue} | {co2Value}{co2ClassValue ? <> | {co2ClassValue}</> : null}</>;
376
+ return <>{consumptionValue} | {co2Value}</>;
468
377
  }
469
378
  },
470
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,49 +850,13 @@ 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
- // ADV-88: "is a hybrid car" is now determined by fuel type (hybrid electric + diesel/petrol),
878
- // not engineData.hybridPlugin.
879
- const hybridPlugin = car.consumption.fuel === 'selector_fuel_hybridElectricalDiesel'
880
- || car.consumption.fuel === 'selector_fuel_hybridElectricalPetrol';
881
-
882
- // ADV-88: ANY hybrid car (new or used) shows both weighted (gew., komb) and discharged
883
- // (entladen, komb) fuel consumption + a discharged CO2 class.
884
- if (hybridPlugin && wltpConsumptionWeightedPowerCombinedContent && wltpConsumptionWeightedCombinedContent) {
885
- const ADV88_DEFAULT_DISCHARGED_COMBINED = 19.9;
886
- const ADV88_DEFAULT_DISCHARGED_CO2_CLASS = 'selector_energyEfficiencyClass_g';
887
-
888
- const dischargedCombined = Number.isFinite(wltpCombined) ? wltpCombined : ADV88_DEFAULT_DISCHARGED_COMBINED;
889
- const dischargedClass = car.environmentEmissions.wltpDischargedEnergyEfficiencyClass || ADV88_DEFAULT_DISCHARGED_CO2_CLASS;
890
-
891
- const weightedCombinedLabeled = t('vehicleProps:value.wltpWeightedCombinedLabel', { consumption: wltpWeightedCombined.toLocaleString(language), unit: translatedUnit });
892
- const dischargedCombinedLabeled = t('vehicleProps:value.wltpDischargedCombinedLabel', { consumption: dischargedCombined.toLocaleString(language), unit: translatedUnit });
893
- const co2WeightedContent = Number.isFinite(wltpCo2)
894
- ? t('vehicleProps:value.wltpCo2WtdCombinedShort', { co2: wltpCo2.toLocaleString(language) })
895
- : null;
896
- const co2ClassWeighted = isPropDefined(wltpEnergyEfficiencyClass)
897
- ? t('vehicleProps:value.co2ClassWeighted', { class: t(`cbd:${wltpEnergyEfficiencyClass}`) })
898
- : null;
899
- const co2ClassDischarged = t('vehicleProps:value.co2ClassDischarged', { class: t(`cbd:${dischargedClass}`) });
900
-
901
- return <React.Fragment>
902
- {wrapValue(wltpConsumptionWeightedPowerCombinedContent)}{' + '}
903
- {wrapValue(weightedCombinedLabeled)}{', '}
904
- {wrapValue(dischargedCombinedLabeled)}
905
- {co2WeightedContent && <>{', '}{wrapValue(co2WeightedContent)}</>}
906
- {co2ClassWeighted && <>{', '}{co2ClassWeighted}</>}
907
- {', '}{co2ClassDischarged}
908
- </React.Fragment>
909
- }
853
+ const hybridPlugin = car.engineData.hybridPlugin;
910
854
 
911
855
  if (hybridPlugin && wltpConsumptionWeightedPowerCombinedContent && wltpConsumptionWeightedCombinedContent) {
912
856
  return <React.Fragment>
913
857
  {wrapValue(wltpConsumptionWeightedPowerCombinedContent)}{', '}
914
858
  {wrapValue(wltpConsumptionWeightedCombinedContent)}{', '}
915
859
  {wrapValue(wltpCo2PluginValue)}
916
- {co2ClassValue && <><br />{co2ClassValue}</>}
917
860
  </React.Fragment>
918
861
  }
919
862
 
@@ -921,7 +864,6 @@ const getDecoratedProps = (
921
864
  return <React.Fragment>
922
865
  {wrapValue(wltpConsumptionCombinedContent)}{', '}
923
866
  {wrapValue(wltpCo2Value)}
924
- {co2ClassValue && <><br />{co2ClassValue}</>}
925
867
  </React.Fragment>
926
868
  }
927
869
 
@@ -931,7 +873,6 @@ const getDecoratedProps = (
931
873
  {consumptionPowerCombined && hybridPlugin ? <br /> : ''}
932
874
  {wrapValue(consumptionCombinedContent)} <br />
933
875
  {wrapValue(co2Value)}
934
- {co2ClassValue && <><br />{co2ClassValue}</>}
935
876
  </React.Fragment>
936
877
  : t('vehicleProps:value.na');
937
878
  }
@@ -26,11 +26,9 @@ const fuel = ['fuel'];
26
26
  const otherData = ['powerAlternateView', 'torque', 'acceleration', 'topSpeed', 'transmission', 'driveType'];
27
27
  const otherDataLast = ['hsn', 'tsn'];
28
28
  const offerAvailability = ['offerAvailability'];
29
- // ADV-70: the CDP "Überblick" (Overview) no longer shows the availability ("Sofort"/"Now")
30
- // row — offerAvailability stays available for the SRL/landing cards via getMainPropertiesForSRL.
31
29
  const mainPropertiesList = [
32
30
  'mileage', 'firstRegistration', 'numberOfPreviousOwners', 'doorsOnly',
33
- 'usageType', 'gearbox', 'power', 'driveType', 'accidentDamaged', 'fuel'
31
+ 'usageType', 'gearbox', 'power', 'driveType', 'accidentDamaged', 'fuel', ...offerAvailability
34
32
  ];
35
33
  const comparableList = ['firstRegistration', 'mileage', 'gearbox'];
36
34
  const landingList = ['mileage', 'gearbox', 'fuel'];
@@ -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.',
@@ -50,9 +48,8 @@ export const vehicleProps = (car?: any, isOfferAvailable: boolean = true) => {
50
48
  onRequest: "Auf Anfrage",
51
49
  mileage: `${vehicleOption.mileage} km`,
52
50
  consumption: `${vehicleOption.consumptionCombined}l/100km`,
53
- // ADV-88: guard against null/undefined so we never render "nullkWh/100km".
54
- consumptionPower: vehicleOption.consumptionPowerCombined != null ? `${vehicleOption.consumptionPowerCombined}kWh/100km` : '',
55
- consumptionPowerCombined: vehicleOption.consumptionPowerCombined != null ? `${vehicleOption.consumptionPowerCombined}kWh/100km` : '',
51
+ consumptionPower: `${vehicleOption.consumptionPowerCombined}kWh/100km`,
52
+ consumptionPowerCombined: `${vehicleOption.consumptionPowerCombined}kWh/100km`,
56
53
  consumptionGas: `${vehicleOption.consumptionCombined}kg/100km`,
57
54
  consumptionCombined: `${vehicleOption.consumptionCombined}l/100km`,
58
55
  wltpConsumptionCombined: `${vehicleOption.wltpCombined}l/100km`,
@@ -62,7 +59,6 @@ export const vehicleProps = (car?: any, isOfferAvailable: boolean = true) => {
62
59
  deliveryPeriodMonths: `${Math.round(monthsTo)} Monat\nab Bestellung`,
63
60
  deliveryPeriodDays: `${count} Tag\nab Bestellung`,
64
61
  co2Combined: `${vehicleOption.co2}g CO2/km (komb)*`,
65
- co2Class: `CO2-Klasse ${(cbd.cbd as any)[vehicleOption.wltpEnergyEfficiencyClass] || vehicleOption.wltpEnergyEfficiencyClass || ''} (komb)`,
66
62
  co2: `${vehicleOption.co2} g/km `,
67
63
  na: 'N/A',
68
64
  priceSub: '/mtl.',
@@ -97,13 +93,7 @@ export const vehicleProps = (car?: any, isOfferAvailable: boolean = true) => {
97
93
  wltpWeightedCombined: `${getFormattedNumber(vehicleOption.wltpWeightedCombined)}l/100km`,
98
94
  wltpWeightedPowerCombined: `${getFormattedNumber(vehicleOption.wltpWeightedPowerCombined)}kWh/100km`,
99
95
  wltpPowerCombined: `${getFormattedNumber(vehicleOption.wltpPowerCombined)}kWh/100km`,
100
- wltpCombinedGas: `${getFormattedNumber(vehicleOption.wltpCombined)}kg/100km`,
101
- // ADV-88: labelled weighted/discharged consumption + both CO2 classes for new plug-in hybrids.
102
- wltpWeightedCombinedLabel: `${getFormattedNumber(vehicleOption.wltpWeightedCombined)}l/100km (gew., komb)`,
103
- wltpDischargedCombinedLabel: `${getFormattedNumber(vehicleOption.wltpCombined != null ? vehicleOption.wltpCombined : 19.9)}l/100km (entladen, komb)`,
104
- wltpCo2WtdCombinedShort: `${getFormattedNumber(vehicleOption.wltpCo2)}g CO2/km (gew., komb)*`,
105
- co2ClassWeighted: `CO2-Klasse ${(cbd.cbd as any)[vehicleOption.wltpEnergyEfficiencyClass] || vehicleOption.wltpEnergyEfficiencyClass || ''} (gew., komb)`,
106
- co2ClassDischarged: `CO2-Klasse ${(cbd.cbd as any)[vehicleOption.wltpDischargedEnergyEfficiencyClass || 'selector_energyEfficiencyClass_g'] || ''} (entladen, komb)`
96
+ wltpCombinedGas: `${getFormattedNumber(vehicleOption.wltpCombined)}kg/100km`
107
97
  },
108
98
  title: {
109
99
  'addOfferToMainSlide': 'Zum Schieberegler hinzufügen',
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" />