@bytebrand/fe-ui-core-autobahn 1.0.200 → 1.0.201

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,30 +1,30 @@
1
- {
2
- "name": "@bytebrand/fe-ui-core-autobahn",
3
- "version": "1.0.200",
4
- "description": "auto.de md3 (Autobahn) design system — UI primitives, cards, chrome, VDP modules, theme CSS and locales. Ships raw TypeScript source (like fe-ui-core before it); each consumer's bundler compiles it.",
5
- "main": "index.ts",
6
- "license": "UNLICENSED",
7
- "peerDependencies": {
8
- "react": "^18.0.0",
9
- "react-dom": "^18.0.0"
10
- },
11
- "dependencies": {
12
- "@bytebrand/car-schema-selectors": "^2.0.7",
13
- "@bytebrand/fe-financing": "^5.14.30",
14
- "classnames": "2.2.6",
15
- "clsx": "^2.1.1",
16
- "d3-format": "1.4.5",
17
- "js-cookie": "^2.2.0",
18
- "lodash": "^4.17.21",
19
- "lucide-react": "^0.288.0",
20
- "mobx-react": "^7.6.0",
21
- "moment": "^2.29.1",
22
- "qs": "^6.6.0",
23
- "react-device-detect": "^2.1.2",
24
- "react-grid-system": "^5.0.2",
25
- "react-lazyload": "^3.2.0",
26
- "react-scroll": "^1.9.3",
27
- "react-slick": "^0.29.0",
28
- "slick-carousel": "1.8.1"
29
- }
30
- }
1
+ {
2
+ "name": "@bytebrand/fe-ui-core-autobahn",
3
+ "version": "1.0.201",
4
+ "description": "auto.de md3 (Autobahn) design system — UI primitives, cards, chrome, VDP modules, theme CSS and locales. Ships raw TypeScript source (like fe-ui-core before it); each consumer's bundler compiles it.",
5
+ "main": "index.ts",
6
+ "license": "UNLICENSED",
7
+ "peerDependencies": {
8
+ "react": "^18.0.0",
9
+ "react-dom": "^18.0.0"
10
+ },
11
+ "dependencies": {
12
+ "@bytebrand/car-schema-selectors": "^2.0.7",
13
+ "@bytebrand/fe-financing": "^5.14.30",
14
+ "classnames": "2.2.6",
15
+ "clsx": "^2.1.1",
16
+ "d3-format": "1.4.5",
17
+ "js-cookie": "^2.2.0",
18
+ "lodash": "^4.17.21",
19
+ "lucide-react": "^0.288.0",
20
+ "mobx-react": "^7.6.0",
21
+ "moment": "^2.29.1",
22
+ "qs": "^6.6.0",
23
+ "react-device-detect": "^2.1.2",
24
+ "react-grid-system": "^5.0.2",
25
+ "react-lazyload": "^3.2.0",
26
+ "react-scroll": "^1.9.3",
27
+ "react-slick": "^0.29.0",
28
+ "slick-carousel": "1.8.1"
29
+ }
30
+ }
package/theme/md3.css CHANGED
@@ -12233,7 +12233,6 @@ color: #005CFF;
12233
12233
  .md3 .hiw-section,
12234
12234
  .md3 #vdp-kontakt,
12235
12235
  .md3 #vdp-bewertungen,
12236
- .md3 #vdp-preis,
12237
12236
  .md3 .vdp-similar {
12238
12237
  margin-top: 14px !important;
12239
12238
  }
@@ -12246,187 +12245,6 @@ color: #005CFF;
12246
12245
  border: 1px solid #D4DDE7;
12247
12246
  box-shadow: none;
12248
12247
  }
