@bytebrand/fe-ui-core-autobahn 1.0.222 → 1.0.224
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/cards/CarCard.tsx +1 -1
- package/cards/cardParts.tsx +1 -1
- package/package.json +30 -30
- package/vdp/VdpModules.tsx +9 -23
package/cards/CarCard.tsx
CHANGED
|
@@ -92,7 +92,7 @@ export interface CarCardProps {
|
|
|
92
92
|
onOpenRateAdjust?: (mode: PaymentMode) => void;
|
|
93
93
|
/**
|
|
94
94
|
* takes over the "Finanzierungsdetails"/"Details" link under the price row — e.g. navigate to
|
|
95
|
-
* this car's own VDP and open its finance modal already expanded
|
|
95
|
+
* this car's own VDP and open its finance modal already expanded (at its top, no auto-scroll),
|
|
96
96
|
* instead of the default plain onOpen(car) navigation. Receives the tab the card was showing
|
|
97
97
|
* (Finanzierung/Leasing/Kaufen) so the destination modal opens on the same one. Optional/
|
|
98
98
|
* page-owned like onOpenRateAdjust; the mobile CTA row's "Rate anpassen" button is untouched
|
package/cards/cardParts.tsx
CHANGED
|
@@ -784,7 +784,7 @@ export const PriceTerms: React.FunctionComponent<{
|
|
|
784
784
|
mode: PaymentMode;
|
|
785
785
|
onOpenRateAdjust?: (mode: PaymentMode) => void;
|
|
786
786
|
/** takes over the "Finanzierungsdetails"/"Details" link's click (e.g. navigate to the VDP and
|
|
787
|
-
* open the finance modal already expanded,
|
|
787
|
+
* open the finance modal already expanded, at its top) — when given, it wins
|
|
788
788
|
* over onOpenRateAdjust for THIS link only; the mobile CTA row's own "Rate anpassen" button
|
|
789
789
|
* keeps using onOpenRateAdjust regardless. */
|
|
790
790
|
onShowDetails?: () => void;
|
package/package.json
CHANGED
|
@@ -1,30 +1,30 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "@bytebrand/fe-ui-core-autobahn",
|
|
3
|
-
"version": "1.0.
|
|
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.224",
|
|
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/vdp/VdpModules.tsx
CHANGED
|
@@ -1328,15 +1328,11 @@ export interface FinanceDetailsModalProps {
|
|
|
1328
1328
|
/** the price-rating badge + bar were clicked: the page closes the modal and scrolls to its
|
|
1329
1329
|
* "Preis & Marktwert" section (#vdp-preis). Omit and they are not a link. */
|
|
1330
1330
|
onShowPriceRating?: () => void;
|
|
1331
|
-
/** opened directly via the page's Finanzierungs-/Leasingdetails link — the sheet
|
|
1332
|
-
*
|
|
1331
|
+
/** opened directly via the page's Finanzierungs-/Leasingdetails link — on mobile the sheet
|
|
1332
|
+
* opens expanded (full height) instead of sized to the "Rate anpassen" controls. It always
|
|
1333
|
+
* opens at its top: no automatic scroll down to the "Repräsentatives Beispiel" (auto.de
|
|
1334
|
+
* feedback 25.11), neither in the mobile sheet nor in the desktop popup. */
|
|
1333
1335
|
initialShowBreakdown?: boolean;
|
|
1334
|
-
/** skips the smooth scrollIntoView/scrollSheetToBreakdown animation initialShowBreakdown
|
|
1335
|
-
* otherwise triggers on open (still sets showBreakdown itself) — for a consumer whose sheet
|
|
1336
|
-
* has nothing ABOVE the breakdown to scroll past (e.g. checkout's stripped-down instance,
|
|
1337
|
-
* with the rate hero/sliders/toggles above it hidden), that animation has nowhere real to go
|
|
1338
|
-
* and only reads as a stray jump. */
|
|
1339
|
-
skipInitialScroll?: boolean;
|
|
1340
1336
|
/** mobile only — price-rating label, drives the eval pill/bar (same as the collapsed card). */
|
|
1341
1337
|
ratingLabel?: string;
|
|
1342
1338
|
/** Kaufen tab only — real carStore.isAvailable (same source as VdpTrustRow's "Sofort
|
|
@@ -1413,7 +1409,6 @@ export const FinanceDetailsModal: React.FunctionComponent<FinanceDetailsModalPro
|
|
|
1413
1409
|
onClose,
|
|
1414
1410
|
onShowPriceRating,
|
|
1415
1411
|
initialShowBreakdown,
|
|
1416
|
-
skipInitialScroll,
|
|
1417
1412
|
ratingLabel,
|
|
1418
1413
|
available,
|
|
1419
1414
|
onModeChange,
|
|
@@ -1438,10 +1433,7 @@ export const FinanceDetailsModal: React.FunctionComponent<FinanceDetailsModalPro
|
|
|
1438
1433
|
// anpassen") or expanded (opened directly via the page's details link) — reset on every open,
|
|
1439
1434
|
// since this component stays mounted (the page always renders it, gated by `open`).
|
|
1440
1435
|
const [showBreakdown, setShowBreakdown] = React.useState(!!initialShowBreakdown);
|
|
1441
|
-
//
|
|
1442
|
-
// own scroll area too — whichever of the two refs is actually visible (show-mobile/hide-mobile
|
|
1443
|
-
// via CSS) is the one scrolled to.
|
|
1444
|
-
const desktopBreakdownRef = React.useRef<HTMLDivElement | null>(null);
|
|
1436
|
+
// the mobile sheet's breakdown — the in-sheet details link scrolls to it.
|
|
1445
1437
|
const mobileBreakdownRef = React.useRef<HTMLDivElement | null>(null);
|
|
1446
1438
|
// mobile (ADV-276): the sheet opens sized to its rate controls — its bottom edge sits right
|
|
1447
1439
|
// under the "Finanzierungs-/Leasing-Details" link (the [data-sheet-fold] element; on Kaufen its
|
|
@@ -1528,18 +1520,12 @@ export const FinanceDetailsModal: React.FunctionComponent<FinanceDetailsModalPro
|
|
|
1528
1520
|
React.useEffect(() => {
|
|
1529
1521
|
if (!open) setSheetAnimated(false);
|
|
1530
1522
|
}, [open]);
|
|
1531
|
-
// opened directly via the page's details link:
|
|
1523
|
+
// opened directly via the page's details link: the mobile sheet opens expanded, but at its top —
|
|
1524
|
+
// no auto-scroll to the "Repräsentatives Beispiel" (auto.de feedback 25.11).
|
|
1532
1525
|
React.useEffect(() => {
|
|
1533
1526
|
if (!open) return;
|
|
1534
1527
|
setShowBreakdown(!!initialShowBreakdown);
|
|
1535
|
-
|
|
1536
|
-
const timer = window.setTimeout(() => {
|
|
1537
|
-
if (mobileBreakdownRef.current?.offsetParent) scrollSheetToBreakdown();
|
|
1538
|
-
else desktopBreakdownRef.current?.scrollIntoView({ behavior: 'smooth', block: 'start' });
|
|
1539
|
-
}, 50);
|
|
1540
|
-
return () => window.clearTimeout(timer);
|
|
1541
|
-
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
1542
|
-
}, [open, initialShowBreakdown, skipInitialScroll]);
|
|
1528
|
+
}, [open, initialShowBreakdown]);
|
|
1543
1529
|
// in-sheet details link: expanding scrolls down to the breakdown, collapsing back to the top.
|
|
1544
1530
|
const revealBreakdownRef = React.useRef(false);
|
|
1545
1531
|
React.useEffect(() => {
|
|
@@ -2099,7 +2085,7 @@ export const FinanceDetailsModal: React.FunctionComponent<FinanceDetailsModalPro
|
|
|
2099
2085
|
t={t}
|
|
2100
2086
|
/>
|
|
2101
2087
|
)}
|
|
2102
|
-
<div
|
|
2088
|
+
<div style={!isCash ? { marginTop: 18 } : undefined}>
|
|
2103
2089
|
{!isCash && (
|
|
2104
2090
|
<>
|
|
2105
2091
|
<p
|