@bytebrand/fe-ui-core 4.8.107 → 4.8.109

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bytebrand/fe-ui-core",
3
- "version": "4.8.107",
3
+ "version": "4.8.109",
4
4
  "description": "UI components for the auto.de project",
5
5
  "main": "index.ts",
6
6
  "module": "dist/common.js",
package/package.json.bak CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bytebrand/fe-ui-core",
3
- "version": "4.8.107",
3
+ "version": "4.8.109",
4
4
  "description": "UI components for the auto.de project",
5
5
  "main": "index.ts",
6
6
  "module": "dist/common.js",
@@ -68,10 +68,10 @@ class AccordionWidget extends React.Component<IAccardionSectionProps> {
68
68
  const decoratedProp = decoratedProps[prop];
69
69
  if (!decoratedProp) return false;
70
70
  const { value, isVisible = true } = decoratedProp;
71
- // ADV-70 exception: the CO2 emission fields (environmentEmissions.co2 / wltpCo2) must ALWAYS
72
- // be shown — even when 0 — because 0 g CO2/km is a real, legally-relevant value, so they
73
- // bypass the N/A/0 hide rule.
74
- const alwaysShow = prop === 'co2' || prop === 'wltpCo2';
71
+ // ADV-70 exception: the CO2 emission fields must ALWAYS be shown — even when 0 — because
72
+ // 0 g CO2/km is a real, legally-relevant value, so they bypass the N/A/0 hide rule.
73
+ // NOTE: the environment table's prop key is 'c02' (with a ZERO, see vehicleDetails.ts), not 'co2'.
74
+ const alwaysShow = prop === 'co2' || prop === 'c02' || prop === 'wltpCo2';
75
75
  return isVisible && (alwaysShow || !this.isHiddenSpecValue(value));
76
76
  });
77
77
 
@@ -156,9 +156,9 @@ const VehicleSmallCard: FunctionComponent<IVehicleSmallCardProps> = (props) => {
156
156
  // line — externalise it to a full-width row so it doesn't overflow the narrow info column. Gated
157
157
  // on hybridPlugin only, no condition check.
158
158
  // ADV-88: "is a hybrid car" is determined by fuel type (hybrid electric + diesel/petrol), not hybridPlugin.
159
- const isPlugin = !!consumption
160
- && (consumption.fuel === 'selector_fuel_hybridElectricalDiesel'
161
- || consumption.fuel === 'selector_fuel_hybridElectricalPetrol');
159
+ const cardFuel = consumption ? (consumption as any).fuel : undefined;
160
+ const isPlugin = cardFuel === 'selector_fuel_hybridElectricalDiesel'
161
+ || cardFuel === 'selector_fuel_hybridElectricalPetrol';
162
162
  const externalizeConsumption = isPlugin
163
163
  && (vehicleComponentName === 'landing' || vehicleComponentName === 'main'
164
164
  || vehicleComponentName === 'search' || vehicleComponentName === 'comparable'