12249
- .md3 #vdp-preis {
12250
- padding: 0 !important;
12251
- border: 1px solid #D4DDE7;
12252
- box-shadow: none;
12253
- }
12254
- .md3 #vdp-preis h2 {
12255
- padding: 22px 22px 0 !important;
12256
- margin-top: 0;
12257
- margin-bottom: 11px !important;
12258
- font-family: Arial, Helvetica, Arimo, sans-serif;
12259
- font-style: normal;
12260
- font-weight: 700;
12261
- font-size: 24px;
12262
- line-height: 29px;
12263
- color: #1d2a38;
12264
- }
12265
- .md3 #vdp-preis .fin-eval-bar {
12266
- height: 9px;
12267
- }
12268
- .md3 #vdp-preis .fin-eval-seg:first-child {
12269
- border-radius: 4px 0 0 4px;
12270
- }
12271
- .md3 #vdp-preis .fin-eval-seg:last-of-type {
12272
- border-radius: 0 4px 4px 0;
12273
- }
12274
- .md3 #vdp-preis > div:first-of-type {
12275
- padding-left: 22px;
12276
- padding-right: 22px;
12277
- }
12278
- .md3 #vdp-preis > div:last-child {
12279
- margin-top: 24px !important;
12280
- }
12281
- .md3 .fin-criteria-card {
12282
- padding: 0 !important;
12283
- margin: 0 10px;
12284
- }
12285
- .md3 .fin-criteria-card > button {
12286
- padding: 13px 13px 25px 13px !important;
12287
- }
12288
- .md3 #vdp-preis .fin-criteria-card > button .md-title-sm {
12289
- font-family: Arial, Helvetica, Arimo, sans-serif;
12290
- font-style: normal;
12291
- font-weight: 700;
12292
- font-size: 13px !important;
12293
- line-height: 18px;
12294
- color: #1d2a38;
12295
- }
12296
- .md3 .fin-criteria-card > button > svg:last-child {
12297
- stroke-width: 2.6px !important;
12298
- }
12299
- .md3 .fin-criteria-card > button > svg:last-child path {
12300
- stroke-width: 2.6px !important;
12301
- }
12302
- .md3 .fin-criteria-card .fin-criteria-grid {
12303
- padding: 0 10px 20px 13px !important;
12304
- column-gap: 10px !important;
12305
- row-gap: 14px !important;
12306
- }
12307
- .md3 .fin-criteria-card .fin-criteria-icon-grid {
12308
- padding-top: 13px !important;
12309
- }
12310
- .md3 .fin-criteria-card .fin-criteria-grid svg {
12311
- width: 28px;
12312
- height: 28px;
12313
- }
12314
- .md3 .fin-criteria-card .fin-criteria-grid > div {
12315
- gap: 3px !important;
12316
- }
12317
- .md3 .fin-criteria-card .fin-criteria-grid > div.fin-criteria-tier-row {
12318
- gap: 12px !important;
12319
- }
12320
- .md3 .fin-criteria-card .fin-criteria-grid svg[viewBox="0 0 21 21"] {
12321
- width: 21px;
12322
- height: 21px;
12323
- }
12324
- .md3 #vdp-preis .fin-criteria-card .md-label-sm {
12325
- font-family: Arial, Helvetica, Arimo, sans-serif;
12326
- font-style: normal;
12327
- font-weight: 400;
12328
- font-size: 10.3px;
12329
- line-height: 14px;
12330
- color: #5b6b7f;
12331
- }
12332
- .md3 #vdp-preis .fin-criteria-card .md-title-sm {
12333
- font-family: Arial, Helvetica, Arimo, sans-serif;
12334
- font-style: normal;
12335
- font-weight: 700;
12336
- font-size: 10.3px !important;
12337
- line-height: 14px;
12338
- color: #1d2a38;
12339
- }
12340
- .md3 .fin-criteria-note {
12341
- margin: 0;
12342
- padding: 0 13px 20px;
12343
- font-family: Arial, Helvetica, Arimo, sans-serif;
12344
- font-style: normal;
12345
- font-weight: 400;
12346
- font-size: 10px;
12347
- line-height: 14px;
12348
- color: #5b6b7f;
12349
- }
12350
- .md3 .fin-criteria-divider {
12351
- width: 310px;
12352
- height: 1px;
12353
- background: #e6ecf3;
12354
- margin: 0 auto;
12355
- }
12356
- .md3 #vdp-preis > div:last-child > button {
12357
- font-family: Arial, Helvetica, Arimo, sans-serif;
12358
- font-style: normal;
12359
- font-weight: 700 !important;
12360
- font-size: 13px !important;
12361
- line-height: 18px;
12362
- color: #005cff !important;
12363
- padding-left: 22px !important;
12364
- padding-right: 22px !important;
12365
- }
12366
- .md3 #vdp-preis > div:last-child > button .lucide {
12367
- width: 18px;
12368
- height: 18px;
12369
- margin-left: auto;
12370
- stroke-width: 2.6px !important;
12371
- }
12372
- .md3 #vdp-preis > div:last-child > button .lucide path {
12373
- stroke-width: 2.6px !important;
12374
- }
12375
- .md3 #vdp-preis .fin-eval-thumb {
12376
- width: 26px;
12377
- height: 26px;
12378
- background: #ffffff;
12379
- border-width: 2px;
12380
- border-radius: 13px;
12381
- }
12382
- .md3 #vdp-preis .fin-eval-thumb--good {
12383
- border-color: #66b84d !important;
12384
- }
12385
- .md3 #vdp-preis .md-label-sm {
12386
- font-family: Arial, Helvetica, Arimo, sans-serif;
12387
- font-style: normal;
12388
- font-weight: 400;
12389
- font-size: 11.5px;
12390
- line-height: 15px;
12391
- color: #5b6b7f;
12392
- }
12393
- .md3 .fin-eval-good-badge {
12394
- margin-top: 25px !important;
12395
- height: 56px;
12396
- width: 100%;
12397
- box-sizing: border-box;
12398
- background: #dff3e5 !important;
12399
- border: 1px solid #a9e0b9;
12400
- border-radius: 12px !important;
12401
- padding-left: 22px !important;
12402
- padding-right: 22px !important;
12403
- }
12404
- .md3 .fin-eval-good-badge svg {
12405
- width: 18px;
12406
- height: 18px;
12407
- stroke: #66b84d;
12408
- }
12409
- .md3 .fin-eval-good-badge span {
12410
- font-family: Arial, Helvetica, Arimo, sans-serif;
12411
- font-style: normal;
12412
- font-weight: 700 !important;
12413
- font-size: 13px !important;
12414
- line-height: 18px;
12415
- color: #66b84d !important;
12416
- }
12417
- .md3 #vdp-preis > p {
12418
- margin-top: 0;
12419
- padding-top: 0;
12420
- padding-left: 22px;
12421
- padding-right: 22px;
12422
- margin-bottom: 10px !important;
12423
- font-family: Arial, Helvetica, Arimo, sans-serif;
12424
- font-style: normal;
12425
- font-weight: 400;
12426
- font-size: 13px;
12427
- line-height: 18px;
12428
- color: #5b6b7f;
12429
- }
12430
12248
  .md3 #vdp-bewertungen > div:first-child {
12431
12249
  gap: 26px !important;
12432
12250
  margin-bottom: 28px !important;
@@ -8,7 +8,7 @@
8
8
  //
9
9
  // Replaces the design kit's globals:
10
10
  // - `window.CO2_CLASSES` / `window.CO2_COLORS` → ../constants
11
- // - `equipFor(id)` / `car.priceHistory` / market band → typed props on VehicleDetail
11
+ // - `equipFor(id)` / market band → typed props on VehicleDetail
12
12
  // - `assetUrl(...)` → pre-resolved image URLs (caller's job)
13
13
  // - `data-lucide` icons → the ui kit's <Icon />
14
14
  // The DealerBlock from CdpModules is intentionally NOT ported (auto.de is the
@@ -16,8 +16,9 @@
16
16
  //
17
17
  // NEEDS-DATA discipline (the point of the ticket): wherever the design showed a
18
18
  // figure we have no real source for, these render the NEEDS_DATA_LABEL
19
- // ('Daten folgt') marker rather than inventing a value — see PriceHistory (whole
20
- // card) and its market band.
19
+ // ('Daten folgt') marker rather than inventing a value. The VDP's price block
20
+ // ("Preis & Marktwert", with its own price history) lives in fe-main:
21
+ // VehicleDetailedNextPage/PriceMarket.
21
22
  //
22
23
  // All components render correctly only inside a `<div className="md3">` subtree.
23
24
 
@@ -26,29 +27,10 @@ import { TranslationFunction } from '../types';
26
27
 
27
28
  import { Button, CreditCostNotice, Dropdown, DropdownOption, Icon, Spec, StatChip, Stars } from '../ui';
28
29
  import { CO2_CLASSES, CO2_COLORS, TIER_LABELS, TIER_KEYS, TIER_COLORS, TIER_BACKGROUNDS } from '../constants';
29
- import { defaultVdpSpecs, EquipmentGroups, PriceRatingBands, VehicleDetail, VdpSpec, VdpReview, RunningCostRow, EnergyTaxSummary } from './types';
30
+ import { defaultVdpSpecs, EquipmentGroups, VehicleDetail, VdpSpec, VdpReview, RunningCostRow, EnergyTaxSummary } from './types';
30
31
  import { AddServicesTooltipBody, CalcRow, DocCheckIcon, EvalBar, expanderBtnStyle, FinanceMode, Slider, TermChips, ToggleRow } from './FinanceCalculator';
