@autobusal/routes-order 1.33.9 → 1.33.10
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/CHANGELOG.md +5 -0
- package/Step1/prepare.ts +21 -2
- package/package.json +1 -1
- package/styles.ts +13 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,10 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 1.33.10 (2026-08-29)
|
|
4
|
+
|
|
5
|
+
- The return date falls back to the outbound when the URL carries no real one ('none' on a one-way link), so switching a collapsed search to Round Trip opens the calendar on the month being travelled and cannot offer a day before the departure.
|
|
6
|
+
- The collapsed search panel sits above the step markers: its backdrop-filter creates a stacking context, so the date picker used to draw underneath them.
|
|
7
|
+
|
|
3
8
|
## 1.33.9 (2026-08-28)
|
|
4
9
|
|
|
5
10
|
- Return-leg empty state fetches RETURN alternatives (swapped pair + return date) and its suggested-day links fill the return slot instead of rewriting the departure; nearby-city swaps map back to the URL's outbound pair (sweep #50).
|
package/Step1/prepare.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Params } from 'react-router-dom';
|
|
2
|
-
import { futureDate } from '@autobusal/utilities';
|
|
2
|
+
import { futureDate, isPreparedDate } from '@autobusal/utilities';
|
|
3
3
|
import { RoutesSearchForm } from '@autobusal/routes-search/types';
|
|
4
4
|
|
|
5
5
|
const prepare = (
|
|
@@ -18,7 +18,26 @@ const prepare = (
|
|
|
18
18
|
const to = params.to ?? defaultLocations.to;
|
|
19
19
|
|
|
20
20
|
const departure = params.departure?.replace(/-/g, '/') ?? futureDate(1);
|
|
21
|
-
|
|
21
|
+
|
|
22
|
+
/*
|
|
23
|
+
* Edited: Claude - Date: 2026-08-29
|
|
24
|
+
*
|
|
25
|
+
* THE RETURN DATE IS TIED TO THE OUTBOUND. A one-way URL carries the
|
|
26
|
+
* literal "none" in the return slot, and `??` only catches null - so
|
|
27
|
+
* "none" travelled all the way into the picker, whose grid is built by
|
|
28
|
+
* splitting on "/" and feeding Date.UTC: an Invalid Date, rendered as
|
|
29
|
+
* January. Switching a collapsed search from One Way to Round Trip
|
|
30
|
+
* showed exactly that.
|
|
31
|
+
*
|
|
32
|
+
* Anything that is not a real date falls back to the departure, which is
|
|
33
|
+
* also the picker's floor - so the return calendar opens on the month
|
|
34
|
+
* being travelled and cannot offer a day before the outbound.
|
|
35
|
+
*/
|
|
36
|
+
const requested = params._return?.replace(/-/g, '/');
|
|
37
|
+
|
|
38
|
+
const _return = isPreparedDate(requested)
|
|
39
|
+
? String(requested)
|
|
40
|
+
: (isPreparedDate(departure) ? departure : futureDate(2));
|
|
22
41
|
|
|
23
42
|
const adults = params.adults ?? 1;
|
|
24
43
|
const children = params.children ?? 0;
|
package/package.json
CHANGED
package/styles.ts
CHANGED
|
@@ -94,6 +94,19 @@ export const SearchPanel = styled.div<{ $open: boolean }>`
|
|
|
94
94
|
display: ${ props => props.$open ? 'block' : 'none' };
|
|
95
95
|
margin-top: 14px;
|
|
96
96
|
padding: 20px;
|
|
97
|
+
|
|
98
|
+
/**
|
|
99
|
+
* Edited: Claude - Date: 2026-08-29
|
|
100
|
+
*
|
|
101
|
+
* ABOVE THE STEPS, because backdrop-filter below creates a stacking
|
|
102
|
+
* context: everything inside this panel is confined to it, so the date
|
|
103
|
+
* picker's own z-index (100) could never beat the step markers sitting
|
|
104
|
+
* at z-index 1 in the page's context. Opening the collapsed search and
|
|
105
|
+
* clicking a date drew the calendar UNDERNEATH the 1-2-3-4 circles.
|
|
106
|
+
* Raising the panel itself lifts its whole subtree with it.
|
|
107
|
+
*/
|
|
108
|
+
position: relative;
|
|
109
|
+
z-index: 20;
|
|
97
110
|
background: ${ props => props.theme.header.transparent };
|
|
98
111
|
backdrop-filter: blur(25px);
|
|
99
112
|
-webkit-backdrop-filter: blur(25px);
|