@devtravelcode/widget-native 1.0.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.
Files changed (208) hide show
  1. package/LICENSE +18 -0
  2. package/dist/App.d.ts +10 -0
  3. package/dist/App.js +192 -0
  4. package/dist/TravelHubWidget.d.ts +12 -0
  5. package/dist/TravelHubWidget.js +58 -0
  6. package/dist/components/ErrorBoundary.d.ts +18 -0
  7. package/dist/components/ErrorBoundary.js +63 -0
  8. package/dist/components/ui/Modal.d.ts +11 -0
  9. package/dist/components/ui/Modal.js +66 -0
  10. package/dist/components/ui/Skeleton.d.ts +8 -0
  11. package/dist/components/ui/Skeleton.js +33 -0
  12. package/dist/components/ui/badge.d.ts +11 -0
  13. package/dist/components/ui/badge.js +54 -0
  14. package/dist/components/ui/button.d.ts +14 -0
  15. package/dist/components/ui/button.js +101 -0
  16. package/dist/components/ui/card.d.ts +16 -0
  17. package/dist/components/ui/card.js +51 -0
  18. package/dist/components/ui/input.d.ts +8 -0
  19. package/dist/components/ui/input.js +61 -0
  20. package/dist/components/ui/label.d.ts +8 -0
  21. package/dist/components/ui/label.js +17 -0
  22. package/dist/context/WidgetContext.d.ts +29 -0
  23. package/dist/context/WidgetContext.js +64 -0
  24. package/dist/icons/CarIcon.d.ts +4 -0
  25. package/dist/icons/CarIcon.js +3 -0
  26. package/dist/icons/CloseIcon.d.ts +7 -0
  27. package/dist/icons/CloseIcon.js +3 -0
  28. package/dist/icons/FlightIcon.d.ts +4 -0
  29. package/dist/icons/FlightIcon.js +3 -0
  30. package/dist/icons/HotelIcon.d.ts +4 -0
  31. package/dist/icons/HotelIcon.js +3 -0
  32. package/dist/index.d.ts +2 -0
  33. package/dist/index.js +1 -0
  34. package/dist/lib/utils.d.ts +2 -0
  35. package/dist/lib/utils.js +3 -0
  36. package/dist/locales/widgetTranslations.d.ts +1 -0
  37. package/dist/locales/widgetTranslations.js +732 -0
  38. package/dist/modules/hooks/useAirportSearch.d.ts +21 -0
  39. package/dist/modules/hooks/useAirportSearch.js +48 -0
  40. package/dist/modules/hooks/useCarOffers.d.ts +7 -0
  41. package/dist/modules/hooks/useCarOffers.js +47 -0
  42. package/dist/modules/hooks/useCountriesByCodes.d.ts +4 -0
  43. package/dist/modules/hooks/useCountriesByCodes.js +60 -0
  44. package/dist/modules/hooks/useCountriesSearch.d.ts +11 -0
  45. package/dist/modules/hooks/useCountriesSearch.js +55 -0
  46. package/dist/modules/hooks/useDefaultHotelLocation.d.ts +7 -0
  47. package/dist/modules/hooks/useDefaultHotelLocation.js +44 -0
  48. package/dist/modules/hooks/useDetectNationality.d.ts +1 -0
  49. package/dist/modules/hooks/useDetectNationality.js +20 -0
  50. package/dist/modules/hooks/useFlightSearch.d.ts +20 -0
  51. package/dist/modules/hooks/useFlightSearch.js +243 -0
  52. package/dist/modules/hooks/useHotelDetails.d.ts +7 -0
  53. package/dist/modules/hooks/useHotelDetails.js +80 -0
  54. package/dist/modules/hooks/useHotelLocations.d.ts +5 -0
  55. package/dist/modules/hooks/useHotelLocations.js +42 -0
  56. package/dist/modules/hooks/useHotelMapData.d.ts +12 -0
  57. package/dist/modules/hooks/useHotelMapData.js +78 -0
  58. package/dist/modules/hooks/useHotelOffers.d.ts +11 -0
  59. package/dist/modules/hooks/useHotelOffers.js +122 -0
  60. package/dist/modules/hooks/useHotelSearchSSE.d.ts +18 -0
  61. package/dist/modules/hooks/useHotelSearchSSE.js +411 -0
  62. package/dist/modules/hooks/useSearchExpiration.d.ts +6 -0
  63. package/dist/modules/hooks/useSearchExpiration.js +35 -0
  64. package/dist/modules/hooks/useTranslationsHub.d.ts +5 -0
  65. package/dist/modules/hooks/useTranslationsHub.js +48 -0
  66. package/dist/modules/navbar/Navbar.d.ts +8 -0
  67. package/dist/modules/navbar/Navbar.js +69 -0
  68. package/dist/modules/search-form/AgeSelector.d.ts +9 -0
  69. package/dist/modules/search-form/AgeSelector.js +109 -0
  70. package/dist/modules/search-form/CustomSelect.d.ts +14 -0
  71. package/dist/modules/search-form/CustomSelect.js +94 -0
  72. package/dist/modules/search-form/FiltersSkeleton.d.ts +6 -0
  73. package/dist/modules/search-form/FiltersSkeleton.js +35 -0
  74. package/dist/modules/search-form/NationalityInput.d.ts +18 -0
  75. package/dist/modules/search-form/NationalityInput.js +172 -0
  76. package/dist/modules/search-form/Pagination.d.ts +8 -0
  77. package/dist/modules/search-form/Pagination.js +84 -0
  78. package/dist/modules/search-form/SearchExpiredPopup.d.ts +10 -0
  79. package/dist/modules/search-form/SearchExpiredPopup.js +91 -0
  80. package/dist/modules/search-form/SkeletonWidget.d.ts +2 -0
  81. package/dist/modules/search-form/SkeletonWidget.js +33 -0
  82. package/dist/modules/search-form/TimePicker.d.ts +9 -0
  83. package/dist/modules/search-form/TimePicker.js +182 -0
  84. package/dist/modules/search-form/cars/CarEmptyState.d.ts +6 -0
  85. package/dist/modules/search-form/cars/CarEmptyState.js +42 -0
  86. package/dist/modules/search-form/cars/CarFiltersSkeleton.d.ts +6 -0
  87. package/dist/modules/search-form/cars/CarFiltersSkeleton.js +35 -0
  88. package/dist/modules/search-form/cars/CarOffersList.d.ts +43 -0
  89. package/dist/modules/search-form/cars/CarOffersList.js +214 -0
  90. package/dist/modules/search-form/cars/CarResults.d.ts +25 -0
  91. package/dist/modules/search-form/cars/CarResults.js +116 -0
  92. package/dist/modules/search-form/cars/CarSearchForm.d.ts +19 -0
  93. package/dist/modules/search-form/cars/CarSearchForm.js +173 -0
  94. package/dist/modules/search-form/cars/CarSkeleton.d.ts +6 -0
  95. package/dist/modules/search-form/cars/CarSkeleton.js +46 -0
  96. package/dist/modules/search-form/cars/CarTopOffersSlider.d.ts +20 -0
  97. package/dist/modules/search-form/cars/CarTopOffersSlider.js +100 -0
  98. package/dist/modules/search-form/cars/car-filters/CarFilters.d.ts +8 -0
  99. package/dist/modules/search-form/cars/car-filters/CarFilters.js +318 -0
  100. package/dist/modules/search-form/cars/car-filters/FilterSection.d.ts +9 -0
  101. package/dist/modules/search-form/cars/car-filters/FilterSection.js +30 -0
  102. package/dist/modules/search-form/cars/car-filters/index.d.ts +6 -0
  103. package/dist/modules/search-form/cars/car-filters/index.js +3 -0
  104. package/dist/modules/search-form/cars/car-filters/useCarFilters.d.ts +24 -0
  105. package/dist/modules/search-form/cars/car-filters/useCarFilters.js +121 -0
  106. package/dist/modules/search-form/flight/AirlinesSelector.d.ts +8 -0
  107. package/dist/modules/search-form/flight/AirlinesSelector.js +235 -0
  108. package/dist/modules/search-form/flight/CabinClassSelector.d.ts +9 -0
  109. package/dist/modules/search-form/flight/CabinClassSelector.js +63 -0
  110. package/dist/modules/search-form/flight/DatePicker.d.ts +12 -0
  111. package/dist/modules/search-form/flight/DatePicker.js +536 -0
  112. package/dist/modules/search-form/flight/FlightSearchForm.d.ts +18 -0
  113. package/dist/modules/search-form/flight/FlightSearchForm.js +147 -0
  114. package/dist/modules/search-form/flight/LocationInput.d.ts +11 -0
  115. package/dist/modules/search-form/flight/LocationInput.js +294 -0
  116. package/dist/modules/search-form/flight/PassengersPicker.d.ts +16 -0
  117. package/dist/modules/search-form/flight/PassengersPicker.js +203 -0
  118. package/dist/modules/search-form/flight/SwitchLocationBtn.d.ts +9 -0
  119. package/dist/modules/search-form/flight/SwitchLocationBtn.js +48 -0
  120. package/dist/modules/search-form/flight/flight-filters/FiltersContent.d.ts +21 -0
  121. package/dist/modules/search-form/flight/flight-filters/FiltersContent.js +145 -0
  122. package/dist/modules/search-form/flight/flight-filters/FlightFiltersDynamic.d.ts +11 -0
  123. package/dist/modules/search-form/flight/flight-filters/FlightFiltersDynamic.js +213 -0
  124. package/dist/modules/search-form/flight/flight-filters/RangeBlock.d.ts +22 -0
  125. package/dist/modules/search-form/flight/flight-filters/RangeBlock.js +164 -0
  126. package/dist/modules/search-form/flight/flight-filters/index.d.ts +1 -0
  127. package/dist/modules/search-form/flight/flight-filters/index.js +1 -0
  128. package/dist/modules/search-form/flight/flight-results/FlightAdditionalInfo.d.ts +16 -0
  129. package/dist/modules/search-form/flight/flight-results/FlightAdditionalInfo.js +229 -0
  130. package/dist/modules/search-form/flight/flight-results/FlightBaggageToggle.d.ts +15 -0
  131. package/dist/modules/search-form/flight/flight-results/FlightBaggageToggle.js +110 -0
  132. package/dist/modules/search-form/flight/flight-results/FlightCard.d.ts +14 -0
  133. package/dist/modules/search-form/flight/flight-results/FlightCard.js +436 -0
  134. package/dist/modules/search-form/flight/flight-results/FlightInfo.d.ts +12 -0
  135. package/dist/modules/search-form/flight/flight-results/FlightInfo.js +48 -0
  136. package/dist/modules/search-form/flight/flight-results/FlightPriceBlock.d.ts +11 -0
  137. package/dist/modules/search-form/flight/flight-results/FlightPriceBlock.js +36 -0
  138. package/dist/modules/search-form/flight/flight-results/FlightResults.d.ts +22 -0
  139. package/dist/modules/search-form/flight/flight-results/FlightResults.js +109 -0
  140. package/dist/modules/search-form/flight/flight-results/FlightSegments.d.ts +40 -0
  141. package/dist/modules/search-form/flight/flight-results/FlightSegments.js +162 -0
  142. package/dist/modules/search-form/flight/flight-results/FlightsSkeleton.d.ts +6 -0
  143. package/dist/modules/search-form/flight/flight-results/FlightsSkeleton.js +52 -0
  144. package/dist/modules/search-form/flight/flight-results/ProvidersLoader.d.ts +9 -0
  145. package/dist/modules/search-form/flight/flight-results/ProvidersLoader.js +242 -0
  146. package/dist/modules/search-form/hotel/DatePicker.d.ts +1 -0
  147. package/dist/modules/search-form/hotel/DatePicker.js +1 -0
  148. package/dist/modules/search-form/hotel/GuestSelector.d.ts +13 -0
  149. package/dist/modules/search-form/hotel/GuestSelector.js +272 -0
  150. package/dist/modules/search-form/hotel/GuestSelectorMobilePopup.d.ts +2 -0
  151. package/dist/modules/search-form/hotel/GuestSelectorMobilePopup.js +1 -0
  152. package/dist/modules/search-form/hotel/HotelLocation.d.ts +17 -0
  153. package/dist/modules/search-form/hotel/HotelLocation.js +178 -0
  154. package/dist/modules/search-form/hotel/HotelLocationMobilePopup.d.ts +2 -0
  155. package/dist/modules/search-form/hotel/HotelLocationMobilePopup.js +1 -0
  156. package/dist/modules/search-form/hotel/HotelResults.d.ts +21 -0
  157. package/dist/modules/search-form/hotel/HotelResults.js +333 -0
  158. package/dist/modules/search-form/hotel/HotelSearchForm.d.ts +13 -0
  159. package/dist/modules/search-form/hotel/HotelSearchForm.js +130 -0
  160. package/dist/modules/search-form/hotel/HotelsSkeleton.d.ts +6 -0
  161. package/dist/modules/search-form/hotel/HotelsSkeleton.js +40 -0
  162. package/dist/modules/search-form/hotel/PassengersPicker.d.ts +2 -0
  163. package/dist/modules/search-form/hotel/PassengersPicker.js +1 -0
  164. package/dist/modules/search-form/hotel/components/HotelCard.d.ts +11 -0
  165. package/dist/modules/search-form/hotel/components/HotelCard.js +180 -0
  166. package/dist/modules/search-form/hotel/components/HotelEmptyState.d.ts +6 -0
  167. package/dist/modules/search-form/hotel/components/HotelEmptyState.js +34 -0
  168. package/dist/modules/search-form/hotel/components/HotelGallery.d.ts +6 -0
  169. package/dist/modules/search-form/hotel/components/HotelGallery.js +77 -0
  170. package/dist/modules/search-form/hotel/components/HotelList.d.ts +9 -0
  171. package/dist/modules/search-form/hotel/components/HotelList.js +12 -0
  172. package/dist/modules/search-form/hotel/components/HotelMap.d.ts +26 -0
  173. package/dist/modules/search-form/hotel/components/HotelMap.js +707 -0
  174. package/dist/modules/search-form/hotel/components/HotelPin.d.ts +7 -0
  175. package/dist/modules/search-form/hotel/components/HotelPin.js +1 -0
  176. package/dist/modules/search-form/hotel/hotel-filters/HotelFilters.d.ts +29 -0
  177. package/dist/modules/search-form/hotel/hotel-filters/HotelFilters.js +339 -0
  178. package/dist/modules/search-form/hotel/hotel-filters/HotelFiltersBar.d.ts +3 -0
  179. package/dist/modules/search-form/hotel/hotel-filters/HotelFiltersBar.js +2 -0
  180. package/dist/modules/search-form/hotel/hotel-filters/HotelFiltersContent.d.ts +2 -0
  181. package/dist/modules/search-form/hotel/hotel-filters/HotelFiltersContent.js +1 -0
  182. package/dist/modules/search-form/hotel/hotel-filters/HotelFiltersDynamic.d.ts +2 -0
  183. package/dist/modules/search-form/hotel/hotel-filters/HotelFiltersDynamic.js +1 -0
  184. package/dist/modules/search-form/hotel/hotel-filters/HotelFiltersMobilePopup.d.ts +2 -0
  185. package/dist/modules/search-form/hotel/hotel-filters/HotelFiltersMobilePopup.js +1 -0
  186. package/dist/modules/search-form/hotel/hotel-filters/RangeBlock.d.ts +1 -0
  187. package/dist/modules/search-form/hotel/hotel-filters/RangeBlock.js +1 -0
  188. package/dist/modules/search-form/hotel/hotel-filters/index.d.ts +1 -0
  189. package/dist/modules/search-form/hotel/hotel-filters/index.js +1 -0
  190. package/dist/modules/tabs/FlightsTab.d.ts +1 -0
  191. package/dist/modules/tabs/FlightsTab.js +1 -0
  192. package/dist/modules/tabs/HotelsTab.d.ts +1 -0
  193. package/dist/modules/tabs/HotelsTab.js +1 -0
  194. package/dist/store/index.d.ts +22 -0
  195. package/dist/store/index.js +19 -0
  196. package/dist/theme/colors.d.ts +56 -0
  197. package/dist/theme/colors.js +56 -0
  198. package/dist/theme/formStyles.d.ts +76 -0
  199. package/dist/theme/formStyles.js +78 -0
  200. package/dist/utils/applyWidgetColors.d.ts +1 -0
  201. package/dist/utils/applyWidgetColors.js +2 -0
  202. package/dist/utils/dateTime.d.ts +2 -0
  203. package/dist/utils/dateTime.js +23 -0
  204. package/dist/utils/fetchSSE.d.ts +23 -0
  205. package/dist/utils/fetchSSE.js +104 -0
  206. package/dist/utils/getToken.d.ts +3 -0
  207. package/dist/utils/getToken.js +12 -0
  208. package/package.json +64 -0