31
32
  import { formatEur as eur, formatEurCents as eurCents, formatPct as pct } from '../utils/financeFormat';
32
33
 
33
- /** Figma "check with open arc" glyph (modern lucide circle-check-big; the bundled lucide
34
- * 0.288 only ships the closed-circle variant, so the two paths are inlined). */
35
- const ArcCheckIcon: React.FunctionComponent<{ size?: number; color?: string }> = ({ size = 20, color = 'currentColor' }) => (
36
- <svg
37
- width={size}
38
- height={size}
39
- viewBox="0 0 24 24"
40
- fill="none"
41
- stroke={color}
42
- strokeWidth={2.4}
43
- strokeLinecap="round"
44
- strokeLinejoin="round"
45
- style={{ flex: 'none' }}
46
- >
47
- <path d="M21.801 10A10 10 0 1 1 17 3.335" />
48
- <path d="m9 11 3 3L22 4" />
49
- </svg>
50
- );
51
-
52
34
  /** mileage → 'X.XXX km' (de-DE grouping). */
53
35
  function fmtKm(n: number): string {
54
36
  return `${n.toLocaleString('de-DE')} km`;
@@ -800,599 +782,6 @@ export const TrustStrip: React.FunctionComponent<TrustStripProps> = ({ items, t
800
782
  </div>
801
783
  );
802
784
 
803
- // ---------------------------------------------------------------------------
804
- // Price history + market band (NEEDS-DATA by default)
805
- // ---------------------------------------------------------------------------
806
-
807
- export interface PriceHistoryProps {
808
- vehicle: VehicleDetail;
809
- /** i18n function (drilled from the page). */
810
- t: TranslationFunction;
811
- }
812
-
813
- /**
814
- * Price-history sparkline + market-value position bar.
815
- *
816
- * NEEDS-DATA: the sparkline needs `priceHistory` (with at least two points) and
817
- * the position bar needs the full market band (`marketLow` / `marketAvg` /
818
- * `marketHigh`). Either section that lacks real data renders the
819
- * NEEDS_DATA_LABEL ('Daten folgt') marker — we never draw a fake trend or
820
- * position. Both are needs-data by default, so until W3b supplies them this card
821
- * shows the markers.
822
- */
823
- export const PriceHistory: React.FunctionComponent<PriceHistoryProps> = ({ vehicle, t }) => {
824
- const pts = vehicle.priceHistory;
825
- const hasHistory = !!pts && pts.length >= 2;
826
- const hasMarket =
827
- vehicle.marketLow != null &&
828
- vehicle.marketAvg != null &&
829
- vehicle.marketHigh != null &&
830
- vehicle.marketHigh > vehicle.marketLow;
831
-
832
- // Nothing real to show yet — hide the whole card instead of rendering stubs.
833
- if (!hasHistory && !hasMarket) return null;
834
-
835
- // --- history sparkline (only when real points exist) ---
836
- let historyBlock: React.ReactNode;
837
- if (hasHistory) {
838
- const prices = pts!.map((p) => p.price);
839
- const lo = Math.min(...prices);
840
- const hi = Math.max(...prices);
841
- const W = 280;
842
- const H = 70;
843
- const x = (i: number) => (i / (pts!.length - 1)) * W;
844
- const y = (p: number) => H - ((p - lo) / (hi - lo || 1)) * H;
845
- const last = pts![pts!.length - 1];
846
- const line = pts!.map((p, i) => `${i === 0 ? 'M' : 'L'} ${x(i).toFixed(1)} ${y(p.price).toFixed(1)}`).join(' ');
847
- const area = `${line} L ${W} ${H} L 0 ${H} Z`;
848
- const drop = vehicle.listPrice != null ? vehicle.listPrice - vehicle.price : null;
849
- historyBlock = (
850
- <div>
851
- <div style={{ display: 'flex', alignItems: 'center', gap: 8, marginBottom: 10 }}>
852
- {drop != null && drop > 0 ? (
853
- <>
854
- <StatChip tone="good" icon="trending-down">
855
- {t('autobahn:priceHistory.dropAmount', { amount: eur(drop) })}
856
- </StatChip>
857
- <span className="md-label-sm">{t('autobahn:priceHistory.sinceListing')}</span>
858
- </>
859
- ) : (
860
- <span className="md-label-sm">{t('autobahn:priceHistory.label')}</span>
861
- )}
862
- </div>
863
- <svg viewBox={`0 0 ${W} ${H}`} width="100%" height="78" preserveAspectRatio="none" style={{ overflow: 'visible' }}>
864
- <defs>
865
- <linearGradient id="phg" x1="0" y1="0" x2="0" y2="1">
866
- <stop offset="0%" stopColor="var(--md-primary)" stopOpacity=".22" />
867
- <stop offset="100%" stopColor="var(--md-primary)" stopOpacity="0" />
868
- </linearGradient>
869
- </defs>
870
- <path d={area} fill="url(#phg)" />
871
- <path d={line} fill="none" stroke="var(--md-primary)" strokeWidth="2.5" strokeLinejoin="round" strokeLinecap="round" />
872
- <circle cx={x(pts!.length - 1)} cy={y(last.price)} r="4.5" fill="var(--md-primary)" stroke="#fff" strokeWidth="2" />
873
- </svg>
874
- <div style={{ display: 'flex', justifyContent: 'space-between', marginTop: 4 }}>
875
- <span className="md-label-sm">{pts![0].label}</span>
876
- <span className="md-label-sm">{last.label}</span>
877
- </div>
878
- </div>
879
- );
880
- } else {
881
- historyBlock = (
882
- <div>
883
- <div className="md-title-sm" style={{ marginBottom: 12 }}>
884
- {t('autobahn:priceHistory.title')}
885
- </div>
886
- <p className="md-body-sm" style={{ margin: 0, fontStyle: 'italic', color: 'var(--md-on-surface-variant)' }}>
887
- {t('autobahn:common.needsData')}
888
- </p>
889
- </div>
890
- );
891
- }
892
-
893
- // --- market-value position (only when the full band exists) ---
894
- let marketBlock: React.ReactNode;
895
- if (hasMarket) {
896
- const mpos = Math.max(
897
- 0,
898
- Math.min(1, (vehicle.price - vehicle.marketLow!) / (vehicle.marketHigh! - vehicle.marketLow!)),
899
- );
900
- // marketAvg is the raw ML-predicted price (a float, e.g. 14284.277) — round before display,
901
- // else eur()'s toLocaleString prints the fractional part as a bogus "1.035,277 €".
902
- const delta = Math.round(vehicle.marketAvg! - vehicle.price);
903
- marketBlock = (
904
- <div>
905
- <div className="md-title-sm" style={{ marginBottom: 12 }}>
906
- {t('autobahn:marketValue.heading')}
907
- </div>
908
- {/* segmented tier bar (Figma — discrete colors, not a gradient), continuous marker;
909
- ring color follows the car's actual rating tone */}
910
- <EvalBar
911
- tier={{ top: 0, good: 1, fair: 2, raised: 3, high: 4 }[vehicle.rating as 'top' | 'good' | 'fair' | 'raised' | 'high'] ?? 2}
912
- leftPct={mpos * 100}
913
- />
914
- <div style={{ display: 'flex', justifyContent: 'space-between', marginTop: 8 }}>
915
- <span className="md-label-sm">{eur(vehicle.marketLow!)} €</span>
916
- <span className="md-label-sm">{eur(vehicle.marketHigh!)} €</span>
917
- </div>
918
- {delta > 0 && (
919
- <div
920
- className="fin-eval-good-badge"
921
- style={{
922
- display: 'flex',
923
- alignItems: 'center',
924
- gap: 18,
925
- marginTop: 12,
926
- padding: '13px 14px',
927
- borderRadius: 'var(--md-r-sm)',
928
- background: 'var(--md-good-container)',
929
- }}
930
- >
931
- <ArcCheckIcon size={20} color="var(--md-good)" />
932
- <span style={{ fontSize: 14, fontWeight: 700, color: 'var(--md-good)' }}>
933
- {t('autobahn:marketValue.belowAverage', { rating: t('autobahn:tier.' + vehicle.rating), amount: eur(delta) })}
934
- </span>
935
- </div>
936
- )}
937
- </div>
938
- );
939
- } else {
940
- marketBlock = (
941
- <div>
942
- <div className="md-title-sm" style={{ marginBottom: 12 }}>
943
- {t('autobahn:marketValue.heading')}
944
- </div>
945
- <p className="md-body-sm" style={{ margin: 0, fontStyle: 'italic', color: 'var(--md-on-surface-variant)' }}>
946
- {t('autobahn:common.needsData')}
947
- </p>
948
- </div>
949
- );
950
- }
951
-
952
- // mobile-only (2026-07-17 round 10 decision): the real market-value gauge is scoped to
953
- // phone widths for now — desktop keeps its exact pre-existing needs-data behaviour
954
- // (hidden unless a real price-history sparkline exists) by rendering the ORIGINAL
955
- // hide-mobile grid unconditionally, so it stays byte-identical whenever hasHistory is
956
- // false (today, always). Once priceHistory gets a real source, both paths coexist fine.
957
- const mobileOnlyMarket = hasMarket && !hasHistory;
958
-
959
- return (
960
- <div className={'mcard' + (mobileOnlyMarket ? ' show-mobile' : '')} id="vdp-preis" style={{ padding: 22, ...(mobileOnlyMarket ? { flexDirection: 'column' } : {}) }}>
961
- <h2 className="md-headline-sm" style={{ marginBottom: 4 }}>
962
- {t('autobahn:priceMarket.heading')}
963
- </h2>
964
- <p className="md-body-sm" style={{ marginBottom: 18 }}>
965
- {t('autobahn:priceMarket.description')}
966
- </p>
967
- {mobileOnlyMarket ? (
968
- <>
969
- {marketBlock}
970
- <PriceRatingBreakdown vehicle={vehicle} t={t} />
971
- <p
972
- style={{
973
- paddingTop: 10,
974
- paddingBottom: 10,
975
- fontFamily: 'Arial, Helvetica, Arimo, sans-serif',
976
- fontWeight: 400,
977
- fontSize: 9,
978
- lineHeight: '14px',
979
- color: '#5B6B7F',
980
- }}
981
- >
982
- Alle Preise inkl. MwSt. | Stand: heute | Quelle: auto.de Marktwertanalyse
983
- </p>
984
- </>
985
- ) : (
986
- <div className="pmv-grid hide-mobile">
987
- {historyBlock}
988
- {marketBlock}
989
- </div>
990
- )}
991
- </div>
992
- );
993
- };
994
-
995
- // ---------------------------------------------------------------------------
996
- // "Details zur Preisbewertung" expandable — criteria grid + 5-tier band list
997
- // (mobile-only, round 10; real data — see toVehicleDetail's getPriceRatingConfig call)
998
- // ---------------------------------------------------------------------------
999
-
1000
- /** [tier key, text color, badge background, badge font-size]. Order matches the Figma "Bewertungskategorien" list. */
1001
- const RATING_TIERS: ReadonlyArray<readonly [keyof PriceRatingBands, string, string, number]> = [
1002
- ['topPrice', '#168A45', '#DFF3E5', 12],
1003
- ['goodPrice', '#66B84D', '#E4F3DF', 12],
1004
- ['fairPrice', '#FFB800', '#FFF6DB', 12],
1005
- ['increasedPrice', '#F26B43', '#FFEFD5', 10.4],
1006
- ['highPrice', '#E60000', '#FFD3D3', 10.4],
1007
- ];
1008
-
1009
- /** collapsible sub-card header (blue icon + bold title + chevron) — Figma round 12. */
1010
- const BreakdownCardHead: React.FunctionComponent<{
1011
- icon: string;
1012
- title: string;
1013
- open: boolean;
1014
- onToggle: () => void;
1015
- }> = ({ icon, title, open, onToggle }) => (
1016
- <button
1017
- type="button"
1018
- onClick={onToggle}
1019
- style={{
1020
- display: 'flex',
1021
- alignItems: 'center',
1022
- gap: 10,
1023
- width: '100%',
1024
- background: 'none',
1025
- border: 0,
1026
- padding: 0,
1027
- cursor: 'pointer',
1028
- font: 'inherit',
1029
- textAlign: 'left',
1030
- }}
1031
- >
1032
- <Icon name={icon} size={19} color="var(--md-primary)" stroke={2} style={{ flex: 'none' }} />
1033
- <span className="md-title-sm" style={{ flex: 1, minWidth: 0, fontSize: 15 }}>
1034
- {title}
1035
- </span>
1036
- <Icon name={open ? 'chevron-up' : 'chevron-down'} size={18} color="var(--md-primary)" style={{ flex: 'none' }} />
1037
- </button>
1038
- );
1039
-
1040
- const PriceRatingBreakdown: React.FunctionComponent<{ vehicle: VehicleDetail; t: TranslationFunction }> = ({ vehicle, t }) => {
1041
- const [open, setOpen] = useState(false);
1042
- const [criteriaOpen, setCriteriaOpen] = useState(true);
1043
- const [categoriesOpen, setCategoriesOpen] = useState(true);
1044
- const bands = vehicle.priceRatingBands;
1045
- if (!bands) return null;
1046
-
1047
- const totalEquipment = Object.values(vehicle.equipment || {}).reduce((s, a) => s + a.length, 0);
1048
- const allCriteria: ReadonlyArray<readonly [icon: string, label: string, value: string]> = [
1049
- ['car-front', t('autobahn:priceMarket.criteria.makeModel'), `${vehicle.make} ${vehicle.model}`],
1050
- ['cog', t('autobahn:priceMarket.criteria.gear'), vehicle.gear],
1051
- ['calendar', t('autobahn:priceMarket.criteria.reg'), vehicle.reg],
1052
- ['droplet', t('autobahn:priceMarket.criteria.cons'), vehicle.cons],
1053
- ['fuel', t('autobahn:priceMarket.criteria.fuel'), vehicle.fuel],
1054
- ['leaf', t('autobahn:priceMarket.criteria.co2'), vehicle.co2],
1055
- ['zap', t('autobahn:priceMarket.criteria.power'), vehicle.power.replace(/\s*\([^)]*\)\s*$/, '')],
1056
- ['palette', t('autobahn:priceMarket.criteria.color'), vehicle.color],
1057
- ['gauge', t('autobahn:priceMarket.criteria.km'), fmtKm(vehicle.km)],
1058
- ['star', t('autobahn:priceMarket.criteria.equipment'), t('autobahn:priceMarket.criteria.equipmentCount', { count: totalEquipment })],
1059
- ];
1060
- const criteria = allCriteria.filter(([, , v]) => !!v);
1061
-
1062
- return (
1063
- <div style={{ marginTop: 18 }}>
1064
- <button
1065
- type="button"
1066
- onClick={() => setOpen((o) => !o)}
1067
- style={{
1068
- ...expanderBtnStyle,
1069
- justifyContent: 'flex-start',
1070
- gap: 6,
1071
- padding: '2px 0',
1072
- margin: '0 22px',
1073
- width: 'calc(100% - 44px)',
1074
- }}
1075
- >
1076
- {t('autobahn:priceMarket.detailsLink')}
1077
- <Icon
1078
- name={open ? 'chevron-up' : 'chevron-down'}
1079
- size={18}
1080
- color="var(--md-primary)"
1081
- stroke={2.6}
1082
- style={{ flex: 'none', marginLeft: 'auto' }}
1083
- />
1084
- </button>
1085
- {open && (
1086
- <div style={{ marginTop: 14, display: 'flex', flexDirection: 'column', gap: 18 }}>
1087
- <div className="mcard mcard--filled fin-criteria-card" style={{ padding: 16, flexDirection: 'column' }}>
1088
- <BreakdownCardHead
1089
- icon="list"
1090
- title={t('autobahn:priceMarket.criteriaTitle')}
1091
- open={criteriaOpen}
1092
- onToggle={() => setCriteriaOpen((o) => !o)}
1093
- />
1094
- {criteriaOpen && (
1095
- <>
1096
- <div className="fin-criteria-divider" />
1097
- <div className="fin-criteria-grid fin-criteria-icon-grid" style={{ display: 'flex', flexWrap: 'wrap', gap: 14 }}>
1098
- {criteria.map(([ic, label, value]) => (
1099
- <div key={label} style={{ display: 'flex', alignItems: 'flex-start', gap: 9, minWidth: '44%', flex: '1 1 44%' }}>
1100
- {ic === 'car-front' ? (
1101
- <svg width="17" height="17" viewBox="0 0 28 28" fill="none" xmlns="http://www.w3.org/2000/svg" style={{ marginTop: 1, flex: 'none' }}>
1102
- <path
1103
- d="M6.06689 11.6668L7.70023 7.70016C7.88892 7.16585 8.23528 6.70136 8.69355 6.36807C9.15183 6.03478 9.70044 5.84838 10.2669 5.8335H17.7336C18.3 5.84838 18.8486 6.03478 19.3069 6.36807C19.7652 6.70136 20.1115 7.16585 20.3002 7.70016L21.9336 11.6668"
1104
- stroke="#005CFF"
1105
- strokeLinecap="round"
1106
- strokeLinejoin="round"
1107
- />
1108
- <path
1109
- d="M5.83333 11.6665H22.1667C22.7855 11.6665 23.379 11.9123 23.8166 12.3499C24.2542 12.7875 24.5 13.381 24.5 13.9998V19.2498C24.5 19.714 24.3156 20.1591 23.9874 20.4873C23.6592 20.8155 23.2141 20.9998 22.75 20.9998H21V22.7498H18.6667V20.9998H9.33333V22.7498H7V20.9998H5.25C4.78587 20.9998 4.34075 20.8155 4.01256 20.4873C3.68437 20.1591 3.5 19.714 3.5 19.2498V13.9998C3.5 13.381 3.74583 12.7875 4.18342 12.3499C4.621 11.9123 5.21449 11.6665 5.83333 11.6665Z"
1110
- stroke="#005CFF"
1111
- strokeLinecap="round"
1112
- strokeLinejoin="round"
1113
- />
1114
- <path d="M7 15.1665H9M19 15.1665H21M10.5 18.6665H18" stroke="#005CFF" strokeLinecap="round" strokeLinejoin="round" />
1115
- </svg>
1116
- ) : ic === 'calendar' ? (
1117
- <svg width="17" height="17" viewBox="0 0 28 28" fill="none" xmlns="http://www.w3.org/2000/svg" style={{ marginTop: 1, flex: 'none' }}>
1118
- <path
1119
- d="M20.9998 6.4165H6.99984C5.71117 6.4165 4.6665 7.46117 4.6665 8.74984V20.9998C4.6665 22.2885 5.71117 23.3332 6.99984 23.3332H20.9998C22.2885 23.3332 23.3332 22.2885 23.3332 20.9998V8.74984C23.3332 7.46117 22.2885 6.4165 20.9998 6.4165Z"
1120
- stroke="#005CFF"
1121
- strokeLinecap="round"
1122
- strokeLinejoin="round"
1123
- />
1124
- <path
1125
- d="M9.33317 4.0835V8.75016M18.6665 4.0835V8.75016M4.6665 11.6668H23.3332M9.33317 15.1668H11.6665M13.9998 15.1668H16.3332M18.6665 15.1668H18.7832M9.33317 18.6668H11.6665M13.9998 18.6668H16.3332"
1126
- stroke="#005CFF"
1127
- strokeLinecap="round"
1128
- strokeLinejoin="round"
1129
- />
1130
- </svg>
1131
- ) : ic === 'fuel' ? (
1132
- <svg width="17" height="17" viewBox="0 0 28 28" fill="none" xmlns="http://www.w3.org/2000/svg" style={{ marginTop: 1, flex: 'none' }}>
1133
- <path
1134
- d="M7 23.3333V6.41667C7 5.64312 7.30729 4.90125 7.85427 4.35427C8.40125 3.80729 9.14312 3.5 9.91667 3.5H16.9167C17.6902 3.5 18.4321 3.80729 18.9791 4.35427C19.526 4.90125 19.8333 5.64312 19.8333 6.41667V23.3333"
1135
- stroke="#005CFF"
1136
- strokeLinecap="round"
1137
- strokeLinejoin="round"
1138
- />
1139
- <path d="M7 11.6667H19.8333M9.91667 7H16.9167" stroke="#005CFF" strokeLinecap="round" strokeLinejoin="round" />
1140
- <path
1141
- d="M19.8335 8.1665H21.3502L24.5002 11.3165V18.6665C24.5002 19.2853 24.2543 19.8788 23.8167 20.3164C23.3792 20.754 22.7857 20.9998 22.1668 20.9998H19.8335"
1142
- stroke="#005CFF"
1143
- strokeLinecap="round"
1144
- strokeLinejoin="round"
1145
- />
1146
- <path d="M4.6665 23.3335H22.1665" stroke="#005CFF" strokeLinecap="round" strokeLinejoin="round" />
1147
- </svg>
1148
- ) : ic === 'zap' ? (
1149
- <svg width="17" height="17" viewBox="0 0 28 28" fill="none" xmlns="http://www.w3.org/2000/svg" style={{ marginTop: 1, flex: 'none' }}>
1150
- <path
1151
- d="M15.9833 3L7 14.9H13.3L12.3667 24.4667L21.4667 11.6333H15.2833L15.9833 3Z"
1152
- stroke="#005CFF"
1153
- strokeLinecap="round"
1154
- strokeLinejoin="round"
1155
- />
1156
- </svg>
1157
- ) : ic === 'gauge' ? (
1158
- <svg width="17" height="17" viewBox="0 0 28 28" fill="none" xmlns="http://www.w3.org/2000/svg" style={{ marginTop: 1, flex: 'none' }}>
1159
- <path
1160
- d="M4.6665 17.4998C4.6665 15.0245 5.64983 12.6505 7.40017 10.9002C9.15051 9.14983 11.5245 8.1665 13.9998 8.1665C16.4752 8.1665 18.8492 9.14983 20.5995 10.9002C22.3498 12.6505 23.3332 15.0245 23.3332 17.4998"
1161
- stroke="#005CFF"
1162
- strokeLinecap="round"
1163
- strokeLinejoin="round"
1164
- />
1165
- <path
1166
- d="M9 17.5H18.5M14 17.5001L18.4333 11.4334M8.39997 12.2501L6.8833 11.0834M19.6 12.2501L21.1166 11.0834M14 9.33343V7.3501"
1167
- stroke="#005CFF"
1168
- strokeLinecap="round"
1169
- strokeLinejoin="round"
1170
- />
1171
- </svg>
1172
- ) : ic === 'cog' ? (
1173
- <svg width="17" height="17" viewBox="0 0 21 21" fill="none" xmlns="http://www.w3.org/2000/svg" style={{ marginTop: 1, flex: 'none' }}>
1174
- <path
1175
- d="M18.2293 9.26087L20.5 10.5L20.3772 12.0836L17.9435 12.9486L17.4728 14.0974L18.5902 16.4514L17.5706 17.6586L15.1 16.9103L14.0533 17.5595L13.5902 20.1291L12.0641 20.5L10.5 18.4234L9.27609 18.3255L7.40978 20.1291L5.95978 19.5206L5.9 16.9103L4.9663 16.1025L2.40978 16.4514L1.59022 15.0967L3.05652 12.9486L2.77065 11.7391L0.5 10.5L0.622826 8.91642L3.05652 8.05145L3.52717 6.90255L2.40978 4.54864L3.42935 3.34142L5.9 4.08974L6.94674 3.44046L7.40978 0.870859L8.93587 0.5L10.5 2.57659L11.7239 2.67453L13.5902 0.870859L15.0402 1.47942L15.1 4.08974L16.0337 4.89749L18.5902 4.54864L19.4098 5.90332L17.9435 8.05145L18.2293 9.26087Z"
1176
- stroke="#005CFF"
1177
- strokeLinecap="round"
1178
- strokeLinejoin="round"
1179
- />
1180
- </svg>
1181
- ) : ic === 'droplet' ? (
1182
- <svg width="17" height="17" viewBox="0 0 28 28" fill="none" xmlns="http://www.w3.org/2000/svg" style={{ marginTop: 1, flex: 'none' }}>
1183
- <path
1184
- d="M14.0001 3.7334C14.0001 3.7334 20.7667 10.9667 20.7667 15.6334C20.7667 16.522 20.5917 17.4019 20.2516 18.2229C19.9116 19.0439 19.4132 19.7898 18.7848 20.4182C18.1565 21.0465 17.4105 21.5449 16.5896 21.885C15.7686 22.225 14.8887 22.4001 14.0001 22.4001C13.1115 22.4001 12.2315 22.225 11.4106 21.885C10.5896 21.5449 9.84365 21.0465 9.21531 20.4182C8.58697 19.7898 8.08854 19.0439 7.74848 18.2229C7.40842 17.4019 7.2334 16.522 7.2334 15.6334C7.2334 10.9667 14.0001 3.7334 14.0001 3.7334Z"
1185
- stroke="#005CFF"
1186
- strokeLinecap="round"
1187
- strokeLinejoin="round"
1188
- />
1189
- <path d="M10.9668 16.6831C11.4335 18.0831 12.4835 18.8998 14.0001 19.0164" stroke="#005CFF" strokeLinecap="round" strokeLinejoin="round" />
1190
- </svg>
1191
- ) : ic === 'leaf' ? (
1192
- <svg width="17" height="17" viewBox="0 0 28 28" fill="none" xmlns="http://www.w3.org/2000/svg" style={{ marginTop: 1, flex: 'none' }}>
1193
- <path
1194
- d="M8.3999 19.8333H19.0166C19.6447 19.8716 20.2743 19.7858 20.8693 19.5808C21.4643 19.3758 22.0131 19.0557 22.4843 18.6386C22.9556 18.2215 23.3401 17.7157 23.6158 17.15C23.8916 16.5843 24.0533 15.9698 24.0916 15.3417C24.1299 14.7135 24.0441 14.084 23.8391 13.489C23.6341 12.894 23.3139 12.3452 22.8968 11.8739C22.4797 11.4027 21.9739 11.0182 21.4082 10.7424C20.8425 10.4666 20.2281 10.305 19.5999 10.2667C19.0554 8.97379 18.116 7.88622 16.916 7.15952C15.716 6.43283 14.317 6.10423 12.919 6.22073C11.521 6.33723 10.1956 6.89286 9.13247 7.80815C8.06934 8.72344 7.32289 9.9515 6.9999 11.3167C5.89206 11.5255 4.90988 12.1595 4.26335 13.083C3.61681 14.0066 3.35723 15.1464 3.54009 16.2588C3.72296 17.3712 4.33376 18.368 5.24191 19.0359C6.15006 19.7039 7.2835 19.9901 8.3999 19.8333Z"
1195
- stroke="#005CFF"
1196
- strokeLinecap="round"
1197
- strokeLinejoin="round"
1198
- />
1199
- <path
1200
- d="M10.4998 15.9834C10.9508 15.9834 11.3164 15.6178 11.3164 15.1668C11.3164 14.7157 10.9508 14.3501 10.4998 14.3501C10.0487 14.3501 9.68311 14.7157 9.68311 15.1668C9.68311 15.6178 10.0487 15.9834 10.4998 15.9834Z"
1201
- stroke="#005CFF"
1202
- strokeLinecap="round"
1203
- strokeLinejoin="round"
1204
- />
1205
- <path
1206
- d="M13.9998 15.9834C14.4508 15.9834 14.8164 15.6178 14.8164 15.1668C14.8164 14.7157 14.4508 14.3501 13.9998 14.3501C13.5487 14.3501 13.1831 14.7157 13.1831 15.1668C13.1831 15.6178 13.5487 15.9834 13.9998 15.9834Z"
1207
- stroke="#005CFF"
1208
- strokeLinecap="round"
1209
- strokeLinejoin="round"
1210
- />
1211
- <path
1212
- d="M17.4998 15.9834C17.9508 15.9834 18.3164 15.6178 18.3164 15.1668C18.3164 14.7157 17.9508 14.3501 17.4998 14.3501C17.0487 14.3501 16.6831 14.7157 16.6831 15.1668C16.6831 15.6178 17.0487 15.9834 17.4998 15.9834Z"
1213
- stroke="#005CFF"
1214
- strokeLinecap="round"
1215
- strokeLinejoin="round"
1216
- />
1217
- </svg>
1218
- ) : ic === 'palette' ? (
1219
- <svg width="17" height="17" viewBox="0 0 28 28" fill="none" xmlns="http://www.w3.org/2000/svg" style={{ marginTop: 1, flex: 'none' }}>
1220
- <path
1221
- d="M16.6 7H9.1C7.9402 7 7 7.9402 7 9.1V19.7C7 20.8598 7.9402 21.8 9.1 21.8H16.6C17.7598 21.8 18.7 20.8598 18.7 19.7V9.1C18.7 7.9402 17.7598 7 16.6 7Z"
1222
- stroke="#005CFF"
1223
- strokeLinecap="round"
1224
- strokeLinejoin="round"
1225
- />
1226
- <path
1227
- d="M18.6996 9.6001H19.9996C20.477 9.6001 20.9348 9.78974 21.2724 10.1273C21.61 10.4649 21.7996 10.9227 21.7996 11.4001V21.8001H11.5996"
1228
- stroke="#005CFF"
1229
- strokeLinecap="round"
1230
- strokeLinejoin="round"
1231
- />
1232
- <path
1233
- d="M15.5996 18.0498C15.9033 18.0498 16.1493 18.2959 16.1494 18.5996C16.1494 18.9034 15.9034 19.1494 15.5996 19.1494C15.2959 19.1493 15.0498 18.9033 15.0498 18.5996C15.0499 18.296 15.296 18.0499 15.5996 18.0498Z"
1234
- fill="#005CCB"
1235
- stroke="#005CFF"
1236
- />
1237
- </svg>
1238
- ) : ic === 'star' ? (
1239
- <svg width="17" height="17" viewBox="0 0 28 28" fill="none" xmlns="http://www.w3.org/2000/svg" style={{ marginTop: 1, flex: 'none' }}>
1240
- <path
1241
- d="M14.0001 3.5L17.1501 9.91667L24.2667 10.9667L19.1334 15.9833L20.3001 23.1L14.0001 19.7167L7.70006 23.1L8.86673 15.9833L3.7334 10.9667L10.8501 9.91667L14.0001 3.5Z"
1242
- stroke="#005CFF"
1243
- strokeLinecap="round"
1244
- strokeLinejoin="round"
1245
- />
1246
- </svg>
1247
- ) : (
1248
- <Icon name={ic} size={17} color="var(--md-primary)" stroke={1.8} style={{ marginTop: 1, flex: 'none' }} />
1249
- )}
1250
- <span style={{ minWidth: 0, display: 'flex', flexDirection: 'column', rowGap: 2 }}>
1251
- <span className="md-label-sm">{label}</span>
1252
- <span className="md-title-sm" style={{ fontSize: 13.5 }}>
1253
- {value}
1254
- </span>
1255
- </span>
1256
- </div>
1257
- ))}
1258
- </div>
1259
- <p className="fin-criteria-note">* kombiniert</p>
1260
- </>
1261
- )}
1262
- </div>
1263
-
1264
- <div className="mcard mcard--filled fin-criteria-card" style={{ padding: 16, flexDirection: 'column' }}>
1265
- <BreakdownCardHead
1266
- icon="bar-chart-3"
1267
- title={t('autobahn:priceMarket.categoriesTitle')}
1268
- open={categoriesOpen}
1269
- onToggle={() => setCategoriesOpen((o) => !o)}
1270
- />
1271
- {categoriesOpen && (
1272
- <>
1273
- <div className="fin-criteria-divider" />
1274
- <div className="fin-criteria-grid" style={{ display: 'flex', flexDirection: 'column' }}>
1275
- {RATING_TIERS.map(([key, color, background, fontSize], i) => (
1276
- <React.Fragment key={key}>
1277
- {i > 0 && <div className="fin-criteria-divider" />}
1278
- <div
1279
- className="fin-criteria-tier-row"
1280
- style={{ display: 'flex', alignItems: 'flex-start', gap: 10, paddingTop: i === 0 ? 13 : undefined }}
1281
- >
1282
- <span
1283
- className="md-label-sm"
1284
- style={{
1285
- flexShrink: 0,
1286
- fontFamily: 'Arial, Helvetica, Arimo, sans-serif',
1287
- fontWeight: 700,
1288
- fontSize,
1289
- lineHeight: '14px',
1290
- textAlign: 'center',
1291
- borderRadius: 11,
1292
- color,
1293
- background,
1294
- width: 82,
1295
- height: 27,
1296
- padding: 0,
1297
- display: 'flex',
1298
- alignItems: 'center',
1299
- justifyContent: 'center',
1300
- }}
1301
- >
1302
- {t(`autobahn:priceMarket.categories.${key}.label`)}
1303
- </span>
1304
- <div style={{ display: 'flex', flexDirection: 'column', minWidth: 0 }}>
1305
- <span
1306
- className="num md-label-sm"
1307
- style={{
1308
- fontFamily: 'Arial, Helvetica, Arimo, sans-serif',
1309
- fontWeight: 700,
1310
- fontSize: 10.2,
1311
- lineHeight: '14px',
1312
- color: '#1D2A38',
1313
- }}
1314
- >
1315
- {eur(bands[key].min)} – {eur(bands[key].max)} €
1316
- </span>
1317
- <p
1318
- className="md-body-sm"
1319
- style={{
1320
- margin: '2px 0 0',
1321
- fontFamily: 'Arial, Helvetica, Arimo, sans-serif',
1322
- fontWeight: 400,
1323
- fontSize: 8.7,
1324
- lineHeight: '12px',
1325
- color: '#5B6B7F',
1326
- }}
1327
- >
1328
- {t(`autobahn:priceMarket.categories.${key}.description`)}
1329
- </p>
1330
- </div>
1331
- </div>
1332
- </React.Fragment>
1333
- ))}
1334
- <div className="fin-criteria-divider" />
1335
- <div className="fin-criteria-tier-row" style={{ display: 'flex', alignItems: 'flex-start', gap: 10 }}>
1336
- <span
1337
- className="md-label-sm"
1338
- style={{
1339
- flexShrink: 0,
1340
- fontFamily: 'Arial, Helvetica, Arimo, sans-serif',
1341
- fontWeight: 700,
1342
- fontSize: 9,
1343
- lineHeight: '14px',
1344
- textAlign: 'center',
1345
- borderRadius: 11,
1346
- color: '#5B6B7F',
1347
- background: '#C8D1DE',
1348
- width: 82,
1349
- height: 27,
1350
- padding: 0,
1351
- display: 'flex',
1352
- alignItems: 'center',
1353
- justifyContent: 'center',
1354
- }}
1355
- >
1356
- {t('autobahn:priceMarket.categories.noRating.label')}
1357
- </span>
1358
- <div style={{ display: 'flex', flexDirection: 'column', minWidth: 0 }}>
1359
- <span
1360
- className="num md-label-sm"
1361
- style={{
1362
- fontFamily: 'Arial, Helvetica, Arimo, sans-serif',
1363
- fontWeight: 700,
1364
- fontSize: 10.2,
1365
- lineHeight: '14px',
1366
- color: '#1D2A38',
1367
- }}
1368
- >
1369
- ??? – ??? €
1370
- </span>
1371
- <p
1372
- className="md-body-sm"
1373
- style={{
1374
- margin: '2px 0 0',
1375
- fontFamily: 'Arial, Helvetica, Arimo, sans-serif',
1376
- fontWeight: 400,
1377
- fontSize: 8.7,
1378
- lineHeight: '12px',
1379
- color: '#5B6B7F',
1380
- }}
1381
- >
1382
- {t('autobahn:priceMarket.categories.noRating.description')}
1383
- </p>
1384
- </div>
1385
- </div>
1386
- </div>
1387
- </>
1388
- )}
1389
- </div>
1390
- </div>
1391
- )}
1392
- </div>
1393
- );
1394
- };
1395
-
1396
785
  // ---------------------------------------------------------------------------
1397
786
  // Protection products (CNP Santander upsell) — optional, non-functional UI
1398
787
  // ---------------------------------------------------------------------------
package/vdp/index.ts CHANGED
@@ -35,7 +35,6 @@ export {
35
35
  Co2Label,
36
36
  VehicleDescription,
37
37
  TrustStrip,
38
- PriceHistory,
39
38
  ProtectionProducts,
40
39
  VdpAnchors,
41
40
  VdpStickyBar,
@@ -58,7 +57,6 @@ export type {
58
57
  VehicleDescriptionProps,
59
58
  TrustStripProps,
60
59
  TrustItem,
61
- PriceHistoryProps,
62
60
  ProtectionProductsProps,
63
61
  ProtectionProduct,
64
62
  VdpAnchorsProps,
@@ -84,7 +82,6 @@ export type {
84
82
  EnergyTaxSummary,
85
83
  Co2CostsSummary,
86
84
  EquipmentGroups,
87
- PriceHistoryPoint,
88
85
  PriceRatingBand,
89
86
  PriceRatingBands,
90
87
  VdpReview,
package/vdp/types.ts CHANGED
@@ -10,8 +10,8 @@
10
10
  // (`?`) fields are ones we have NO real source for yet; they are optional ON
11
11
  // PURPOSE so the components can detect their absence and render the
12
12
  // NEEDS_DATA_LABEL ('Daten folgt') marker instead of a fabricated value. Never
13
- // default these to placeholder numbers. priceHistory + the market band
14
- // (marketLow / marketAvg / marketHigh) are needs-data by default.
13
+ // default these to placeholder numbers. The market band (marketLow / marketAvg /
14
+ // marketHigh) is needs-data by default.
15
15
 
16
16
  import type { AutobahnPhev } from '../cards/types';
17
17
 
@@ -138,14 +138,6 @@ export interface VdpReview {
138
138
  rating: number;
139
139
  }
140
140
 
141
- /** One point on the price-history sparkline. */
142
- export interface PriceHistoryPoint {
143
- /** x-axis label, e.g. 'vor 6 Wo.' / 'heute'. */
144
- label: string;
145
- /** price in EUR at that point. */
146
- price: number;
147
- }
148
-
149
141
  /** One [min,max] EUR band of the 5-tier Preisbewertung (mirrors legacy IRatingConfig). */
150
142
  export interface PriceRatingBand {
151
143
  min: number;
@@ -267,8 +259,6 @@ export interface VehicleDetail {
267
259
  // --- NEEDS DATA: no real source yet (NEVER fabricate) ---
268
260
  /** original list price (for the struck-through reference + history endpoint). */
269
261
  listPrice?: number;
270
- /** price-history points (sparkline). Needs-data by default. */
271
- priceHistory?: PriceHistoryPoint[];
272
262
  /** lowest comparable market price in EUR (market band lower bound). */
273
263
  marketLow?: number;
274
264
  /** average comparable market price in EUR (market band reference). */