@bytebrand/fe-ui-core 4.8.35 → 4.8.36
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
|
@@ -680,6 +680,7 @@ 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;
|
|
683
684
|
|
|
684
685
|
const co2 = car.environmentEmissions.co2;
|
|
685
686
|
|
|
@@ -699,11 +700,15 @@ const getDecoratedProps = (
|
|
|
699
700
|
? t('vehicleProps:value.co2Combined', { co2: co2.toLocaleString(language) })
|
|
700
701
|
: t('vehicleProps:value.na');
|
|
701
702
|
|
|
703
|
+
const co2ClassValue = isPropDefined(wltpEnergyEfficiencyClass)
|
|
704
|
+
? t('vehicleProps:value.co2Class', { class: wltpEnergyEfficiencyClass })
|
|
705
|
+
: null;
|
|
706
|
+
|
|
702
707
|
if (wltpConsumptionValue && wltpCo2Value) {
|
|
703
|
-
return <>{wrapValue(wltpConsumptionValue)}, {wrapValue(wltpCo2Value)}</>;
|
|
708
|
+
return <>{wrapValue(wltpConsumptionValue)}, {wrapValue(wltpCo2Value)}{co2ClassValue && <><br />{wrapValue(co2ClassValue)}</>}</>;
|
|
704
709
|
}
|
|
705
710
|
|
|
706
|
-
return <>{wrapValue(consumptionValue)} <br /> {wrapValue(co2Value)}</>;
|
|
711
|
+
return <>{wrapValue(consumptionValue)} <br /> {wrapValue(co2Value)}{co2ClassValue && <><br />{wrapValue(co2ClassValue)}</>}</>;
|
|
707
712
|
}
|
|
708
713
|
},
|
|
709
714
|
consumptionPowerCombinedAlternateView: {
|
|
@@ -716,6 +721,7 @@ const getDecoratedProps = (
|
|
|
716
721
|
const co2 = car.environmentEmissions.co2;
|
|
717
722
|
const wltpConsumptionPowerCombined = car.consumption.wltpPowerCombined;
|
|
718
723
|
const wltpCo2 = car.environmentEmissions.wltpCo2;
|
|
724
|
+
const wltpEnergyEfficiencyClass = car.environmentEmissions.wltpEnergyEfficiencyClass;
|
|
719
725
|
|
|
720
726
|
const wltpConsumptionValue = Number.isFinite(wltpConsumptionPowerCombined)
|
|
721
727
|
? t('vehicleProps:value.consumptionPower', { consumption: wltpConsumptionPowerCombined.toLocaleString(language), unit: translatedUnit })
|
|
@@ -733,11 +739,15 @@ const getDecoratedProps = (
|
|
|
733
739
|
? t('vehicleProps:value.co2Combined', { co2: co2.toLocaleString(language) })
|
|
734
740
|
: t('vehicleProps:value.na');
|
|
735
741
|
|
|
742
|
+
const co2ClassValue = isPropDefined(wltpEnergyEfficiencyClass)
|
|
743
|
+
? t('vehicleProps:value.co2Class', { class: wltpEnergyEfficiencyClass })
|
|
744
|
+
: null;
|
|
745
|
+
|
|
736
746
|
if (wltpConsumptionValue && wltpCo2Value) {
|
|
737
|
-
return <>{wrapValue(wltpConsumptionValue)}, {wrapValue(wltpCo2Value)}</>;
|
|
747
|
+
return <>{wrapValue(wltpConsumptionValue)}, {wrapValue(wltpCo2Value)}{co2ClassValue && <><br />{wrapValue(co2ClassValue)}</>}</>;
|
|
738
748
|
}
|
|
739
749
|
|
|
740
|
-
return <>{wrapValue(consumptionValue)} <br /> {wrapValue(co2Value)}</>;
|
|
750
|
+
return <>{wrapValue(consumptionValue)} <br /> {wrapValue(co2Value)}{co2ClassValue && <><br />{wrapValue(co2ClassValue)}</>}</>;
|
|
741
751
|
}
|
|
742
752
|
},
|
|
743
753
|
consumptionHydrogenCombinedAlternateView: {
|
|
@@ -750,6 +760,7 @@ const getDecoratedProps = (
|
|
|
750
760
|
const translatedUnit = t(`cbd:${consumptionUnit}`);
|
|
751
761
|
const co2 = car.environmentEmissions.co2;
|
|
752
762
|
const wltpCo2 = car.environmentEmissions.wltpCo2;
|
|
763
|
+
const wltpEnergyEfficiencyClass = car.environmentEmissions.wltpEnergyEfficiencyClass;
|
|
753
764
|
|
|
754
765
|
const consumptionValue = Number.isFinite(consumptionHydrogenCombined)
|
|
755
766
|
? t('vehicleProps:value.consumptionGas', { consumption: consumptionHydrogenCombined.toLocaleString(language), unit: translatedUnit })
|
|
@@ -767,11 +778,15 @@ const getDecoratedProps = (
|
|
|
767
778
|
? t('vehicleProps:value.wltpCo2Combined', { co2: wltpCo2.toLocaleString(language) })
|
|
768
779
|
: null;
|
|
769
780
|
|
|
781
|
+
const co2ClassValue = isPropDefined(wltpEnergyEfficiencyClass)
|
|
782
|
+
? t('vehicleProps:value.co2Class', { class: wltpEnergyEfficiencyClass })
|
|
783
|
+
: null;
|
|
784
|
+
|
|
770
785
|
if (wltpConsumptionValue && wltpCo2Value) {
|
|
771
|
-
return <>{wrapValue(wltpConsumptionValue)}, {wrapValue(wltpCo2Value)}</>;
|
|
786
|
+
return <>{wrapValue(wltpConsumptionValue)}, {wrapValue(wltpCo2Value)}{co2ClassValue && <><br />{wrapValue(co2ClassValue)}</>}</>;
|
|
772
787
|
}
|
|
773
788
|
|
|
774
|
-
return <>{wrapValue(consumptionValue)} <br /> {wrapValue(co2Value)}</>;
|
|
789
|
+
return <>{wrapValue(consumptionValue)} <br /> {wrapValue(co2Value)}{co2ClassValue && <><br />{wrapValue(co2ClassValue)}</>}</>;
|
|
775
790
|
}
|
|
776
791
|
},
|
|
777
792
|
consumptionGasCombinedAlternateView: {
|
|
@@ -785,6 +800,7 @@ const getDecoratedProps = (
|
|
|
785
800
|
|
|
786
801
|
const co2 = car.environmentEmissions.co2;
|
|
787
802
|
const wltpCo2 = car.environmentEmissions.wltpCo2;
|
|
803
|
+
const wltpEnergyEfficiencyClass = car.environmentEmissions.wltpEnergyEfficiencyClass;
|
|
788
804
|
|
|
789
805
|
const consumptionValue = Number.isFinite(consumptionGasCombined)
|
|
790
806
|
? t('vehicleProps:value.consumptionGas', { consumption: consumptionGasCombined.toLocaleString(language), unit: translatedUnit })
|
|
@@ -802,11 +818,15 @@ const getDecoratedProps = (
|
|
|
802
818
|
? t('vehicleProps:value.wltpCo2Combined', { co2: wltpCo2.toLocaleString(language) })
|
|
803
819
|
: null;
|
|
804
820
|
|
|
821
|
+
const co2ClassValue = isPropDefined(wltpEnergyEfficiencyClass)
|
|
822
|
+
? t('vehicleProps:value.co2Class', { class: wltpEnergyEfficiencyClass })
|
|
823
|
+
: null;
|
|
824
|
+
|
|
805
825
|
if (wltpConsumptionValue && wltpCo2Value) {
|
|
806
|
-
return <>{wrapValue(wltpConsumptionValue)}, {wrapValue(wltpCo2Value)}</>;
|
|
826
|
+
return <>{wrapValue(wltpConsumptionValue)}, {wrapValue(wltpCo2Value)}{co2ClassValue && <><br />{wrapValue(co2ClassValue)}</>}</>;
|
|
807
827
|
}
|
|
808
828
|
|
|
809
|
-
return <>{wrapValue(consumptionValue)} <br /> {wrapValue(co2Value)}</>;
|
|
829
|
+
return <>{wrapValue(consumptionValue)} <br /> {wrapValue(co2Value)}{co2ClassValue && <><br />{wrapValue(co2ClassValue)}</>}</>;
|
|
810
830
|
}
|
|
811
831
|
},
|
|
812
832
|
|
|
@@ -841,6 +861,7 @@ const getDecoratedProps = (
|
|
|
841
861
|
|
|
842
862
|
const co2 = car.environmentEmissions.co2;
|
|
843
863
|
const wltpCo2 = car.environmentEmissions.wltpCo2;
|
|
864
|
+
const wltpEnergyEfficiencyClass = car.environmentEmissions.wltpEnergyEfficiencyClass;
|
|
844
865
|
const co2Value = Number.isFinite(co2)
|
|
845
866
|
? t('vehicleProps:value.co2Combined', { co2: co2.toLocaleString(language) })
|
|
846
867
|
: t('vehicleProps:value.na');
|
|
@@ -850,6 +871,9 @@ const getDecoratedProps = (
|
|
|
850
871
|
const wltpCo2PluginValue = Number.isFinite(wltpCo2)
|
|
851
872
|
? t('vehicleProps:value.wltpCo2WtdCombined', { co2: wltpCo2.toLocaleString(language) })
|
|
852
873
|
: null;
|
|
874
|
+
const co2ClassValue = isPropDefined(wltpEnergyEfficiencyClass)
|
|
875
|
+
? t('vehicleProps:value.co2Class', { class: wltpEnergyEfficiencyClass })
|
|
876
|
+
: null;
|
|
853
877
|
const hybridPlugin = car.engineData.hybridPlugin;
|
|
854
878
|
|
|
855
879
|
if (hybridPlugin && wltpConsumptionWeightedPowerCombinedContent && wltpConsumptionWeightedCombinedContent) {
|
|
@@ -857,6 +881,7 @@ const getDecoratedProps = (
|
|
|
857
881
|
{wrapValue(wltpConsumptionWeightedPowerCombinedContent)}{', '}
|
|
858
882
|
{wrapValue(wltpConsumptionWeightedCombinedContent)}{', '}
|
|
859
883
|
{wrapValue(wltpCo2PluginValue)}
|
|
884
|
+
{co2ClassValue && <><br />{wrapValue(co2ClassValue)}</>}
|
|
860
885
|
</React.Fragment>
|
|
861
886
|
}
|
|
862
887
|
|
|
@@ -864,6 +889,7 @@ const getDecoratedProps = (
|
|
|
864
889
|
return <React.Fragment>
|
|
865
890
|
{wrapValue(wltpConsumptionCombinedContent)}{', '}
|
|
866
891
|
{wrapValue(wltpCo2Value)}
|
|
892
|
+
{co2ClassValue && <><br />{wrapValue(co2ClassValue)}</>}
|
|
867
893
|
</React.Fragment>
|
|
868
894
|
}
|
|
869
895
|
|
|
@@ -873,6 +899,7 @@ const getDecoratedProps = (
|
|
|
873
899
|
{consumptionPowerCombined && hybridPlugin ? <br /> : ''}
|
|
874
900
|
{wrapValue(consumptionCombinedContent)} <br />
|
|
875
901
|
{wrapValue(co2Value)}
|
|
902
|
+
{co2ClassValue && <><br />{wrapValue(co2ClassValue)}</>}
|
|
876
903
|
</React.Fragment>
|
|
877
904
|
: t('vehicleProps:value.na');
|
|
878
905
|
}
|