@@ -0,0 +1,7 @@
1
+ export type HotelPin = {
2
+ id: string;
3
+ latitude: number;
4
+ longitude: number;
5
+ total: number | null;
6
+ soldOut: boolean;
7
+ };
@@ -0,0 +1,29 @@
1
+ import React from "react";
2
+ export declare const QUICK_FILTERS: ({
3
+ key: string;
4
+ type: string;
5
+ value: string;
6
+ labelKey: string;
7
+ fallback: string;
8
+ } | {
9
+ key: string;
10
+ type: string;
11
+ value: number;
12
+ labelKey: string;
13
+ fallback: string;
14
+ })[];
15
+ type HotelFiltersProps = {
16
+ translations: Record<string, string>;
17
+ activeFilters: string[];
18
+ onQuickFilter: (key: string) => void;
19
+ onOpenPopup: () => void;
20
+ isPopupOpen: boolean;
21
+ onClosePopup: () => void;
22
+ onApplyFilters?: (sid: string | null, filters?: Record<string, any>) => Promise<void>;
23
+ onReset?: () => void;
24
+ externalValues?: Record<string, any>;
25
+ sessionId?: string | null;
26
+ filters?: string[];
27
+ };
28
+ declare const HotelFilters: React.FC<HotelFiltersProps>;
29
+ export default HotelFilters;
@@ -0,0 +1,339 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { useState, useEffect, useRef } from "react";
3
+ import { View, Text, TouchableOpacity, Modal, ScrollView, StyleSheet, } from "react-native";
4
+ import { useSafeAreaInsets } from "react-native-safe-area-context";
5
+ import Svg, { Line } from "react-native-svg";
6
+ import RangeBlock from "../../flight/flight-filters/RangeBlock";
7
+ import { useWidget } from "../../../../context/WidgetContext";
8
+ import { Colors, Spacing, FontSize, BorderRadius } from "../../../../theme/colors";
9
+ import { CloseIcon } from "../../../../store";
10
+ export const QUICK_FILTERS = [
11
+ {
12
+ key: "AI",
13
+ type: "boards",
14
+ value: "AI",
15
+ labelKey: "filter_all_inclusive",
16
+ fallback: "All inclusive",
17
+ },
18
+ {
19
+ key: "BI",
20
+ type: "boards",
21
+ value: "BI",
22
+ labelKey: "filter_breakfast",
23
+ fallback: "Breakfast",
24
+ },
25
+ {
26
+ key: "4",
27
+ type: "starFrom",
28
+ value: 4,
29
+ labelKey: "filter_from_4_stars",
30
+ fallback: "From 4\u2605",
31
+ },
32
+ {
33
+ key: "full_refund",
34
+ type: "payments",
35
+ value: "full_refund",
36
+ labelKey: "filter_full_refund",
37
+ fallback: "Full refund",
38
+ },
39
+ ];
40
+ const DEFAULT_VALUES = {
41
+ minPrice: 0,
42
+ maxPrice: 1000,
43
+ starRating: [],
44
+ boards: null,
45
+ payments: null,
46
+ };
47
+ const BOARD_OPTIONS = [
48
+ { code: "BI", labelKey: "filter_breakfast_included", fallback: "Breakfast included" },
49
+ { code: "LI", labelKey: "filter_lunch_included", fallback: "Lunch included" },
50
+ { code: "DI", labelKey: "filter_dinner_included", fallback: "Dinner included" },
51
+ { code: "FB", labelKey: "filter_full_board", fallback: "Full board" },
52
+ { code: "HB", labelKey: "filter_half_board", fallback: "Half board" },
53
+ { code: "AI", labelKey: "filter_all_inclusive", fallback: "All inclusive" },
54
+ ];
55
+ const HotelFilters = ({ translations, activeFilters, onQuickFilter, onOpenPopup, isPopupOpen, onClosePopup, onApplyFilters, onReset, externalValues, sessionId = null, filters = [], }) => {
56
+ const { currency } = useWidget();
57
+ const insets = useSafeAreaInsets();
58
+ const [values, setValues] = useState({ ...DEFAULT_VALUES });
59
+ const [openSections, setOpenSections] = useState(["price"]);
60
+ const [scrollEnabled, setScrollEnabled] = useState(true);
61
+ const t = (key, fallback) => translations[key] || fallback;
62
+ const currencySigns = {
63
+ USD: "$",
64
+ EUR: "\u20AC",
65
+ GBP: "\u00A3",
66
+ CHF: "\u20A3",
67
+ };
68
+ const currencySign = currencySigns[currency] || currency;
69
+ const prevExternalRef = useRef("");
70
+ useEffect(() => {
71
+ if (!externalValues) {
72
+ if (prevExternalRef.current !== "") {
73
+ prevExternalRef.current = "";
74
+ setValues({ ...DEFAULT_VALUES });
75
+ setOpenSections(["price"]);
76
+ }
77
+ return;
78
+ }
79
+ const serialized = JSON.stringify(externalValues);
80
+ if (serialized === prevExternalRef.current)
81
+ return;
82
+ prevExternalRef.current = serialized;
83
+ setValues((prev) => ({ ...prev, ...externalValues }));
84
+ const sectionsToOpen = [];
85
+ if ((typeof externalValues.minPrice === "number" && externalValues.minPrice !== 0) ||
86
+ (typeof externalValues.maxPrice === "number" && externalValues.maxPrice !== 1000)) {
87
+ sectionsToOpen.push("price");
88
+ }
89
+ if (Array.isArray(externalValues.starRating) && externalValues.starRating.length > 0) {
90
+ sectionsToOpen.push("starRating");
91
+ }
92
+ if (externalValues.boards)
93
+ sectionsToOpen.push("boards");
94
+ if (externalValues.payments)
95
+ sectionsToOpen.push("payments");
96
+ setOpenSections(sectionsToOpen.length > 0 ? sectionsToOpen : ["price"]);
97
+ }, [externalValues]);
98
+ const getValue = (name, fallback) => {
99
+ return name in values ? values[name] : fallback;
100
+ };
101
+ const handleRangeChange = (name, value) => {
102
+ setValues((prev) => ({ ...prev, [name]: Number(value) }));
103
+ };
104
+ const getRangeStyle = (minName, maxName, maxValue) => {
105
+ const minVal = Number(getValue(minName, 0));
106
+ const maxVal = Number(getValue(maxName, maxValue));
107
+ const left = (minVal / maxValue) * 100;
108
+ const right = 100 - (maxVal / maxValue) * 100;
109
+ return { left: `${left}%`, right: `${right}%` };
110
+ };
111
+ const toggleSection = (key) => {
112
+ setOpenSections((prev) => prev.includes(key) ? prev.filter((k) => k !== key) : [...prev, key]);
113
+ };
114
+ const updateFilterValue = (name, value) => {
115
+ setValues((prev) => ({ ...prev, [name]: value }));
116
+ };
117
+ const handleApply = () => {
118
+ if (sessionId && onApplyFilters) {
119
+ onApplyFilters(sessionId, values);
120
+ }
121
+ onClosePopup();
122
+ };
123
+ const handleReset = () => {
124
+ setValues({ ...DEFAULT_VALUES });
125
+ setOpenSections(["price"]);
126
+ onReset?.();
127
+ onClosePopup();
128
+ };
129
+ const has = (key) => filters.includes(key);
130
+ const toggleStar = (stars) => {
131
+ const prev = Array.isArray(values.starRating) ? values.starRating : [];
132
+ const next = prev.includes(stars)
133
+ ? prev.filter((s) => s !== stars)
134
+ : Array.from(new Set([...prev, stars])).sort((a, b) => a - b);
135
+ updateFilterValue("starRating", next);
136
+ };
137
+ return (_jsxs(View, { children: [_jsxs(ScrollView, { horizontal: true, showsHorizontalScrollIndicator: false, style: styles.quickFiltersBar, contentContainerStyle: styles.quickFiltersContent, children: [_jsxs(TouchableOpacity, { style: styles.mainFilterChip, onPress: onOpenPopup, activeOpacity: 0.7, children: [_jsxs(Svg, { width: 18, height: 18, viewBox: "0 0 24 24", fill: "none", stroke: "#FFFFFF", strokeWidth: 2, strokeLinecap: "round", strokeLinejoin: "round", children: [_jsx(Line, { x1: 4, y1: 6, x2: 20, y2: 6 }), _jsx(Line, { x1: 8, y1: 12, x2: 16, y2: 12 }), _jsx(Line, { x1: 11, y1: 18, x2: 13, y2: 18 })] }), _jsx(Text, { style: styles.mainFilterText, children: t("filters_main", "Filters") })] }), QUICK_FILTERS.map((item) => (_jsx(TouchableOpacity, { style: [
138
+ styles.filterChip,
139
+ activeFilters.includes(item.key) && styles.filterChipActive,
140
+ ], onPress: () => onQuickFilter(item.key), activeOpacity: 0.7, children: _jsx(Text, { style: [
141
+ styles.filterChipText,
142
+ activeFilters.includes(item.key) && styles.filterChipTextActive,
143
+ ], children: t(item.labelKey, item.fallback) }) }, item.key)))] }), _jsx(Modal, { visible: isPopupOpen, animationType: "slide", presentationStyle: "fullScreen", onRequestClose: onClosePopup, children: _jsxs(View, { style: [styles.modalContainer, { paddingTop: insets.top }], children: [_jsx(TouchableOpacity, { style: styles.closeButton, onPress: onClosePopup, hitSlop: { top: 8, bottom: 8, left: 8, right: 8 }, children: _jsx(CloseIcon, { size: 16 }) }), _jsx(View, { style: styles.modalHeader, children: _jsx(Text, { style: styles.modalTitle, children: t("filters_title", "Filters") }) }), _jsxs(ScrollView, { style: styles.modalContent, contentContainerStyle: styles.modalContentInner, showsVerticalScrollIndicator: false, scrollEnabled: scrollEnabled, children: [(has("price") || has("minprice") || has("maxprice")) && (_jsx(RangeBlock, { title: t("filter_price", "Price"), minName: "minPrice", maxName: "maxPrice", maxValue: 1000, step: 10, open: openSections.includes("price"), toggle: () => toggleSection("price"), getValue: getValue, handleRangeChange: handleRangeChange, getRangeStyle: getRangeStyle, formatter: (v) => `${v} ${currencySign}`, isShow: true, onDragStart: () => setScrollEnabled(false), onDragEnd: () => setScrollEnabled(true) })), has("starRating") && (_jsxs(View, { style: styles.section, children: [_jsx(View, { style: styles.sectionHeader, children: _jsx(Text, { style: styles.sectionTitle, children: t("filter_stars", "Number of stars") }) }), _jsx(View, { style: styles.sectionContent, children: [5, 4, 3, 2, 1].map((stars) => {
144
+ const isChecked = Array.isArray(values.starRating) &&
145
+ values.starRating.includes(stars);
146
+ return (_jsxs(TouchableOpacity, { style: styles.checkboxRow, onPress: () => toggleStar(stars), activeOpacity: 0.7, children: [_jsx(View, { style: [
147
+ styles.checkbox,
148
+ isChecked && styles.checkboxChecked,
149
+ ], children: isChecked && (_jsx(Text, { style: styles.checkmark, children: "\u2713" })) }), _jsxs(Text, { style: styles.checkboxLabel, children: [stars, " ", t("filter_stars_suffix", "stars")] })] }, stars));
150
+ }) })] })), has("payments") && (_jsxs(View, { style: styles.section, children: [_jsx(View, { style: styles.sectionHeader, children: _jsx(Text, { style: styles.sectionTitle, children: t("filter_payments", "Payment") }) }), _jsx(View, { style: styles.sectionContent, children: _jsxs(TouchableOpacity, { style: styles.checkboxRow, onPress: () => updateFilterValue("payments", values.payments === "full_refund" ? null : "full_refund"), activeOpacity: 0.7, children: [_jsx(View, { style: [
151
+ styles.checkbox,
152
+ values.payments === "full_refund" && styles.checkboxChecked,
153
+ ], children: values.payments === "full_refund" && (_jsx(Text, { style: styles.checkmark, children: "\u2713" })) }), _jsx(Text, { style: styles.checkboxLabel, children: t("filter_full_refund", "Full refund") })] }) })] })), has("boards") && (_jsxs(View, { style: styles.section, children: [_jsx(View, { style: styles.sectionHeader, children: _jsx(Text, { style: styles.sectionTitle, children: t("filter_meals", "Meals") }) }), _jsxs(View, { style: styles.sectionContent, children: [_jsxs(TouchableOpacity, { style: styles.radioRow, onPress: () => updateFilterValue("boards", null), activeOpacity: 0.7, children: [_jsx(View, { style: [
154
+ styles.radio,
155
+ values.boards === null && styles.radioSelected,
156
+ ], children: values.boards === null && (_jsx(View, { style: styles.radioInner })) }), _jsx(Text, { style: styles.checkboxLabel, children: t("filter_no_preference", "No preference") })] }), BOARD_OPTIONS.map((item) => (_jsxs(TouchableOpacity, { style: styles.radioRow, onPress: () => updateFilterValue("boards", item.code), activeOpacity: 0.7, children: [_jsx(View, { style: [
157
+ styles.radio,
158
+ values.boards === item.code && styles.radioSelected,
159
+ ], children: values.boards === item.code && (_jsx(View, { style: styles.radioInner })) }), _jsx(Text, { style: styles.checkboxLabel, children: t(item.labelKey, item.fallback) })] }, item.code)))] })] }))] }), _jsxs(View, { style: styles.modalFooter, children: [_jsx(TouchableOpacity, { style: styles.resetButton, onPress: handleReset, activeOpacity: 0.7, children: _jsx(Text, { style: styles.resetButtonText, children: t("filter_reset_btn", "Reset") }) }), _jsx(TouchableOpacity, { style: styles.applyButton, onPress: handleApply, activeOpacity: 0.8, children: _jsx(Text, { style: styles.applyButtonText, children: t("filter_apply_btn", "Apply") }) })] })] }) })] }));
160
+ };
161
+ const styles = StyleSheet.create({
162
+ quickFiltersBar: {
163
+ marginBottom: Spacing.sm,
164
+ },
165
+ quickFiltersContent: {
166
+ flexDirection: "row",
167
+ gap: Spacing.sm,
168
+ paddingRight: Spacing.lg,
169
+ },
170
+ mainFilterChip: {
171
+ flexDirection: "row",
172
+ alignItems: "center",
173
+ backgroundColor: Colors.primary,
174
+ borderRadius: BorderRadius.full,
175
+ paddingVertical: Spacing.sm,
176
+ paddingHorizontal: Spacing.md,
177
+ gap: Spacing.xs,
178
+ },
179
+ mainFilterText: {
180
+ fontSize: FontSize.sm,
181
+ fontWeight: "600",
182
+ color: Colors.textOnPrimary,
183
+ },
184
+ filterChip: {
185
+ borderRadius: BorderRadius.full,
186
+ paddingVertical: Spacing.sm,
187
+ paddingHorizontal: Spacing.md,
188
+ borderWidth: 1,
189
+ borderColor: Colors.border,
190
+ backgroundColor: Colors.surface,
191
+ justifyContent: "space-between",
192
+ alignItems: "center",
193
+ },
194
+ filterChipActive: {
195
+ backgroundColor: Colors.primaryLight,
196
+ borderColor: Colors.primary,
197
+ },
198
+ filterChipText: {
199
+ fontSize: FontSize.sm,
200
+ color: Colors.text,
201
+ fontWeight: "500",
202
+ },
203
+ filterChipTextActive: {
204
+ color: Colors.primary,
205
+ fontWeight: "600",
206
+ },
207
+ modalContainer: {
208
+ flex: 1,
209
+ backgroundColor: Colors.surface,
210
+ },
211
+ closeButton: {
212
+ alignSelf: "flex-end",
213
+ paddingHorizontal: Spacing.lg,
214
+ paddingBottom: Spacing.sm,
215
+ paddingTop: Spacing.sm,
216
+ },
217
+ modalHeader: {
218
+ paddingHorizontal: Spacing.lg,
219
+ paddingBottom: Spacing.md,
220
+ borderBottomWidth: 1,
221
+ borderBottomColor: Colors.border,
222
+ },
223
+ modalTitle: {
224
+ fontSize: FontSize.lg,
225
+ fontWeight: "700",
226
+ color: Colors.text,
227
+ },
228
+ modalContent: {
229
+ flex: 1,
230
+ },
231
+ modalContentInner: {
232
+ padding: Spacing.lg,
233
+ },
234
+ modalFooter: {
235
+ flexDirection: "row",
236
+ paddingHorizontal: Spacing.lg,
237
+ paddingVertical: Spacing.md,
238
+ borderTopWidth: 1,
239
+ borderTopColor: Colors.borderLight,
240
+ gap: Spacing.md,
241
+ },
242
+ resetButton: {
243
+ flex: 1,
244
+ paddingVertical: Spacing.md,
245
+ borderRadius: BorderRadius.md,
246
+ borderWidth: 1,
247
+ borderColor: Colors.border,
248
+ alignItems: "center",
249
+ },
250
+ resetButtonText: {
251
+ fontSize: FontSize.md,
252
+ fontWeight: "600",
253
+ color: Colors.textSecondary,
254
+ },
255
+ applyButton: {
256
+ flex: 1,
257
+ paddingVertical: Spacing.md,
258
+ borderRadius: BorderRadius.md,
259
+ backgroundColor: Colors.primary,
260
+ alignItems: "center",
261
+ },
262
+ applyButtonText: {
263
+ fontSize: FontSize.md,
264
+ fontWeight: "600",
265
+ color: Colors.textOnPrimary,
266
+ },
267
+ section: {
268
+ marginBottom: Spacing.md,
269
+ },
270
+ sectionHeader: {
271
+ flexDirection: "row",
272
+ justifyContent: "space-between",
273
+ alignItems: "center",
274
+ paddingVertical: Spacing.md,
275
+ },
276
+ sectionTitle: {
277
+ fontSize: FontSize.md,
278
+ fontWeight: "600",
279
+ color: Colors.text,
280
+ },
281
+ sectionContent: {
282
+ paddingLeft: Spacing.sm,
283
+ },
284
+ checkboxRow: {
285
+ flexDirection: "row",
286
+ alignItems: "center",
287
+ paddingVertical: Spacing.sm,
288
+ gap: Spacing.md,
289
+ },
290
+ checkbox: {
291
+ width: 22,
292
+ height: 22,
293
+ borderRadius: BorderRadius.sm,
294
+ borderWidth: 2,
295
+ borderColor: Colors.border,
296
+ alignItems: "center",
297
+ justifyContent: "center",
298
+ backgroundColor: Colors.surface,
299
+ },
300
+ checkboxChecked: {
301
+ backgroundColor: Colors.primary,
302
+ borderColor: Colors.primary,
303
+ },
304
+ checkmark: {
305
+ fontSize: FontSize.sm,
306
+ color: Colors.textOnPrimary,
307
+ fontWeight: "700",
308
+ },
309
+ checkboxLabel: {
310
+ fontSize: FontSize.md,
311
+ color: Colors.text,
312
+ },
313
+ radioRow: {
314
+ flexDirection: "row",
315
+ alignItems: "center",
316
+ paddingVertical: Spacing.sm,
317
+ gap: Spacing.md,
318
+ },
319
+ radio: {
320
+ width: 22,
321
+ height: 22,
322
+ borderRadius: 11,
323
+ borderWidth: 2,
324
+ borderColor: Colors.border,
325
+ alignItems: "center",
326
+ justifyContent: "center",
327
+ backgroundColor: Colors.surface,
328
+ },
329
+ radioSelected: {
330
+ borderColor: Colors.primary,
331
+ },
332
+ radioInner: {
333
+ width: 12,
334
+ height: 12,
335
+ borderRadius: 6,
336
+ backgroundColor: Colors.primary,
337
+ },
338
+ });
339
+ export default HotelFilters;
@@ -0,0 +1,3 @@
1
+ export { QUICK_FILTERS } from "./HotelFilters";
2
+ declare const _default: null;
3
+ export default _default;
@@ -0,0 +1,2 @@
1
+ export { QUICK_FILTERS } from "./HotelFilters";
2
+ export default null;
@@ -0,0 +1,2 @@
1
+ declare const _default: null;
2
+ export default _default;
@@ -0,0 +1,2 @@
1
+ declare const _default: null;
2
+ export default _default;
@@ -0,0 +1,2 @@
1
+ declare const _default: null;
2
+ export default _default;
@@ -0,0 +1 @@
1
+ export { default } from "../../flight/flight-filters/RangeBlock";
@@ -0,0 +1 @@
1
+ export { default } from "../../flight/flight-filters/RangeBlock";
@@ -0,0 +1 @@
1
+ export { default as HotelFilters, QUICK_FILTERS } from "./HotelFilters";
@@ -0,0 +1 @@
1
+ export { default as HotelFilters, QUICK_FILTERS } from "./HotelFilters";
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,22 @@
1
+ export declare const setParams: import("@reduxjs/toolkit").ActionCreatorWithPayload<any, "search/setParams">, setLoading: import("@reduxjs/toolkit").ActionCreatorWithPayload<any, "search/setLoading">, setResults: import("@reduxjs/toolkit").ActionCreatorWithPayload<any, "search/setResults">;
2
+ declare const store: import("@reduxjs/toolkit").EnhancedStore<{
3
+ search: {
4
+ params: {};
5
+ results: never[];
6
+ loading: boolean;
7
+ };
8
+ }, import("redux").UnknownAction, import("@reduxjs/toolkit").Tuple<[import("redux").StoreEnhancer<{
9
+ dispatch: import("redux-thunk").ThunkDispatch<{
10
+ search: {
11
+ params: {};
12
+ results: never[];
13
+ loading: boolean;
14
+ };
15
+ }, undefined, import("redux").UnknownAction>;
16
+ }>, import("redux").StoreEnhancer]>>;
17
+ export { FlightIcon } from "../icons/FlightIcon";
18
+ export { HotelIcon } from "../icons/HotelIcon";
19
+ export { CarIcon } from "../icons/CarIcon";
20
+ export { CloseIcon } from "../icons/CloseIcon";
21
+ export type RootState = ReturnType<typeof store.getState>;
22
+ export default store;
@@ -0,0 +1,19 @@
1
+ import { configureStore, createSlice } from "@reduxjs/toolkit";
2
+ const searchSlice = createSlice({
3
+ name: "search",
4
+ initialState: { params: {}, results: [], loading: false },
5
+ reducers: {
6
+ setParams: (s, a) => { s.params = { ...s.params, ...a.payload }; },
7
+ setLoading: (s, a) => { s.loading = a.payload; },
8
+ setResults: (s, a) => { s.results = a.payload; }
9
+ }
10
+ });
11
+ export const { setParams, setLoading, setResults } = searchSlice.actions;
12
+ const store = configureStore({
13
+ reducer: { search: searchSlice.reducer }
14
+ });
15
+ export { FlightIcon } from "../icons/FlightIcon";
16
+ export { HotelIcon } from "../icons/HotelIcon";
17
+ export { CarIcon } from "../icons/CarIcon";
18
+ export { CloseIcon } from "../icons/CloseIcon";
19
+ export default store;
@@ -0,0 +1,56 @@
1
+ export declare const Colors: {
2
+ primary: string;
3
+ primaryLight: string;
4
+ primaryDark: string;
5
+ secondary: string;
6
+ bannerBg: string;
7
+ bannerText: string;
8
+ inputBg: string;
9
+ label: string;
10
+ background: string;
11
+ surface: string;
12
+ surfaceSecondary: string;
13
+ text: string;
14
+ textSecondary: string;
15
+ textTertiary: string;
16
+ textOnPrimary: string;
17
+ border: string;
18
+ borderLight: string;
19
+ borderFocus: string;
20
+ success: string;
21
+ warning: string;
22
+ error: string;
23
+ skeleton: string;
24
+ skeletonHighlight: string;
25
+ overlay: string;
26
+ white: string;
27
+ black: string;
28
+ transparent: string;
29
+ };
30
+ export declare const Spacing: {
31
+ xs: number;
32
+ sm: number;
33
+ md: number;
34
+ lg: number;
35
+ xl: number;
36
+ xxl: number;
37
+ xxxl: number;
38
+ };
39
+ export declare const BorderRadius: {
40
+ sm: number;
41
+ md: number;
42
+ lg: number;
43
+ xl: number;
44
+ xxl: number;
45
+ full: number;
46
+ };
47
+ export declare const FontSize: {
48
+ xs: number;
49
+ sm: number;
50
+ md: number;
51
+ lg: number;
52
+ xl: number;
53
+ xxl: number;
54
+ xxxl: number;
55
+ heading: number;
56
+ };
@@ -0,0 +1,56 @@
1
+ export const Colors = {
2
+ primary: '#306DDE',
3
+ primaryLight: 'rgba(48,109,222,0.1)',
4
+ primaryDark: '#2558B5',
5
+ secondary: '#437dea',
6
+ bannerBg: '#BED3FC',
7
+ bannerText: '#496293',
8
+ inputBg: '#F4F7FD',
9
+ label: '#ABABC8',
10
+ background: '#F5F5F5',
11
+ surface: '#FFFFFF',
12
+ surfaceSecondary: '#F8F9FA',
13
+ text: '#1A1A2E',
14
+ textSecondary: '#5B5D6C',
15
+ textTertiary: '#9CA3AF',
16
+ textOnPrimary: '#FFFFFF',
17
+ border: '#E4E6EE',
18
+ borderLight: '#EBEDF2',
19
+ borderFocus: '#306DDE',
20
+ success: '#1a8917',
21
+ warning: '#F59E0B',
22
+ error: '#EF4444',
23
+ skeleton: '#E5E7EB',
24
+ skeletonHighlight: '#F3F4F6',
25
+ overlay: 'rgba(0,0,0,0.5)',
26
+ white: '#FFFFFF',
27
+ black: '#000000',
28
+ transparent: 'transparent',
29
+ };
30
+ export const Spacing = {
31
+ xs: 4,
32
+ sm: 8,
33
+ md: 12,
34
+ lg: 16,
35
+ xl: 20,
36
+ xxl: 24,
37
+ xxxl: 32,
38
+ };
39
+ export const BorderRadius = {
40
+ sm: 4,
41
+ md: 8,
42
+ lg: 12,
43
+ xl: 16,
44
+ xxl: 24,
45
+ full: 9999,
46
+ };
47
+ export const FontSize = {
48
+ xs: 10,
49
+ sm: 12,
50
+ md: 14,
51
+ lg: 16,
52
+ xl: 18,
53
+ xxl: 20,
54
+ xxxl: 24,
55
+ heading: 28,
56
+ };
@@ -0,0 +1,76 @@
1
+ export declare const formStyles: {
2
+ formCard: {
3
+ backgroundColor: string;
4
+ borderRadius: number;
5
+ padding: number;
6
+ gap: number;
7
+ marginHorizontal: number;
8
+ marginTop: number;
9
+ };
10
+ label: {
11
+ color: string;
12
+ fontWeight: "600";
13
+ fontSize: number;
14
+ marginBottom: number;
15
+ };
16
+ inputTrigger: {
17
+ backgroundColor: string;
18
+ borderRadius: number;
19
+ paddingHorizontal: number;
20
+ paddingVertical: number;
21
+ minHeight: number;
22
+ justifyContent: "center";
23
+ };
24
+ inputTriggerRow: {
25
+ flexDirection: "row";
26
+ alignItems: "center";
27
+ justifyContent: "space-between";
28
+ };
29
+ inputTriggerText: {
30
+ fontSize: number;
31
+ color: string;
32
+ flex: number;
33
+ fontWeight: "400";
34
+ };
35
+ inputTriggerPlaceholder: {
36
+ color: string;
37
+ };
38
+ inputTriggerCode: {
39
+ fontSize: number;
40
+ color: string;
41
+ fontWeight: "400";
42
+ marginLeft: number;
43
+ };
44
+ searchButton: {
45
+ borderRadius: number;
46
+ paddingVertical: number;
47
+ alignItems: "center";
48
+ justifyContent: "center";
49
+ minHeight: number;
50
+ };
51
+ searchButtonDisabled: {
52
+ opacity: number;
53
+ };
54
+ searchButtonContent: {
55
+ flexDirection: "row";
56
+ alignItems: "center";
57
+ gap: number;
58
+ };
59
+ searchButtonText: {
60
+ color: string;
61
+ fontSize: number;
62
+ fontWeight: "500";
63
+ };
64
+ errorText: {
65
+ fontSize: number;
66
+ color: string;
67
+ marginTop: number;
68
+ fontWeight: "500";
69
+ };
70
+ searchError: {
71
+ fontSize: number;
72
+ color: string;
73
+ textAlign: "center";
74
+ padding: number;
75
+ };
76
+ };