@autobusal/providers 1.20.0 → 1.21.0
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 +6 -0
- package/Setup/Preload.tsx +9 -1
- package/package.json +1 -1
- package/types/settings.ts +6 -0
package/CHANGELOG.md
CHANGED
|
@@ -7,6 +7,12 @@ adheres to [Keep a Changelog](https://keepachangelog.com/en/1.1.0/) and
|
|
|
7
7
|
> Note: 1.8.0 through 1.11.0 were published without changelog entries. The
|
|
8
8
|
> gap is left as-is rather than reconstructed after the fact.
|
|
9
9
|
|
|
10
|
+
## 1.21.0
|
|
11
|
+
|
|
12
|
+
`SettingsData.today` — the earliest bookable date as the server reckons it,
|
|
13
|
+
handed to the calendar at startup so the picker stops flooring on the buyer's
|
|
14
|
+
device clock.
|
|
15
|
+
|
|
10
16
|
## 1.20.0
|
|
11
17
|
|
|
12
18
|
`FoundData.departs_in` — minutes until departure, for same-day searches only,
|
package/Setup/Preload.tsx
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { JsonLd } from '@autobusal/common';
|
|
1
|
+
import { JsonLd, setServerToday } from '@autobusal/common';
|
|
2
2
|
import { SettingsData } from '../types/settings';
|
|
3
3
|
import { useSystemTheme } from '@autobusal/hooks';
|
|
4
4
|
|
|
@@ -15,6 +15,14 @@ interface Props {
|
|
|
15
15
|
// fallback rendered above the router; a page's own <Meta title=...> renders
|
|
16
16
|
// deeper in the tree and correctly overrides it once data loads.
|
|
17
17
|
const Preload = ({ data, children }: Props): JSX.Element => {
|
|
18
|
+
// Edited: Ferjolt Ozuni - Date: 2026-08-03
|
|
19
|
+
// Hand the booking calendar the SERVER's idea of today, before anything
|
|
20
|
+
// renders one. Without it the picker floors on the buyer's device clock -
|
|
21
|
+
// so somebody in Shanghai on the 5th could not select the 4th for an
|
|
22
|
+
// Italian coach that had not left yet, on a date the server would have
|
|
23
|
+
// sold them quite happily.
|
|
24
|
+
setServerToday(data.today);
|
|
25
|
+
|
|
18
26
|
// we arrange the font family names before inserting them
|
|
19
27
|
const fontTitle = data.theme.fontFamily.title.replace(/ /g, '+');
|
|
20
28
|
const fontContent = data.theme.fontFamily.content.replace(/ /g, '+');
|
package/package.json
CHANGED
package/types/settings.ts
CHANGED
|
@@ -1,4 +1,10 @@
|
|
|
1
1
|
export interface SettingsData {
|
|
2
|
+
// Edited: Ferjolt Ozuni - Date: 2026-08-03
|
|
3
|
+
// The earliest bookable date as the SERVER reckons it, d/m/Y. The date
|
|
4
|
+
// picker floors on this rather than on the browser's clock, which is the
|
|
5
|
+
// buyer's clock and says nothing about where they are travelling.
|
|
6
|
+
today?: string
|
|
7
|
+
|
|
2
8
|
url: string
|
|
3
9
|
|
|
4
10
|
// Edited: Ferjolt Ozuni - Date: 2026-08-01
|