@bytebrand/fe-ui-core 4.8.106 → 4.8.107
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/package.json.bak +1 -1
- package/source/components/AccordionWidget/AccordionWidget.tsx +3 -1
- package/source/components/VehicleSmallCard/VehicleData/VehicleInfo/VehicleInfo.tsx +4 -2
- package/source/components/VehicleSmallCard/VehicleSmallCard.tsx +4 -1
- package/source/framework/vehiclesProps/decoratedLightProps.tsx +8 -2
- package/source/framework/vehiclesProps/decoratedProps.tsx +6 -3
package/package.json
CHANGED
package/package.json.bak
CHANGED
|
@@ -133,7 +133,9 @@ class AccordionWidget extends React.Component<IAccardionSectionProps> {
|
|
|
133
133
|
const { consumption } = car;
|
|
134
134
|
// ADV-88: ANY plug-in hybrid (new or used) gets the long weighted+discharged line and the
|
|
135
135
|
// full-width treatment. Gated on hybridPlugin only, no condition check.
|
|
136
|
-
|
|
136
|
+
// ADV-88: "is a hybrid car" is determined by fuel type (hybrid electric + diesel/petrol), not hybridPlugin.
|
|
137
|
+
const isPluginHybrid = consumption.fuel === 'selector_fuel_hybridElectricalDiesel'
|
|
138
|
+
|| consumption.fuel === 'selector_fuel_hybridElectricalPetrol';
|
|
137
139
|
const mainPropertiesList = getOverviewDetails(consumption.fuel);
|
|
138
140
|
const mainProperties = mainPropertiesList.map((prop: string) => {
|
|
139
141
|
const isConsumptionAlternateView = prop.startsWith('consumption') && prop.endsWith('AlternateView');
|
|
@@ -84,7 +84,9 @@ const VehicleInfo: React.FC<IVehicleInfoProps> = (props) => {
|
|
|
84
84
|
|
|
85
85
|
// ADV-88: ANY plug-in hybrid (new or used) carries the long weighted+discharged consumption/CO2
|
|
86
86
|
// line — render it full-width. Gated on hybridPlugin only, no condition check.
|
|
87
|
-
|
|
87
|
+
// ADV-88: "is a hybrid car" is determined by fuel type (hybrid electric + diesel/petrol), not hybridPlugin.
|
|
88
|
+
const isPluginHybrid = consumption.fuel === 'selector_fuel_hybridElectricalDiesel'
|
|
89
|
+
|| consumption.fuel === 'selector_fuel_hybridElectricalPetrol';
|
|
88
90
|
const decoratedProps = getDecoratedProps(dataDecoratedProps, t, language);
|
|
89
91
|
const renderProperty = (renderProperties: any, vehicleComponentName?: any) => {
|
|
90
92
|
const mainPropertiesList = renderProperties(dataDecoratedProps.consumption.fuel, combineRefAlternative)
|
|
@@ -100,7 +102,7 @@ const VehicleInfo: React.FC<IVehicleInfoProps> = (props) => {
|
|
|
100
102
|
className: classnames(styles[decoratedProps[prop].name], { [styles.pluginFullWidth]: isConsumption && isPluginHybrid }),
|
|
101
103
|
classNameIcon: (vehicleComponentName === 'search' || 'myVehicles' || 'favorite' || 'recently') && styles.carIconSearch,
|
|
102
104
|
smalltext: isConsumption && (vehicleComponentName !== 'search'),
|
|
103
|
-
hybridPlugin:
|
|
105
|
+
hybridPlugin: isPluginHybrid && isConsumption && vehicleComponentName !== 'search'
|
|
104
106
|
};
|
|
105
107
|
});
|
|
106
108
|
|
|
@@ -155,7 +155,10 @@ const VehicleSmallCard: FunctionComponent<IVehicleSmallCardProps> = (props) => {
|
|
|
155
155
|
// ADV-88: ANY plug-in hybrid (new or used) carries the long weighted+discharged consumption/CO2
|
|
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
162
|
const externalizeConsumption = isPlugin
|
|
160
163
|
&& (vehicleComponentName === 'landing' || vehicleComponentName === 'main'
|
|
161
164
|
|| vehicleComponentName === 'search' || vehicleComponentName === 'comparable'
|
|
@@ -150,7 +150,10 @@ const getDecoratedLightProps = (
|
|
|
150
150
|
? t('vehicleProps:value.co2Combined', { co2: co2.toLocaleString(language) })
|
|
151
151
|
: t('vehicleProps:value.na');
|
|
152
152
|
|
|
153
|
-
|
|
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';
|
|
154
157
|
const wltpWeightedPowerCombined = car.consumption.wltpWeightedPowerCombined;
|
|
155
158
|
const wltpWeightedCombined = car.consumption.wltpWeightedCombined;
|
|
156
159
|
|
|
@@ -303,7 +306,10 @@ const getDecoratedLightProps = (
|
|
|
303
306
|
? t('vehicleProps:value.wltpCo2WtdCombined', { co2: wltpCo2.toLocaleString(language), unit: translatedUnit })
|
|
304
307
|
: null;
|
|
305
308
|
|
|
306
|
-
|
|
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';
|
|
307
313
|
|
|
308
314
|
// ADV-88: the weighted+discharged (entladen) consumption treatment is shown for ANY plug-in
|
|
309
315
|
// hybrid (new or used) — gated on hybridPlugin only, no condition check.
|
|
@@ -874,10 +874,13 @@ const getDecoratedProps = (
|
|
|
874
874
|
const co2ClassValue = isPropDefined(wltpEnergyEfficiencyClass)
|
|
875
875
|
? t('vehicleProps:value.co2Class', { class: t(`cbd:${wltpEnergyEfficiencyClass}`) })
|
|
876
876
|
: null;
|
|
877
|
-
|
|
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';
|
|
878
881
|
|
|
879
|
-
// ADV-88: ANY
|
|
880
|
-
// (entladen, komb) fuel consumption + a discharged CO2 class
|
|
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.
|
|
881
884
|
if (hybridPlugin && wltpConsumptionWeightedPowerCombinedContent && wltpConsumptionWeightedCombinedContent) {
|
|
882
885
|
const ADV88_DEFAULT_DISCHARGED_COMBINED = 19.9;
|
|
883
886
|
const ADV88_DEFAULT_DISCHARGED_CO2_CLASS = 'selector_energyEfficiencyClass_g';
|