@adminide-stack/yantra-mobile 12.0.87 → 12.0.88
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/lib/features/agent-chat/NativeAgentChat.js +14 -16
- package/lib/features/agent-chat/NativeAgentChat.js.map +1 -1
- package/lib/features/agent-chat/edgeSwipe.js +8 -0
- package/lib/features/agent-chat/edgeSwipe.js.map +1 -0
- package/lib/features/agent-chat/edgeZone.js +6 -0
- package/lib/features/agent-chat/edgeZone.js.map +1 -0
- package/lib/features/canvas/useCanvasSession.js +11 -3
- package/lib/features/canvas/useCanvasSession.js.map +1 -1
- package/lib/features/chat/emptyChatResponse.js +1 -1
- package/lib/features/chat/emptyChatResponse.js.map +1 -1
- package/lib/features/chat/streamingMarkdown.js +3 -2
- package/lib/features/chat/streamingMarkdown.js.map +1 -1
- package/lib/features/job-search/JobSearchAgentChatPane.js +33 -5
- package/lib/features/job-search/JobSearchAgentChatPane.js.map +1 -1
- package/lib/features/job-search/JobSearchExperience.js +12 -16
- package/lib/features/job-search/JobSearchExperience.js.map +1 -1
- package/lib/features/messaging/chatModel.js +60 -33
- package/lib/features/messaging/chatModel.js.map +1 -1
- package/lib/features/shopping/ShoppingExperience.js +11 -16
- package/lib/features/shopping/ShoppingExperience.js.map +1 -1
- package/lib/features/travel/CarPriceGuide.js +132 -0
- package/lib/features/travel/CarPriceGuide.js.map +1 -0
- package/lib/features/travel/CarResultCard.js +267 -0
- package/lib/features/travel/CarResultCard.js.map +1 -0
- package/lib/features/travel/FlightDealsBoard.js +4 -8
- package/lib/features/travel/FlightDealsBoard.js.map +1 -1
- package/lib/features/travel/FlightResultCard.js +266 -0
- package/lib/features/travel/FlightResultCard.js.map +1 -0
- package/lib/features/travel/PopularDestinations.js +11 -11
- package/lib/features/travel/PopularDestinations.js.map +1 -1
- package/lib/features/travel/TravelAgentChatPane.js +2 -1
- package/lib/features/travel/TravelAgentChatPane.js.map +1 -1
- package/lib/features/travel/TravelBookHero.js +12 -2
- package/lib/features/travel/TravelBookHero.js.map +1 -1
- package/lib/features/travel/TravelExperience.js +407 -149
- package/lib/features/travel/TravelExperience.js.map +1 -1
- package/lib/features/travel/TravelPropertyCard.js +63 -55
- package/lib/features/travel/TravelPropertyCard.js.map +1 -1
- package/lib/features/travel/TravelResultsMap.js +4 -3
- package/lib/features/travel/TravelResultsMap.js.map +1 -1
- package/lib/features/travel/carView.js +190 -0
- package/lib/features/travel/carView.js.map +1 -0
- package/lib/features/travel/catalog.js +10 -1
- package/lib/features/travel/catalog.js.map +1 -1
- package/lib/features/travel/chat/TravelChatResultCard.js +19 -4
- package/lib/features/travel/chat/TravelChatResultCard.js.map +1 -1
- package/lib/features/travel/chat/widgetContent.js +30 -8
- package/lib/features/travel/chat/widgetContent.js.map +1 -1
- package/lib/features/travel/flightView.js +106 -0
- package/lib/features/travel/flightView.js.map +1 -0
- package/lib/features/travel/parseTravelIntent.js +81 -17
- package/lib/features/travel/parseTravelIntent.js.map +1 -1
- package/lib/features/travel/searchError.js +15 -0
- package/lib/features/travel/searchError.js.map +1 -0
- package/lib/features/travel/services/placePredictions.js +1 -1
- package/lib/features/travel/services/placePredictions.js.map +1 -1
- package/lib/features/travel/services/travelFlightSearch.js +35 -7
- package/lib/features/travel/services/travelFlightSearch.js.map +1 -1
- package/lib/features/travel/services/travelPropertySearch.js +15 -10
- package/lib/features/travel/services/travelPropertySearch.js.map +1 -1
- package/lib/features/travel/types.js.map +1 -1
- package/lib/features/travel/useTravelSearch.js +43 -20
- package/lib/features/travel/useTravelSearch.js.map +1 -1
- package/lib/hooks/useCdecliChannel.js.map +1 -1
- package/lib/screens/TravelNative/index.js +3 -2
- package/lib/screens/TravelNative/index.js.map +1 -1
- package/lib/screens/WebBuilder/webbuilderWarmCache.js +16 -3
- package/lib/screens/WebBuilder/webbuilderWarmCache.js.map +1 -1
- package/package.json +2 -2
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {jsx,jsxs}from'react/jsx-runtime';import {useEffect,useState,
|
|
1
|
+
import {jsx,jsxs}from'react/jsx-runtime';import {useEffect,useRef,useState,useCallback,useMemo}from'react';import {StyleSheet,useColorScheme,Animated,Keyboard,Platform,View,Text,Pressable,ActivityIndicator,KeyboardAvoidingView,ScrollView}from'react-native';import {useFocusEffect}from'@react-navigation/native';import {MaterialCommunityIcons}from'@expo/vector-icons';import {useSafeInsets}from'../canvas/withRemoteSafeArea.js';import {createTravelExec}from'./travelExec.js';import {setTravelRuntime}from'./travelRuntime.js';import {useTravelSearch,emptyTravelQuery}from'./useTravelSearch.js';import {TravelPropertyCard}from'./TravelPropertyCard.js';import {TravelDetailSheet}from'./TravelDetailSheet.js';import {SavedPanel}from'./SavedPanel.js';import {HistoryPanel}from'./HistoryPanel.js';import {BookingsPanel}from'./BookingsPanel.js';import {hydrateSavedStays}from'./savedStays.js';import {hydrateTravelHistory,recordPropertyView}from'./travelHistoryStore.js';import {TravelAgentChatPane}from'./TravelAgentChatPane.js';import {shouldClaimOpenAgentMove,isOpenAgentSwipe}from'./travelAgentSwipe.js';import {createEdgeSwipe}from'../agent-chat/edgeSwipe.js';import {TravelType}from'./types.js';import {formatLocalDate,parseLocalDateInput}from'./parseTravelIntent.js';import {TravelResultsMap}from'./TravelResultsMap.js';import {FlightResultCard}from'./FlightResultCard.js';import {CarResultCard}from'./CarResultCard.js';import {carRows,carPriceGuide,carClassOptions,carView}from'./carView.js';import {CarPriceGuide,CarCompareLinks}from'./CarPriceGuide.js';import {stopsOptions,matchesStops}from'./flightView.js';import {TravelLanding}from'./TravelLanding.js';import {TravelBookHero}from'./TravelBookHero.js';import {TravelRailFlyout}from'./TravelRailFlyout.js';import {DiscoverPanel}from'./DiscoverPanel.js';import {WorkspacePanel}from'./WorkspacePanel.js';import {FlightCompareBar}from'./FlightCompareBar.js';import {sortFlightProperties,computeFlightDeals}from'./flightDeals.js';import {SOURCE_ORDER,propertySource,SOURCE_LABELS,resultsFoundLabel}from'./catalog.js';import {ensureFlightOrigin}from'./services/resolveOriginCity.js';import {APP_NAV,RAIL_NAV}from'./appNav.js';var __defProp = Object.defineProperty;
|
|
2
2
|
var __defProps = Object.defineProperties;
|
|
3
3
|
var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
|
|
4
4
|
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
@@ -17,6 +17,12 @@ var __spreadValues = (a, b) => {
|
|
|
17
17
|
return a;
|
|
18
18
|
};
|
|
19
19
|
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
20
|
+
const PAGE_TITLES = {
|
|
21
|
+
discover: "Discover",
|
|
22
|
+
saved: "Saved",
|
|
23
|
+
history: "Search history",
|
|
24
|
+
bookings: "My bookings"
|
|
25
|
+
};
|
|
20
26
|
function nightsAndRange(from, to) {
|
|
21
27
|
const nights = Math.max(1, Math.round((to.getTime() - from.getTime()) / 864e5));
|
|
22
28
|
const fmt = (d) => d.toLocaleDateString("en-US", {
|
|
@@ -28,15 +34,30 @@ function nightsAndRange(from, to) {
|
|
|
28
34
|
range: `${fmt(from)} - ${fmt(to)}`
|
|
29
35
|
};
|
|
30
36
|
}
|
|
37
|
+
function searchSummaryMeta(form, range) {
|
|
38
|
+
const parts = [range];
|
|
39
|
+
if (form.travelType === TravelType.FLIGHTS) {
|
|
40
|
+
parts.push(form.returnFlight ? "Round trip" : "One way");
|
|
41
|
+
} else if (form.travelType === TravelType.HOTELS) {
|
|
42
|
+
parts.push(`${form.guests} guest${form.guests === 1 ? "" : "s"}`);
|
|
43
|
+
}
|
|
44
|
+
return parts.filter(Boolean).join(" \xB7 ");
|
|
45
|
+
}
|
|
46
|
+
const SEARCHING_NOUN = {
|
|
47
|
+
[TravelType.FLIGHTS]: "flights",
|
|
48
|
+
[TravelType.CARS]: "cars",
|
|
49
|
+
[TravelType.HOTELS]: "stays"
|
|
50
|
+
};
|
|
31
51
|
function TravelExperience({
|
|
32
52
|
token,
|
|
33
53
|
indexUrl,
|
|
34
54
|
sessionError,
|
|
55
|
+
onRetrySession,
|
|
35
56
|
hostChat,
|
|
36
57
|
onAgentVisibleChange,
|
|
37
58
|
initialAgentSeed = null
|
|
38
59
|
}) {
|
|
39
|
-
var _a, _b, _c, _d, _e;
|
|
60
|
+
var _a, _b, _c, _d, _e, _f, _g;
|
|
40
61
|
const isDark = useColorScheme() === "dark";
|
|
41
62
|
const ink = isDark ? "#f8fafc" : "#0f172a";
|
|
42
63
|
const muted = isDark ? "#94a3b8" : "#64748b";
|
|
@@ -59,6 +80,29 @@ function TravelExperience({
|
|
|
59
80
|
}, [token, indexUrl]);
|
|
60
81
|
const insets = useSafeInsets();
|
|
61
82
|
const searchState = useTravelSearch();
|
|
83
|
+
const fabShown = useRef(new Animated.Value(1)).current;
|
|
84
|
+
const [fabHidden, setFabHiddenState] = useState(false);
|
|
85
|
+
const fabHiddenRef = useRef(false);
|
|
86
|
+
const lastScrollY = useRef(0);
|
|
87
|
+
const setFabHidden = useCallback((hidden) => {
|
|
88
|
+
if (fabHiddenRef.current === hidden) return;
|
|
89
|
+
fabHiddenRef.current = hidden;
|
|
90
|
+
setFabHiddenState(hidden);
|
|
91
|
+
Animated.timing(fabShown, {
|
|
92
|
+
toValue: hidden ? 0 : 1,
|
|
93
|
+
duration: 180,
|
|
94
|
+
useNativeDriver: true
|
|
95
|
+
}).start();
|
|
96
|
+
}, [fabShown]);
|
|
97
|
+
const onResultsScroll = useCallback((event) => {
|
|
98
|
+
const {
|
|
99
|
+
y
|
|
100
|
+
} = event.nativeEvent.contentOffset;
|
|
101
|
+
const dy = y - lastScrollY.current;
|
|
102
|
+
lastScrollY.current = y;
|
|
103
|
+
if (y < 40 || dy < -6) setFabHidden(false);
|
|
104
|
+
else if (dy > 6) setFabHidden(true);
|
|
105
|
+
}, [setFabHidden]);
|
|
62
106
|
const [form, setForm] = useState(emptyTravelQuery);
|
|
63
107
|
const [fromText, setFromText] = useState(() => formatLocalDate(emptyTravelQuery().dates[0]));
|
|
64
108
|
const [toText, setToText] = useState(() => formatLocalDate(emptyTravelQuery().dates[1]));
|
|
@@ -71,24 +115,34 @@ function TravelExperience({
|
|
|
71
115
|
const [sourceFilter, setSourceFilter] = useState("all");
|
|
72
116
|
const [flightSort, setFlightSort] = useState("cheapest");
|
|
73
117
|
const [mapPropertyId, setMapPropertyId] = useState(null);
|
|
118
|
+
const [resultsMode, setResultsMode] = useState("list");
|
|
119
|
+
useEffect(() => {
|
|
120
|
+
lastScrollY.current = 0;
|
|
121
|
+
setFabHidden(false);
|
|
122
|
+
}, [view, resultsMode, searchState.lastQuery, setFabHidden]);
|
|
123
|
+
const [stopsFilter, setStopsFilter] = useState("any");
|
|
124
|
+
const [carClassFilter, setCarClassFilter] = useState(null);
|
|
74
125
|
const [keyboardOpen, setKeyboardOpen] = useState(false);
|
|
75
126
|
const chatOpenRef = useRef(chatOpen);
|
|
76
127
|
chatOpenRef.current = chatOpen;
|
|
77
128
|
const blockedRef = useRef(false);
|
|
78
|
-
blockedRef.current = Boolean(detail);
|
|
79
|
-
const swipe = useMemo(() =>
|
|
80
|
-
|
|
81
|
-
|
|
129
|
+
blockedRef.current = Boolean(detail || keyboardOpen);
|
|
130
|
+
const swipe = useMemo(() => createEdgeSwipe({
|
|
131
|
+
zone: {
|
|
132
|
+
edge: "right",
|
|
133
|
+
width: 44,
|
|
134
|
+
excludeBottom: 72
|
|
135
|
+
},
|
|
136
|
+
claim: (g) => !chatOpenRef.current && !blockedRef.current && shouldClaimOpenAgentMove(g),
|
|
137
|
+
release: (g) => {
|
|
82
138
|
if (!chatOpenRef.current && !blockedRef.current && isOpenAgentSwipe(g)) {
|
|
83
139
|
setChatOpen(true);
|
|
84
140
|
}
|
|
85
141
|
}
|
|
86
142
|
}), []);
|
|
87
|
-
useFocusEffect(useCallback(() => {
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
setChatOpen(false);
|
|
91
|
-
};
|
|
143
|
+
useFocusEffect(useCallback(() => () => {
|
|
144
|
+
setDetail(null);
|
|
145
|
+
setChatOpen(false);
|
|
92
146
|
}, []));
|
|
93
147
|
useEffect(() => {
|
|
94
148
|
onAgentVisibleChange == null ? void 0 : onAgentVisibleChange(chatOpen);
|
|
@@ -194,8 +248,42 @@ function TravelExperience({
|
|
|
194
248
|
source,
|
|
195
249
|
properties: rankedProperties.filter((p) => propertySource(p) === source)
|
|
196
250
|
})).filter((row) => row.properties.length > 0), [rankedProperties]);
|
|
197
|
-
const
|
|
251
|
+
const isFlightSearch = form.travelType === TravelType.FLIGHTS;
|
|
252
|
+
const isCarSearch = form.travelType === TravelType.CARS;
|
|
253
|
+
const carSplit = useMemo(() => isCarSearch ? carRows(rankedProperties) : {
|
|
254
|
+
cars: [],
|
|
255
|
+
estimates: [],
|
|
256
|
+
links: []
|
|
257
|
+
}, [isCarSearch, rankedProperties]);
|
|
258
|
+
const carGuideOnly = isCarSearch && carSplit.cars.length === 0 && (carSplit.estimates.length + carSplit.links.length > 0 || searchState.isEnriching);
|
|
259
|
+
const carGuide = useMemo(() => carPriceGuide(carSplit.estimates), [carSplit.estimates]);
|
|
260
|
+
const carClasses = useMemo(() => isCarSearch ? carClassOptions(rankedProperties) : [], [isCarSearch, rankedProperties]);
|
|
261
|
+
const flightStops = useMemo(() => isFlightSearch ? stopsOptions(rankedProperties) : [], [isFlightSearch, rankedProperties]);
|
|
262
|
+
const visibleProperties = (isCarSearch ? carSplit.cars : rankedProperties).filter((p) => (sourceFilter === "all" || propertySource(p) === sourceFilter) && (!isFlightSearch || matchesStops(p, stopsFilter)) && (!isCarSearch || !carClassFilter || carView(p).carClass === carClassFilter));
|
|
263
|
+
const flightTags = useMemo(() => {
|
|
264
|
+
const tags = /* @__PURE__ */ new Map();
|
|
265
|
+
if (flightDeals == null ? void 0 : flightDeals.fastest) tags.set(flightDeals.fastest.id, {
|
|
266
|
+
label: "Fastest",
|
|
267
|
+
color: "#7c3aed"
|
|
268
|
+
});
|
|
269
|
+
if (flightDeals == null ? void 0 : flightDeals.best) tags.set(flightDeals.best.id, {
|
|
270
|
+
label: "Best",
|
|
271
|
+
color: "#2563eb"
|
|
272
|
+
});
|
|
273
|
+
if (flightDeals == null ? void 0 : flightDeals.cheapest) tags.set(flightDeals.cheapest.id, {
|
|
274
|
+
label: "Cheapest",
|
|
275
|
+
color: "#047857"
|
|
276
|
+
});
|
|
277
|
+
return tags;
|
|
278
|
+
}, [flightDeals]);
|
|
198
279
|
const selectedStay = (_a = visibleProperties.find((row) => row.id === mapPropertyId)) != null ? _a : null;
|
|
280
|
+
const showResultsMap = visibleProperties.some((row) => row.kind !== "flight" && row.kind !== "car");
|
|
281
|
+
const mapMode = showResultsMap && resultsMode === "map";
|
|
282
|
+
useEffect(() => {
|
|
283
|
+
setResultsMode("list");
|
|
284
|
+
setStopsFilter("any");
|
|
285
|
+
setCarClassFilter(null);
|
|
286
|
+
}, [searchState.lastQuery]);
|
|
199
287
|
const panelTheme = {
|
|
200
288
|
card,
|
|
201
289
|
border,
|
|
@@ -204,8 +292,9 @@ function TravelExperience({
|
|
|
204
292
|
};
|
|
205
293
|
const fromDate = (_b = parseLocalDateInput(fromText)) != null ? _b : form.dates[0];
|
|
206
294
|
const toDate = (_c = parseLocalDateInput(toText)) != null ? _c : form.dates[1];
|
|
295
|
+
const rentalDays = Math.max(1, Math.round((toDate.getTime() - fromDate.getTime()) / 864e5));
|
|
207
296
|
const dateMeta = nightsAndRange(fromDate, toDate);
|
|
208
|
-
const pageTitle = view === "
|
|
297
|
+
const pageTitle = view === "workspace" ? railLabel : (_d = PAGE_TITLES[view]) != null ? _d : "Book";
|
|
209
298
|
const pickNavItem = (item, groupLabel) => {
|
|
210
299
|
setRailFlyout(null);
|
|
211
300
|
setRailLabel(groupLabel);
|
|
@@ -260,7 +349,11 @@ function TravelExperience({
|
|
|
260
349
|
}], children: "Travel unavailable" }),
|
|
261
350
|
/* @__PURE__ */ jsx(Text, { style: [styles.detail, {
|
|
262
351
|
color: muted
|
|
263
|
-
}], children: sessionError })
|
|
352
|
+
}], children: sessionError }),
|
|
353
|
+
onRetrySession ? (
|
|
354
|
+
// It retries on its own too, but a dead end with no way out read as broken.
|
|
355
|
+
/* @__PURE__ */ jsx(Pressable, { onPress: onRetrySession, accessibilityRole: "button", style: [styles.retryButton, styles.sessionRetry], children: /* @__PURE__ */ jsx(Text, { style: styles.retryText, children: "Try again" }) })
|
|
356
|
+
) : null
|
|
264
357
|
] }) });
|
|
265
358
|
}
|
|
266
359
|
if (!token) {
|
|
@@ -270,44 +363,88 @@ function TravelExperience({
|
|
|
270
363
|
justifyContent: "center"
|
|
271
364
|
}], children: /* @__PURE__ */ jsx(ActivityIndicator, {}) });
|
|
272
365
|
}
|
|
273
|
-
const bookHero = /* @__PURE__ */ jsx(
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
366
|
+
const bookHero = /* @__PURE__ */ jsx(
|
|
367
|
+
TravelBookHero,
|
|
368
|
+
{
|
|
369
|
+
travelType: form.travelType,
|
|
370
|
+
location: form.location.formattedAddress,
|
|
371
|
+
pickupLocation: form.pickupLocation,
|
|
372
|
+
dropoffLocation: form.dropoffLocation,
|
|
373
|
+
guests: form.guests,
|
|
374
|
+
returnFlight: form.returnFlight,
|
|
375
|
+
nights: isCarSearch ? dateMeta.nights.replace(/\bnight(s?)\b/, "day$1") : dateMeta.nights,
|
|
376
|
+
range: dateMeta.range,
|
|
377
|
+
fromText,
|
|
378
|
+
toText,
|
|
379
|
+
compact: showResults || keyboardOpen,
|
|
380
|
+
showAgentCta: showLanding && !keyboardOpen,
|
|
381
|
+
onTypeChange: (travelType) => setForm((prev) => __spreadProps(__spreadValues({}, prev), {
|
|
382
|
+
travelType
|
|
383
|
+
})),
|
|
384
|
+
onLocationChange: (value) => setForm((prev) => __spreadProps(__spreadValues({}, prev), {
|
|
385
|
+
location: {
|
|
386
|
+
formattedAddress: value
|
|
387
|
+
}
|
|
388
|
+
})),
|
|
389
|
+
onLocationResolved: (location) => setForm((prev) => __spreadProps(__spreadValues({}, prev), {
|
|
390
|
+
location
|
|
391
|
+
})),
|
|
392
|
+
onPickupChange: (pickupLocation) => setForm((prev) => __spreadProps(__spreadValues({}, prev), {
|
|
393
|
+
pickupLocation
|
|
394
|
+
})),
|
|
395
|
+
onPickupResolved: (place) => setForm((prev) => __spreadProps(__spreadValues({}, prev), {
|
|
396
|
+
pickupLocation: place.formattedAddress,
|
|
397
|
+
location: prev.travelType === TravelType.CARS ? place : prev.location
|
|
398
|
+
})),
|
|
399
|
+
onDropoffChange: (dropoffLocation) => setForm((prev) => __spreadProps(__spreadValues({}, prev), {
|
|
400
|
+
dropoffLocation
|
|
401
|
+
})),
|
|
402
|
+
onDropoffResolved: (place) => setForm((prev) => __spreadProps(__spreadValues({}, prev), {
|
|
403
|
+
dropoffLocation: place.formattedAddress
|
|
404
|
+
})),
|
|
405
|
+
onFromChange: setFromText,
|
|
406
|
+
onToChange: setToText,
|
|
407
|
+
onGuestsChange: (guests) => setForm((prev) => __spreadProps(__spreadValues({}, prev), {
|
|
408
|
+
guests: Math.max(1, guests)
|
|
409
|
+
})),
|
|
410
|
+
onReturnToggle: () => setForm((prev) => __spreadProps(__spreadValues({}, prev), {
|
|
411
|
+
returnFlight: !prev.returnFlight
|
|
412
|
+
})),
|
|
413
|
+
onSearch: runSearchNow,
|
|
414
|
+
onOpenAgent: () => setChatOpen(true)
|
|
278
415
|
}
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
})), onPickupChange: (pickupLocation) => setForm((prev) => __spreadProps(__spreadValues({}, prev), {
|
|
282
|
-
pickupLocation
|
|
283
|
-
})), onPickupResolved: (place) => setForm((prev) => __spreadProps(__spreadValues({}, prev), {
|
|
284
|
-
pickupLocation: place.formattedAddress,
|
|
285
|
-
location: prev.travelType === TravelType.CARS ? place : prev.location
|
|
286
|
-
})), onDropoffChange: (dropoffLocation) => setForm((prev) => __spreadProps(__spreadValues({}, prev), {
|
|
287
|
-
dropoffLocation
|
|
288
|
-
})), onDropoffResolved: (place) => setForm((prev) => __spreadProps(__spreadValues({}, prev), {
|
|
289
|
-
dropoffLocation: place.formattedAddress
|
|
290
|
-
})), onFromChange: setFromText, onToChange: setToText, onGuestsChange: (guests) => setForm((prev) => __spreadProps(__spreadValues({}, prev), {
|
|
291
|
-
guests: Math.max(1, guests)
|
|
292
|
-
})), onReturnToggle: () => setForm((prev) => __spreadProps(__spreadValues({}, prev), {
|
|
293
|
-
returnFlight: !prev.returnFlight
|
|
294
|
-
})), onSearch: runSearchNow, onOpenAgent: () => setChatOpen(true) });
|
|
295
|
-
return /* @__PURE__ */ jsxs(View, { style: [styles.fill, {
|
|
416
|
+
);
|
|
417
|
+
return /* @__PURE__ */ jsxs(View, __spreadProps(__spreadValues({ style: [styles.fill, {
|
|
296
418
|
backgroundColor: screen
|
|
297
|
-
}], testID: "travel-panel", children: [
|
|
419
|
+
}], testID: "travel-panel" }, swipe.panHandlers), { children: [
|
|
298
420
|
/* @__PURE__ */ jsxs(KeyboardAvoidingView, { style: styles.fill, behavior: Platform.OS === "ios" ? "padding" : void 0, children: [
|
|
299
|
-
view === "book" &&
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
/* @__PURE__ */ jsx(
|
|
303
|
-
|
|
421
|
+
view === "book" && showResults && !showLanding ? (
|
|
422
|
+
// The search itself is the header: one slim pill that reads back what was
|
|
423
|
+
// searched and opens the search again - not a second "Book" title band.
|
|
424
|
+
/* @__PURE__ */ jsx(View, { style: styles.summaryRow, children: /* @__PURE__ */ jsxs(Pressable, { onPress: goToBookHome, accessibilityRole: "button", accessibilityLabel: "Edit search", style: [styles.summaryPill, {
|
|
425
|
+
backgroundColor: card,
|
|
426
|
+
borderColor: border
|
|
427
|
+
}], children: [
|
|
428
|
+
/* @__PURE__ */ jsx(MaterialCommunityIcons, { name: "chevron-left", size: 22, color: ink }),
|
|
429
|
+
/* @__PURE__ */ jsxs(View, { style: styles.summaryText, children: [
|
|
430
|
+
/* @__PURE__ */ jsx(Text, { style: [styles.summaryTitle, {
|
|
431
|
+
color: ink
|
|
432
|
+
}], numberOfLines: 1, children: searchState.lastQuery || form.location.formattedAddress || "Your search" }),
|
|
433
|
+
/* @__PURE__ */ jsx(Text, { style: [styles.summaryMeta, {
|
|
434
|
+
color: muted
|
|
435
|
+
}], numberOfLines: 1, children: searchSummaryMeta(form, dateMeta.range) })
|
|
436
|
+
] }),
|
|
437
|
+
/* @__PURE__ */ jsx(MaterialCommunityIcons, { name: "tune-variant", size: 18, color: muted })
|
|
438
|
+
] }) })
|
|
439
|
+
) : null,
|
|
440
|
+
view === "book" && (showLanding || showResults) ? null : /* @__PURE__ */ jsx(View, { style: styles.topBar, children: /* @__PURE__ */ jsx(Text, { style: [styles.pageTitle, {
|
|
304
441
|
color: ink
|
|
305
442
|
}], children: pageTitle }) }),
|
|
306
443
|
view === "discover" ? /* @__PURE__ */ jsx(DiscoverPanel, __spreadValues({}, panelTheme)) : null,
|
|
307
444
|
view === "saved" ? /* @__PURE__ */ jsx(SavedPanel, __spreadValues({ onOpenDetails: openDetails }, panelTheme)) : null,
|
|
308
445
|
view === "history" ? /* @__PURE__ */ jsx(HistoryPanel, __spreadValues({ onRerunSearch: rerunSearch, onOpenDetails: openDetails }, panelTheme)) : null,
|
|
309
446
|
view === "bookings" ? /* @__PURE__ */ jsx(BookingsPanel, __spreadValues({ onOpenDetails: openDetails }, panelTheme)) : null,
|
|
310
|
-
view === "workspace" ? /* @__PURE__ */ jsx(WorkspacePanel, __spreadProps(__spreadValues({ groupLabel: (
|
|
447
|
+
view === "workspace" ? /* @__PURE__ */ jsx(WorkspacePanel, __spreadProps(__spreadValues({ groupLabel: (_e = APP_NAV.find((g) => g.railLabel === railLabel)) == null ? void 0 : _e.label, initialPageKey: workspacePageKey }, panelTheme), { onJumpView: (next) => {
|
|
311
448
|
setRailLabel("Travel");
|
|
312
449
|
setView(next === "book" ? "book" : next);
|
|
313
450
|
}, onOpenAgent: () => setChatOpen(true) })) : null,
|
|
@@ -330,81 +467,130 @@ function TravelExperience({
|
|
|
330
467
|
setView("bookings");
|
|
331
468
|
}, pickupLocation: form.pickupLocation }))
|
|
332
469
|
] }) }) : null,
|
|
333
|
-
view === "book" && showResults ?
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
selectedStay ? /* @__PURE__ */ jsx(View, { style: styles.mapCard, children: /* @__PURE__ */ jsx(TravelPropertyCard, { property: selectedStay, card, border, ink, muted, compactPeek: true, onDismissPeek: () => setMapPropertyId(null), onOpen: () => openDetails(selectedStay) }) }) : null
|
|
337
|
-
] }) : null,
|
|
470
|
+
view === "book" && showResults ? (
|
|
471
|
+
// List or map, one at a time, with a floating switch (as on Airbnb). The map
|
|
472
|
+
// used to be pinned above the list, which then got a third of the screen.
|
|
338
473
|
/* @__PURE__ */ jsxs(View, { style: styles.fill, children: [
|
|
339
|
-
/* @__PURE__ */ jsxs(View, { style: styles.
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
474
|
+
mapMode ? /* @__PURE__ */ jsxs(View, { style: styles.fill, children: [
|
|
475
|
+
/* @__PURE__ */ jsx(TravelResultsMap, { properties: visibleProperties, center: (_f = form.location.coordinates) != null ? _f : searchState.lastCenter, selectedId: mapPropertyId, onSelect: setMapPropertyId, style: styles.mapFull }),
|
|
476
|
+
selectedStay ? /* @__PURE__ */ jsx(View, { style: [styles.mapCard, styles.mapCardAbovePill], children: /* @__PURE__ */ jsx(TravelPropertyCard, { property: selectedStay, card, border, ink, muted, compactPeek: true, onDismissPeek: () => setMapPropertyId(null), onOpen: () => openDetails(selectedStay) }) }) : null
|
|
477
|
+
] }) : /* @__PURE__ */ jsx(ScrollView, { style: styles.fill, contentContainerStyle: styles.resultsScroll, keyboardShouldPersistTaps: "handled", onScroll: onResultsScroll, scrollEventThrottle: 32, children: /* @__PURE__ */ jsxs(View, { children: [
|
|
478
|
+
/* @__PURE__ */ jsxs(View, { style: styles.resultsHead, children: [
|
|
479
|
+
searchState.isLoading && searchState.properties.length === 0 ? /* @__PURE__ */ jsxs(View, { style: styles.searching, children: [
|
|
480
|
+
/* @__PURE__ */ jsx(ActivityIndicator, { color: "#2869E0" }),
|
|
481
|
+
/* @__PURE__ */ jsxs(Text, { style: [styles.searchingText, {
|
|
482
|
+
color: muted
|
|
483
|
+
}], children: [
|
|
484
|
+
"Searching ",
|
|
485
|
+
(_g = SEARCHING_NOUN[form.travelType]) != null ? _g : "stays",
|
|
486
|
+
searchState.lastQuery ? ` for ${searchState.lastQuery}` : "",
|
|
487
|
+
"\u2026"
|
|
488
|
+
] })
|
|
489
|
+
] }) : null,
|
|
490
|
+
flightStops.length > 0 ? (
|
|
491
|
+
// Flights filter by stops; one provider chip ("Flights 98") said nothing.
|
|
492
|
+
/* @__PURE__ */ jsx(ScrollView, { horizontal: true, showsHorizontalScrollIndicator: false, contentContainerStyle: styles.chips, children: flightStops.map((option) => {
|
|
493
|
+
const on = stopsFilter === option.key;
|
|
494
|
+
return /* @__PURE__ */ jsx(Pressable, { onPress: () => setStopsFilter(option.key), style: [styles.chip, on && styles.chipOn], children: /* @__PURE__ */ jsxs(Text, { style: [styles.chipText, on && styles.chipTextOn], children: [
|
|
495
|
+
option.label,
|
|
496
|
+
option.minPrice != null ? ` \xB7 $${Math.round(option.minPrice)}` : ` ${option.count}`
|
|
497
|
+
] }) }, option.key);
|
|
498
|
+
}) })
|
|
499
|
+
) : null,
|
|
500
|
+
carClasses.length > 0 ? /* @__PURE__ */ jsxs(ScrollView, { horizontal: true, showsHorizontalScrollIndicator: false, contentContainerStyle: styles.chips, children: [
|
|
501
|
+
/* @__PURE__ */ jsx(Pressable, { onPress: () => setCarClassFilter(null), style: [styles.chip, !carClassFilter && styles.chipOn], children: /* @__PURE__ */ jsxs(Text, { style: [styles.chipText, !carClassFilter && styles.chipTextOn], children: [
|
|
502
|
+
"All ",
|
|
503
|
+
carSplit.cars.length
|
|
504
|
+
] }) }),
|
|
505
|
+
carClasses.map((option) => {
|
|
506
|
+
const on = carClassFilter === option.carClass;
|
|
507
|
+
return /* @__PURE__ */ jsx(Pressable, { onPress: () => setCarClassFilter(option.carClass), style: [styles.chip, on && styles.chipOn], children: /* @__PURE__ */ jsxs(Text, { style: [styles.chipText, on && styles.chipTextOn], children: [
|
|
508
|
+
option.carClass,
|
|
509
|
+
option.minPrice != null ? ` \xB7 $${Math.round(option.minPrice)}` : ""
|
|
510
|
+
] }) }, option.carClass);
|
|
511
|
+
})
|
|
512
|
+
] }) : null,
|
|
513
|
+
!isFlightSearch && !isCarSearch && propertiesBySource.length > 1 ? /* @__PURE__ */ jsxs(ScrollView, { horizontal: true, showsHorizontalScrollIndicator: false, contentContainerStyle: styles.chips, children: [
|
|
514
|
+
/* @__PURE__ */ jsx(Pressable, { onPress: () => setSourceFilter("all"), style: [styles.chip, sourceFilter === "all" && styles.chipOn], children: /* @__PURE__ */ jsxs(Text, { style: [styles.chipText, sourceFilter === "all" && styles.chipTextOn], children: [
|
|
515
|
+
"All ",
|
|
516
|
+
rankedProperties.length
|
|
517
|
+
] }) }),
|
|
518
|
+
propertiesBySource.map((row) => {
|
|
519
|
+
const on = sourceFilter === row.source;
|
|
520
|
+
return /* @__PURE__ */ jsx(Pressable, { onPress: () => setSourceFilter(row.source), style: [styles.chip, on && styles.chipOn], children: /* @__PURE__ */ jsxs(Text, { style: [styles.chipText, on && styles.chipTextOn], children: [
|
|
521
|
+
SOURCE_LABELS[row.source],
|
|
522
|
+
" ",
|
|
523
|
+
row.properties.length
|
|
524
|
+
] }) }, row.source);
|
|
525
|
+
})
|
|
526
|
+
] }) : null,
|
|
527
|
+
searchState.properties.length > 0 ? /* @__PURE__ */ jsxs(View, { style: {
|
|
528
|
+
gap: 2
|
|
529
|
+
}, children: [
|
|
530
|
+
/* @__PURE__ */ jsx(Text, { style: [styles.found, {
|
|
531
|
+
color: ink
|
|
532
|
+
}], children: carGuideOnly ? "Rental cars" : resultsFoundLabel(visibleProperties) }),
|
|
533
|
+
searchState.lastQuery ? /* @__PURE__ */ jsxs(Text, { style: {
|
|
534
|
+
color: muted,
|
|
535
|
+
fontSize: 12
|
|
536
|
+
}, numberOfLines: 1, children: [
|
|
537
|
+
"Results for \u201C",
|
|
538
|
+
searchState.lastQuery,
|
|
539
|
+
"\u201D"
|
|
540
|
+
] }) : null
|
|
541
|
+
] }) : null,
|
|
542
|
+
searchState.isEnriching && !carGuideOnly ? /* @__PURE__ */ jsx(Text, { style: [styles.enrich, {
|
|
343
543
|
color: muted
|
|
544
|
+
}], children: "Finding more fares\u2026" }) : null,
|
|
545
|
+
flightDeals ? /* @__PURE__ */ jsx(FlightCompareBar, { deals: flightDeals, sort: flightSort, onPick: (sort) => setFlightSort(sort), ink, muted, card, border }) : null
|
|
546
|
+
] }),
|
|
547
|
+
/* @__PURE__ */ jsxs(View, { style: styles.results, children: [
|
|
548
|
+
searchState.isLoading && searchState.properties.length === 0 && (isCarSearch || isFlightSearch) ? (
|
|
549
|
+
// Cars and flights list as full-width cards, so they load as rows.
|
|
550
|
+
/* @__PURE__ */ jsx(View, { children: [0, 1, 2].map((key) => /* @__PURE__ */ jsx(View, { style: [styles.skeleton, isCarSearch ? styles.skeletonCar : styles.skeletonFlight] }, key)) })
|
|
551
|
+
) : null,
|
|
552
|
+
searchState.isLoading && searchState.properties.length === 0 && !isCarSearch && !isFlightSearch ? /* @__PURE__ */ jsxs(View, { style: styles.resultsGrid, children: [
|
|
553
|
+
/* @__PURE__ */ jsx(View, { style: [styles.skeleton, styles.gridCell] }),
|
|
554
|
+
/* @__PURE__ */ jsx(View, { style: [styles.skeleton, styles.gridCell] }),
|
|
555
|
+
/* @__PURE__ */ jsx(View, { style: [styles.skeleton, styles.gridCell] }),
|
|
556
|
+
/* @__PURE__ */ jsx(View, { style: [styles.skeleton, styles.gridCell] })
|
|
557
|
+
] }) : null,
|
|
558
|
+
searchState.error && searchState.properties.length === 0 ? /* @__PURE__ */ jsxs(View, { style: [styles.errorBox, {
|
|
559
|
+
backgroundColor: card,
|
|
560
|
+
borderColor: border
|
|
344
561
|
}], children: [
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
})
|
|
363
|
-
] }) : null,
|
|
364
|
-
searchState.properties.length > 0 ? /* @__PURE__ */ jsxs(View, { style: {
|
|
365
|
-
gap: 2
|
|
366
|
-
}, children: [
|
|
367
|
-
/* @__PURE__ */ jsxs(Text, { style: [styles.found, {
|
|
368
|
-
color: ink
|
|
369
|
-
}], children: [
|
|
370
|
-
visibleProperties.length.toLocaleString(),
|
|
371
|
-
" properties found"
|
|
372
|
-
] }),
|
|
373
|
-
searchState.lastQuery ? /* @__PURE__ */ jsxs(Text, { style: {
|
|
374
|
-
color: muted,
|
|
375
|
-
fontSize: 12
|
|
376
|
-
}, numberOfLines: 1, children: [
|
|
377
|
-
"Results for \u201C",
|
|
378
|
-
searchState.lastQuery,
|
|
379
|
-
"\u201D"
|
|
380
|
-
] }) : null
|
|
381
|
-
] }) : null,
|
|
382
|
-
searchState.isEnriching ? /* @__PURE__ */ jsx(Text, { style: [styles.enrich, {
|
|
383
|
-
color: muted
|
|
384
|
-
}], children: "Finding more fares\u2026" }) : null,
|
|
385
|
-
flightDeals ? /* @__PURE__ */ jsx(FlightCompareBar, { deals: flightDeals, sort: flightSort, onPick: (sort) => setFlightSort(sort), ink, muted, card, border }) : null
|
|
386
|
-
] }),
|
|
387
|
-
/* @__PURE__ */ jsxs(ScrollView, { style: styles.fill, contentContainerStyle: styles.results, keyboardShouldPersistTaps: "handled", children: [
|
|
388
|
-
searchState.isLoading && searchState.properties.length === 0 ? /* @__PURE__ */ jsxs(View, { style: styles.resultsGrid, children: [
|
|
389
|
-
/* @__PURE__ */ jsx(View, { style: [styles.skeleton, styles.gridCell] }),
|
|
390
|
-
/* @__PURE__ */ jsx(View, { style: [styles.skeleton, styles.gridCell] }),
|
|
391
|
-
/* @__PURE__ */ jsx(View, { style: [styles.skeleton, styles.gridCell] }),
|
|
392
|
-
/* @__PURE__ */ jsx(View, { style: [styles.skeleton, styles.gridCell] })
|
|
393
|
-
] }) : null,
|
|
394
|
-
searchState.error && searchState.properties.length === 0 ? /* @__PURE__ */ jsx(Text, { style: {
|
|
395
|
-
color: muted
|
|
396
|
-
}, children: searchState.error }) : null,
|
|
397
|
-
/* @__PURE__ */ jsx(View, { style: styles.resultsGrid, children: visibleProperties.map((property) => /* @__PURE__ */ jsx(View, { style: styles.gridCell, children: /* @__PURE__ */ jsx(TravelPropertyCard, { property, card, border, ink, muted, selected: property.id === mapPropertyId, onHighlight: () => setMapPropertyId(property.id), onOpen: () => openDetails(property), grid: true }) }, property.id)) })
|
|
398
|
-
] })
|
|
562
|
+
/* @__PURE__ */ jsx(Text, { style: [styles.errorText, {
|
|
563
|
+
color: muted
|
|
564
|
+
}], children: searchState.error }),
|
|
565
|
+
/* @__PURE__ */ jsx(Pressable, { onPress: searchState.retry, accessibilityRole: "button", style: styles.retryButton, children: /* @__PURE__ */ jsx(Text, { style: styles.retryText, children: "Try again" }) })
|
|
566
|
+
] }) : null,
|
|
567
|
+
isCarSearch ? /* @__PURE__ */ jsxs(View, { children: [
|
|
568
|
+
visibleProperties.map((property) => /* @__PURE__ */ jsx(CarResultCard, { property, days: rentalDays, card, border, ink, muted, onOpen: () => openDetails(property) }, property.id)),
|
|
569
|
+
carGuideOnly ? /* @__PURE__ */ jsx(CarPriceGuide, { rows: carGuide, searching: searchState.isEnriching, links: carSplit.links, ink, muted, border, card, onOpenLink: openDetails }) : /* @__PURE__ */ jsx(CarCompareLinks, { links: carSplit.links, ink, border, card, onOpen: openDetails })
|
|
570
|
+
] }) : null,
|
|
571
|
+
isFlightSearch ? /* @__PURE__ */ jsx(View, { children: visibleProperties.map((property) => /* @__PURE__ */ jsx(FlightResultCard, { property, card, border, ink, muted, tag: flightTags.get(property.id), onOpen: () => openDetails(property) }, property.id)) }) : null,
|
|
572
|
+
!isCarSearch && !isFlightSearch ? /* @__PURE__ */ jsx(View, { style: styles.resultsGrid, children: visibleProperties.map((property) => /* @__PURE__ */ jsx(View, { style: styles.gridCell, children: /* @__PURE__ */ jsx(TravelPropertyCard, { property, card, border, ink, muted, selected: property.id === mapPropertyId, onOpen: () => openDetails(property), grid: true }) }, property.id)) }) : null
|
|
573
|
+
] })
|
|
574
|
+
] }) }),
|
|
575
|
+
showResultsMap ? /* @__PURE__ */ jsxs(Pressable, { onPress: () => setResultsMode(mapMode ? "list" : "map"), accessibilityRole: "button", accessibilityLabel: mapMode ? "Show list" : "Show map", style: styles.modePill, children: [
|
|
576
|
+
/* @__PURE__ */ jsx(MaterialCommunityIcons, { name: mapMode ? "format-list-bulleted" : "map-outline", size: 18, color: "#fff" }),
|
|
577
|
+
/* @__PURE__ */ jsx(Text, { style: styles.modePillText, children: mapMode ? "List" : "Map" })
|
|
578
|
+
] }) : null
|
|
399
579
|
] })
|
|
400
|
-
|
|
580
|
+
) : null
|
|
401
581
|
] }),
|
|
402
582
|
detail ? /* @__PURE__ */ jsx(TravelDetailSheet, { property: detail, onClose: () => setDetail(null), ink, muted, screen, border }) : null,
|
|
403
|
-
chatOpen || detail || keyboardOpen ? null : /* @__PURE__ */ jsx(View, __spreadProps(__spreadValues({ style: styles.agentSwipeEdge }, swipe.panHandlers), { pointerEvents: "box-only", accessibilityLabel: "Swipe left from here to open the travel agent" })),
|
|
404
583
|
railFlyout ? /* @__PURE__ */ jsx(TravelRailFlyout, { group: APP_NAV.find((g) => g.railLabel === railFlyout), onDismiss: () => setRailFlyout(null), onPick: (item) => pickNavItem(item, railFlyout) }) : null,
|
|
405
|
-
chatOpen || detail || keyboardOpen ? null : /* @__PURE__ */ jsx(
|
|
406
|
-
bottom: Math.max(insets.bottom, 8) + 64
|
|
407
|
-
|
|
584
|
+
chatOpen || detail || keyboardOpen ? null : /* @__PURE__ */ jsx(Animated.View, { pointerEvents: fabHidden ? "none" : "auto", style: [styles.agentFab, {
|
|
585
|
+
bottom: Math.max(insets.bottom, 8) + 64,
|
|
586
|
+
opacity: fabShown,
|
|
587
|
+
transform: [{
|
|
588
|
+
translateY: fabShown.interpolate({
|
|
589
|
+
inputRange: [0, 1],
|
|
590
|
+
outputRange: [24, 0]
|
|
591
|
+
})
|
|
592
|
+
}]
|
|
593
|
+
}], children: /* @__PURE__ */ jsx(Pressable, { onPress: () => setChatOpen(true), style: styles.agentFabHit, accessibilityRole: "button", accessibilityLabel: "Open travel agent", children: /* @__PURE__ */ jsx(MaterialCommunityIcons, { name: "creation", size: 22, color: "#fff" }) }) }),
|
|
408
594
|
keyboardOpen ? null : /* @__PURE__ */ jsx(View, { style: [styles.rail, {
|
|
409
595
|
paddingBottom: Math.max(insets.bottom, 8)
|
|
410
596
|
}], children: RAIL_NAV.map((group) => {
|
|
@@ -421,7 +607,7 @@ function TravelExperience({
|
|
|
421
607
|
setChatOpen(false);
|
|
422
608
|
openDetails(property);
|
|
423
609
|
}, seedTurn: initialAgentSeed })
|
|
424
|
-
] });
|
|
610
|
+
] }));
|
|
425
611
|
}
|
|
426
612
|
const styles = StyleSheet.create({
|
|
427
613
|
fill: {
|
|
@@ -453,29 +639,65 @@ const styles = StyleSheet.create({
|
|
|
453
639
|
gap: 4,
|
|
454
640
|
minHeight: 52
|
|
455
641
|
},
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
642
|
+
summaryRow: {
|
|
643
|
+
paddingHorizontal: 12,
|
|
644
|
+
paddingTop: 8,
|
|
645
|
+
paddingBottom: 6
|
|
646
|
+
},
|
|
647
|
+
summaryPill: {
|
|
460
648
|
flexDirection: "row",
|
|
461
649
|
alignItems: "center",
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
650
|
+
gap: 8,
|
|
651
|
+
borderWidth: StyleSheet.hairlineWidth,
|
|
652
|
+
borderRadius: 999,
|
|
653
|
+
paddingLeft: 8,
|
|
654
|
+
paddingRight: 16,
|
|
655
|
+
minHeight: 48,
|
|
656
|
+
shadowColor: "#0f172a",
|
|
657
|
+
shadowOpacity: 0.08,
|
|
658
|
+
shadowRadius: 10,
|
|
659
|
+
shadowOffset: {
|
|
660
|
+
width: 0,
|
|
661
|
+
height: 3
|
|
662
|
+
},
|
|
663
|
+
elevation: 2
|
|
474
664
|
},
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
665
|
+
summaryText: {
|
|
666
|
+
flex: 1,
|
|
667
|
+
paddingVertical: 6
|
|
668
|
+
},
|
|
669
|
+
summaryTitle: {
|
|
670
|
+
fontSize: 14,
|
|
671
|
+
fontWeight: "700"
|
|
672
|
+
},
|
|
673
|
+
summaryMeta: {
|
|
674
|
+
fontSize: 12,
|
|
675
|
+
marginTop: 1
|
|
676
|
+
},
|
|
677
|
+
modePill: {
|
|
678
|
+
position: "absolute",
|
|
679
|
+
alignSelf: "center",
|
|
680
|
+
bottom: 16,
|
|
681
|
+
flexDirection: "row",
|
|
682
|
+
alignItems: "center",
|
|
683
|
+
gap: 6,
|
|
684
|
+
backgroundColor: "#111827",
|
|
685
|
+
borderRadius: 999,
|
|
686
|
+
paddingHorizontal: 18,
|
|
687
|
+
paddingVertical: 11,
|
|
688
|
+
shadowColor: "#0f172a",
|
|
689
|
+
shadowOpacity: 0.25,
|
|
690
|
+
shadowRadius: 12,
|
|
691
|
+
shadowOffset: {
|
|
692
|
+
width: 0,
|
|
693
|
+
height: 4
|
|
694
|
+
},
|
|
695
|
+
elevation: 6
|
|
696
|
+
},
|
|
697
|
+
modePillText: {
|
|
698
|
+
color: "#fff",
|
|
699
|
+
fontSize: 14,
|
|
700
|
+
fontWeight: "700"
|
|
479
701
|
},
|
|
480
702
|
pageTitle: {
|
|
481
703
|
fontSize: 18,
|
|
@@ -489,6 +711,10 @@ const styles = StyleSheet.create({
|
|
|
489
711
|
dismissTap: {
|
|
490
712
|
flexGrow: 1
|
|
491
713
|
},
|
|
714
|
+
// Room under the last row for the floating Map pill.
|
|
715
|
+
resultsScroll: {
|
|
716
|
+
paddingBottom: 80
|
|
717
|
+
},
|
|
492
718
|
results: {
|
|
493
719
|
paddingHorizontal: 12,
|
|
494
720
|
paddingTop: 8,
|
|
@@ -513,15 +739,6 @@ const styles = StyleSheet.create({
|
|
|
513
739
|
fontSize: 22,
|
|
514
740
|
fontWeight: "800"
|
|
515
741
|
},
|
|
516
|
-
topMap: {
|
|
517
|
-
height: 210,
|
|
518
|
-
marginHorizontal: 12,
|
|
519
|
-
marginTop: 8,
|
|
520
|
-
marginBottom: 4,
|
|
521
|
-
position: "relative",
|
|
522
|
-
borderRadius: 16,
|
|
523
|
-
overflow: "hidden"
|
|
524
|
-
},
|
|
525
742
|
mapCard: {
|
|
526
743
|
position: "absolute",
|
|
527
744
|
left: 8,
|
|
@@ -529,6 +746,13 @@ const styles = StyleSheet.create({
|
|
|
529
746
|
bottom: 8,
|
|
530
747
|
maxHeight: 280
|
|
531
748
|
},
|
|
749
|
+
// The selected stay sits above the floating List pill.
|
|
750
|
+
mapCardAbovePill: {
|
|
751
|
+
bottom: 84
|
|
752
|
+
},
|
|
753
|
+
mapFull: {
|
|
754
|
+
borderRadius: 0
|
|
755
|
+
},
|
|
532
756
|
searching: {
|
|
533
757
|
flexDirection: "row",
|
|
534
758
|
alignItems: "center",
|
|
@@ -566,6 +790,17 @@ const styles = StyleSheet.create({
|
|
|
566
790
|
borderRadius: 16,
|
|
567
791
|
backgroundColor: "#e2e8f0"
|
|
568
792
|
},
|
|
793
|
+
// The height and corners of a car card and of a flight card.
|
|
794
|
+
skeletonCar: {
|
|
795
|
+
height: 290,
|
|
796
|
+
borderRadius: 18,
|
|
797
|
+
marginBottom: 14
|
|
798
|
+
},
|
|
799
|
+
skeletonFlight: {
|
|
800
|
+
height: 132,
|
|
801
|
+
borderRadius: 18,
|
|
802
|
+
marginBottom: 12
|
|
803
|
+
},
|
|
569
804
|
enrich: {
|
|
570
805
|
fontSize: 12
|
|
571
806
|
},
|
|
@@ -573,14 +808,6 @@ const styles = StyleSheet.create({
|
|
|
573
808
|
fontSize: 13,
|
|
574
809
|
fontWeight: "800"
|
|
575
810
|
},
|
|
576
|
-
agentSwipeEdge: {
|
|
577
|
-
position: "absolute",
|
|
578
|
-
top: 0,
|
|
579
|
-
right: 0,
|
|
580
|
-
bottom: 72,
|
|
581
|
-
width: 44,
|
|
582
|
-
zIndex: 9
|
|
583
|
-
},
|
|
584
811
|
rail: {
|
|
585
812
|
flexDirection: "row",
|
|
586
813
|
borderTopWidth: StyleSheet.hairlineWidth,
|
|
@@ -620,5 +847,36 @@ const styles = StyleSheet.create({
|
|
|
620
847
|
height: 4
|
|
621
848
|
},
|
|
622
849
|
elevation: 6
|
|
850
|
+
},
|
|
851
|
+
agentFabHit: {
|
|
852
|
+
flex: 1,
|
|
853
|
+
alignSelf: "stretch",
|
|
854
|
+
alignItems: "center",
|
|
855
|
+
justifyContent: "center"
|
|
856
|
+
},
|
|
857
|
+
errorBox: {
|
|
858
|
+
borderWidth: 1,
|
|
859
|
+
borderRadius: 14,
|
|
860
|
+
padding: 14,
|
|
861
|
+
gap: 12,
|
|
862
|
+
alignItems: "flex-start"
|
|
863
|
+
},
|
|
864
|
+
errorText: {
|
|
865
|
+
fontSize: 14,
|
|
866
|
+
lineHeight: 20
|
|
867
|
+
},
|
|
868
|
+
retryButton: {
|
|
869
|
+
backgroundColor: "#2869E0",
|
|
870
|
+
borderRadius: 999,
|
|
871
|
+
paddingHorizontal: 16,
|
|
872
|
+
paddingVertical: 8
|
|
873
|
+
},
|
|
874
|
+
retryText: {
|
|
875
|
+
color: "#fff",
|
|
876
|
+
fontSize: 14,
|
|
877
|
+
fontWeight: "700"
|
|
878
|
+
},
|
|
879
|
+
sessionRetry: {
|
|
880
|
+
marginTop: 16
|
|
623
881
|
}
|
|
624
882
|
});export{TravelExperience,TravelExperience as default};//# sourceMappingURL=TravelExperience.js.map
|