@bytebrand/fe-ui-core 4.8.9 → 4.8.11

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.9",
3
+ "version": "4.8.11",
4
4
  "description": "UI components for the auto.de project",
5
5
  "main": "index.ts",
6
6
  "module": "dist/common.js",
@@ -103,7 +103,7 @@ const getDecoratedLightProps = (
103
103
  const consumptionCombined = car.consumption.consumptionCombined;
104
104
  const consumptionUnit = car.consumption.consumptionUnit || 'consumption_consumptionUnit_l';
105
105
  const translatedUnit = t(`cbd:${consumptionUnit}`);
106
- const wltpCombined = car.consumption.wltpCombined || car.consumption.wltpWeightedCombined;
106
+ const wltpCombined = car.consumption.wltpCombined;
107
107
  if (wltpCombined) {
108
108
  return Number.isFinite(wltpCombined)
109
109
  ? t('vehicleProps:value.wltpCombined', { consumption: wltpCombined.toLocaleString(language), unit: translatedUnit })
@@ -1574,7 +1574,13 @@ const getDecoratedProps = (
1574
1574
  ? t('vehicleProps:value.wltpCo2Price', { price: getFormattedPrice(co2PriceLow, '$,.2f') })
1575
1575
  : t('vehicleProps:value.na');
1576
1576
  },
1577
- valueDescription: t('vehicleProps:value.wltpCo2PriceSpec')
1577
+ get valueDescription() {
1578
+ const wltpCo2 = car.environmentEmissions.wltpCo2;
1579
+
1580
+ const { getCo2Price } = financingUtils;
1581
+ const { co2PriceLow } = getCo2Price(wltpCo2);
1582
+ return Number.isFinite(co2PriceLow) ? ('vehicleProps:value.wltpCo2PriceSpec') : '';
1583
+ }
1578
1584
  },
1579
1585
  wltpCo2CostsMiddle: {
1580
1586
  get title() {
@@ -1590,7 +1596,13 @@ const getDecoratedProps = (
1590
1596
  ? t('vehicleProps:value.wltpCo2Price', { price: getFormattedPrice(co2PriceMedium, '$,.2f') })
1591
1597
  : t('vehicleProps:value.na');
1592
1598
  },
1593
- valueDescription: t('vehicleProps:value.wltpCo2PriceSpec')
1599
+ get valueDescription() {
1600
+ const wltpCo2 = car.environmentEmissions.wltpCo2;
1601
+
1602
+ const { getCo2Price } = financingUtils;
1603
+ const { co2PriceMedium } = getCo2Price(wltpCo2);
1604
+ return Number.isFinite(co2PriceMedium) ? ('vehicleProps:value.wltpCo2PriceSpec') : '';
1605
+ }
1594
1606
  },
1595
1607
  wltpCo2CostsHigh: {
1596
1608
  get title() {
@@ -1606,7 +1618,13 @@ const getDecoratedProps = (
1606
1618
  ? t('vehicleProps:value.wltpCo2Price', { price: getFormattedPrice(co2PriceHigh, '$,.2f') })
1607
1619
  : t('vehicleProps:value.na');
1608
1620
  },
1609
- valueDescription: t('vehicleProps:value.wltpCo2PriceSpec')
1621
+ get valueDescription() {
1622
+ const wltpCo2 = car.environmentEmissions.wltpCo2;
1623
+
1624
+ const { getCo2Price } = financingUtils;
1625
+ const { co2PriceHigh } = getCo2Price(wltpCo2);
1626
+ return Number.isFinite(co2PriceHigh) ? ('vehicleProps:value.wltpCo2PriceSpec') : '';
1627
+ }
1610
1628
  },
1611
1629
  powerPrice: {
1612
1630
  title: t('vehicleProps:title.powerPrice'),