@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
package/package.json.bak
CHANGED
|
@@ -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
|
|
72
|
-
//
|
|
73
|
-
//
|
|
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
|
|
160
|
-
|
|
161
|
-
|
|
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'
|