@bytebrand/fe-ui-core 4.6.10 → 4.6.12
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/source/components/VehicleSmallCard/VehicleData/VehicleInfo/VehicleInfo.tsx +2 -2
- package/source/framework/vehiclesProps/decoratedLightProps.tsx +1 -1
- package/source/framework/vehiclesProps/decoratedProps.tsx +26 -11
- package/source/framework/vehiclesProps/vehicleDetails.ts +4 -4
package/package.json
CHANGED
|
@@ -85,8 +85,8 @@ const VehicleInfo: React.FC<IVehicleInfoProps> = (props) => {
|
|
|
85
85
|
description: decoratedProps[prop].value,
|
|
86
86
|
className: styles[decoratedProps[prop].name],
|
|
87
87
|
classNameIcon: (vehicleComponentName === 'search' || 'myVehicles' || 'favorite' || 'recently') && styles.carIconSearch,
|
|
88
|
-
smalltext: prop === 'consumptionCombinedAlternateView',
|
|
89
|
-
hybridPlugin: engineData.hybridPlugin
|
|
88
|
+
smalltext: prop === ('consumptionCombinedAlternateView' || prop === 'consumptionHydrogenCombinedAlternateView') && vehicleComponentName !== 'search',
|
|
89
|
+
hybridPlugin: engineData.hybridPlugin && prop === 'consumptionCombinedAlternateView' && vehicleComponentName !== 'search'
|
|
90
90
|
}));
|
|
91
91
|
|
|
92
92
|
return mainPropertiesList.map((property: any, index: number) => (
|
|
@@ -115,7 +115,7 @@ const getDecoratedLightProps = (
|
|
|
115
115
|
const consumptionCombined = car.consumption.consumptionCombined;
|
|
116
116
|
const consumptionUnit = car.consumption.consumptionUnit || 'consumption_consumptionUnit_l';
|
|
117
117
|
const translatedUnit = t(`cbd:${consumptionUnit}`);
|
|
118
|
-
const wltpConsumptionCombined = car.consumption.wltpCombined;
|
|
118
|
+
const wltpConsumptionCombined = car.consumption.wltpCombined || car.consumption.wltpWeightedCombined;
|
|
119
119
|
const wltpCo2 = car.environmentEmissions.wltpCo2 || car.consumption.wltpCo2;
|
|
120
120
|
|
|
121
121
|
const co2 = car.environmentEmissions.co2;
|
|
@@ -814,18 +814,27 @@ const getDecoratedProps = (
|
|
|
814
814
|
get value() {
|
|
815
815
|
const consumptionCombined = +car.consumption.consumptionCombined;
|
|
816
816
|
const consumptionPowerCombined = +car.consumption.consumptionPowerCombined;
|
|
817
|
-
const
|
|
817
|
+
// const wltpPowerCombined = car.consumption.wltpPowerCombined || car.consumption.wltpWeightedPowerCombined;
|
|
818
|
+
const wltpCombined = car.consumption.wltpCombined || car.consumption.wltpWeightedCombined;
|
|
818
819
|
const wltpWeightedCombined = car.consumption.wltpWeightedCombined;
|
|
820
|
+
const wltpWeightedPowerCombined = car.consumption.wltpWeightedPowerCombined;
|
|
819
821
|
|
|
820
822
|
const consumptionUnit = car.consumption.consumptionUnit || 'consumption_consumptionUnit_l';
|
|
821
823
|
const translatedUnit = t(`cbd:${consumptionUnit}`);
|
|
822
824
|
|
|
823
825
|
const consumptionPowerCombinedContent = t('vehicleProps:value.consumptionPowerCombined', { consumption: consumptionPowerCombined.toLocaleString(language), unit: translatedUnit });
|
|
824
|
-
const wltpConsumptionPowerCombinedContent =
|
|
826
|
+
// const wltpConsumptionPowerCombinedContent = wltpPowerCombined
|
|
827
|
+
// ? t('vehicleProps:value.consumptionPowerCombined', { consumption: wltpPowerCombined.toLocaleString(language), unit: translatedUnit })
|
|
828
|
+
// : null;
|
|
829
|
+
|
|
830
|
+
const wltpConsumptionWeightedPowerCombinedContent = wltpWeightedPowerCombined
|
|
825
831
|
? t('vehicleProps:value.consumptionPowerCombined', { consumption: wltpWeightedPowerCombined.toLocaleString(language), unit: translatedUnit })
|
|
826
832
|
: null;
|
|
827
833
|
const consumptionCombinedContent = t('vehicleProps:value.consumptionCombined', { consumption: consumptionCombined.toLocaleString(language), unit: translatedUnit });
|
|
828
|
-
const wltpConsumptionCombinedContent =
|
|
834
|
+
const wltpConsumptionCombinedContent = wltpCombined ?
|
|
835
|
+
t('vehicleProps:value.consumptionCombined', { consumption: wltpCombined.toLocaleString(language), unit: translatedUnit })
|
|
836
|
+
: null;
|
|
837
|
+
const wltpConsumptionWeightedCombinedContent = wltpWeightedCombined ?
|
|
829
838
|
t('vehicleProps:value.consumptionCombined', { consumption: wltpWeightedCombined.toLocaleString(language), unit: translatedUnit })
|
|
830
839
|
: null;
|
|
831
840
|
|
|
@@ -842,12 +851,18 @@ const getDecoratedProps = (
|
|
|
842
851
|
: null;
|
|
843
852
|
const hybridPlugin = car.engineData.hybridPlugin;
|
|
844
853
|
|
|
854
|
+
if (hybridPlugin && wltpConsumptionWeightedPowerCombinedContent && wltpConsumptionWeightedCombinedContent) {
|
|
855
|
+
return <React.Fragment>
|
|
856
|
+
{wrapValue(wltpConsumptionWeightedPowerCombinedContent)}{', '}
|
|
857
|
+
{wrapValue(wltpConsumptionWeightedCombinedContent)}{', '}
|
|
858
|
+
{wrapValue(wltpCo2PluginValue)}
|
|
859
|
+
</React.Fragment>
|
|
860
|
+
}
|
|
861
|
+
|
|
845
862
|
if (wltpConsumptionCombinedContent && wltpCo2Value) {
|
|
846
863
|
return <React.Fragment>
|
|
847
|
-
{wltpConsumptionPowerCombinedContent && hybridPlugin ? wrapValue(wltpConsumptionPowerCombinedContent) : ''}
|
|
848
|
-
{wltpConsumptionPowerCombinedContent && hybridPlugin ? ', ' : ''}
|
|
849
864
|
{wrapValue(wltpConsumptionCombinedContent)}{', '}
|
|
850
|
-
{
|
|
865
|
+
{wrapValue(wltpCo2Value)}
|
|
851
866
|
</React.Fragment>
|
|
852
867
|
}
|
|
853
868
|
|
|
@@ -1469,7 +1484,7 @@ const getDecoratedProps = (
|
|
|
1469
1484
|
}
|
|
1470
1485
|
},
|
|
1471
1486
|
wltpPowerCombinedPlugin: {
|
|
1472
|
-
title: t('vehicleProps:title.
|
|
1487
|
+
title: t('vehicleProps:title.wltpPowerCombined'),
|
|
1473
1488
|
get value() {
|
|
1474
1489
|
const wltpPowerCombined = car.consumption.wltpPowerCombined;
|
|
1475
1490
|
const consumptionUnit = car.consumption.consumptionUnit || 'consumption_consumptionUnit_l';
|
|
@@ -1480,7 +1495,7 @@ const getDecoratedProps = (
|
|
|
1480
1495
|
}
|
|
1481
1496
|
},
|
|
1482
1497
|
wltpPowerSlowPlugin: {
|
|
1483
|
-
title: t('vehicleProps:title.
|
|
1498
|
+
title: t('vehicleProps:title.wltpPowerSlow'),
|
|
1484
1499
|
get value() {
|
|
1485
1500
|
const wltpPowerSlow = car.consumption.wltpPowerSlow;
|
|
1486
1501
|
const consumptionUnit = car.consumption.consumptionUnit || 'consumption_consumptionUnit_l';
|
|
@@ -1491,7 +1506,7 @@ const getDecoratedProps = (
|
|
|
1491
1506
|
}
|
|
1492
1507
|
},
|
|
1493
1508
|
wltpPowerMediumPlugin: {
|
|
1494
|
-
title: t('vehicleProps:title.
|
|
1509
|
+
title: t('vehicleProps:title.wltpPowerMedium'),
|
|
1495
1510
|
get value() {
|
|
1496
1511
|
const wltpPowerMedium = car.consumption.wltpPowerMedium;
|
|
1497
1512
|
const consumptionUnit = car.consumption.consumptionUnit || 'consumption_consumptionUnit_l';
|
|
@@ -1502,7 +1517,7 @@ const getDecoratedProps = (
|
|
|
1502
1517
|
}
|
|
1503
1518
|
},
|
|
1504
1519
|
wltpPowerFastPlugin: {
|
|
1505
|
-
title: t('vehicleProps:title.
|
|
1520
|
+
title: t('vehicleProps:title.wltpPowerFast'),
|
|
1506
1521
|
get value() {
|
|
1507
1522
|
const wltpPowerFast = car.consumption.wltpPowerFast;
|
|
1508
1523
|
const consumptionUnit = car.consumption.consumptionUnit || 'consumption_consumptionUnit_l';
|
|
@@ -1513,7 +1528,7 @@ const getDecoratedProps = (
|
|
|
1513
1528
|
}
|
|
1514
1529
|
},
|
|
1515
1530
|
wltpPowerVeryFastPlugin: {
|
|
1516
|
-
title: t('vehicleProps:title.
|
|
1531
|
+
title: t('vehicleProps:title.wltpPowerVeryFast'),
|
|
1517
1532
|
get value() {
|
|
1518
1533
|
const wltpPowerVeryFast = car.consumption.wltpPowerVeryFast;
|
|
1519
1534
|
const consumptionUnit = car.consumption.consumptionUnit || 'consumption_consumptionUnit_l';
|
|
@@ -44,7 +44,7 @@ const environmentElectroWLTP = ['wltpPowerCombined', 'wltpCo2', 'wltpRange', 'wl
|
|
|
44
44
|
'wltpPowerFast', 'wltpPowerVeryFast', 'powerPrice', 'consumptionPriceYear', 'wltpEnergyEfficiencyClass'];
|
|
45
45
|
const environmentPluginHybridWLTP = ['wltpWeightedCombined', 'wltpTotalRange', 'wltpWeightedPowerCombined', 'wltpCo2Plugin',
|
|
46
46
|
'wltpCo2Discharged', 'wltpPowerCombinedPlugin', 'wltpPowerSlowPlugin', 'wltpPowerMediumPlugin', 'wltpPowerFastPlugin', 'wltpPowerVeryFastPlugin',
|
|
47
|
-
'wltpCombinedPlugin', 'wltpSlowPlugin', 'wltpMediumPlugin', 'wltpFastPlugin', '
|
|
47
|
+
'wltpCombinedPlugin', 'wltpSlowPlugin', 'wltpMediumPlugin', 'wltpFastPlugin', 'wltpVeryFastPlugin',
|
|
48
48
|
'fuelPrice', 'powerPrice', 'consumptionPriceYear', 'wltpEnergyEfficiencyClass'];
|
|
49
49
|
const environmentElectroBenzinDieselEthanolHybridWLTP = ['wltpCombined', 'wltpCo2', 'wltpSlow', 'wltpMedium', 'wltpFast', 'wltpVeryFast', 'fuelPrice', 'consumptionPriceYear', 'wltpEnergyEfficiencyClass'];
|
|
50
50
|
const environmentHydrogenWLTP = ['wltpCombinedGas', 'wltpCo2', 'wltpSlowGas', 'wltpMediumGas', 'wltpFastGas', 'wltpVeryFastGas', 'fuelPrice', 'consumptionPriceYear', 'wltpEnergyEfficiencyClass'];
|
|
@@ -276,13 +276,13 @@ export const wltpDetails = [
|
|
|
276
276
|
]
|
|
277
277
|
},
|
|
278
278
|
{
|
|
279
|
-
selector: '
|
|
279
|
+
selector: 'selector_fuel_hybridElectricalPetrol',
|
|
280
280
|
wltp: [
|
|
281
|
-
...
|
|
281
|
+
...environmentElectroBenzinDieselEthanolHybridWLTP
|
|
282
282
|
]
|
|
283
283
|
},
|
|
284
284
|
{
|
|
285
|
-
selector: '
|
|
285
|
+
selector: 'selector_fuel_hybridElectricalDiesel',
|
|
286
286
|
wltp: [
|
|
287
287
|
...environmentElectroBenzinDieselEthanolHybridWLTP
|
|
288
288
|
]
|